Trying to recreate ZFS volume - keep getting error {path "/mnt/datastore/backup1" already exists (400}

bearhntr

Member
Sep 9, 2022
180
15
23
Atlanta, GA USA
I inadvertently created a ZFS with Compression <ON> and to the wrong drive. Took forever to get rid of it. I have WIPED the drive 3 times and re-init with GPT 3 times. I do a "mount -l" from the shell and nothing shows for /dev/sdb# (at all) -- but every time I try and create a new ZFS with the same name I was using - I get this error. I have checked the datastore.cfg at least I think the right one...as it is {blank}. Where else is it seeing this. How do I completely get rid of (and see all of the old stuff)? I had another drive which I had done just EXT4 and called it "store1" - I get the same error if I try and use that name too.


1724435044341.png
 
Go to the shell. Run these. Report back.

zpool status

zfs list

df -h

Thanks - I decided when I reached frustration level of 9...and I had not yet begun making backups. I blew away everything on the box - re-installed and re-setup. Making sure that I did it as I had wanted to begin with. As you asked, here is the new setup/install. I would love to know why I could not find where the system was 'seeing' that I had used the ZFS name - and remove that.

1724515254754.png
 
The mount folder /mnt/datastore/backup1 probably does already exist. Remove the folder, then create the ZFS pool again.
 
Heh. Ya. Nuke'n'pave. It works.
Well, we don't have the problem anymore, so its hard to tell.

The zpool status gives us general pool info.
I expected that when you ran "zfs list", we would see the ghost.
The "df -h" was to tell how it was represented in the filesystem.
And then we would have used the exact path listed there to ...

zfs destroy /mnt/datastore/backup

(ZFS mounts can be created that aren't regular filesystems, so "rm -rf /mnt/datastore/backup" would not work.)
 
Last edited:
  • Like
Reactions: bearhntr
To completely remove and recreate a datastore, this process worked for me.
Although very simple, give me a break I'm not a Linux guy but I figured it out from here and other sources.

To completely remove a datastore, wipe disks and recreate a datastore.
Replace stupid_datastore with the zfs datastore name you need to remove in commands below


In >_Shell and run
zfs destroy -r stupid_datastore
zpool destroy stupid_datastore


Then in the console click on each disk and wipe all of them.

Back in >_Shell and run

cd /mnt/datastore/
rmdir stupid_datastore


Then in the console click on each disk and wipe
 
Last edited:
  • Like
Reactions: tcabernoch