ZFS Problem deleting snapshots

Hi,

I created some snapshots (FreeNAS 11.3u3.2) with slashes in the name which looks like it wasn't a good idea. I tried to delete them but the name seems to be wrong:

Code:
# zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
SSDpool/LongDatasetNameToPreventTooLongPaths/SMB@SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00 0 - 128K -
SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents@SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00 0 - 41.3M -
SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Roms_SSD@SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00 0 - 22.5G -
SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/StuffX_SSD@SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00 0 - 117K -
SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Stuff_SSD@SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00 0 - 4.79M -

Code:
# zfs destroy SSDpool/LongDatasetNameToPreventTooLongPaths/SMB@SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00
could not find any snapshots to destroy; check snapshot names.

Code:
# zfs destroy SSDpool/LongDatasetNameToPreventTooLongPaths/SMB@SSDpool\/LongDatasetNameToPreventTooLongPaths\/SMB_daily-2020-06-19_03-00
could not find any snapshots to destroy; check snapshot names.

Anyone has an idea how to delete them?
 
FreeNAS 11.3u3.2
PC-BSD, FreeNAS, XigmaNAS, and all other FreeBSD Derivatives

with slashes in the name which looks like it wasn't a good idea
How did you manage to create them in the first place?

Code:
root@molly:~ # zfs snapshot fbsd1/DATA@some/thing
cannot create snapshot 'fbsd1/DATA@some/thing': trailing slash in name
root@molly:~ # zfs snapshot fbsd1/DATA@some\/thing
cannot create snapshot 'fbsd1/DATA@some/thing': trailing slash in name
root@molly:~ #
 
I used the buildin feature of FreeNAS's WebGUI. For other datasets the snapshot creation failed with errors like...
Code:
cannot create snapshot 'SSDpool/LongDatasetNameToPreventTooLongPaths/HOME@SSDpool/LongDatasetNameToPreventTooLongPaths/HOME_daily-2020-06-19_03-00': trailing slash in name no snapshots were created.
...but for the above 5 datsets it was "successfully" created. The WebGUI is also unable to delete them so I thought it might be possible via cli.

I made the snapshot directories visible and ls shows this:

# ls -la /mnt/SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents/.zfs/snapshot
ls: SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00: No such file or directory
total 0
dr-xr-xr-x+ 3 root wheel 3 Jun 19 18:02 .
dr-xr-xr-x+ 3 root wheel 3 Jun 13 20:05 ..



# cd /mnt/SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents/.zfs/snapshot
# echo *
SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00
 
I also tried this to delete the snapshots:
Code:
# zfs destroy SSDpool/LongDatasetNameToPreventTooLongPaths/SMB@SSDpool\/LongDatasetNameToPreventTooLongPaths\/SMB_daily-2020-06-19_03-00
could not find any snapshots to destroy; check snapshot names.

# zfs destroy SSDpool/LongDatasetNameToPreventTooLongPaths/SMB@'SSDpool/LongDataSetNameToPreventTooLongPaths/SMB-daily-2020-06-19_03-00'
could not find any snapshots to destroy; check snapshot names.

ls gives me this error:
Code:
ls -la /mnt/SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents/.zfs/snapshot
ls: SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00: No such file or directory
total 0
dr-xr-xr-x+ 3 root wheel 3 Jun 19 18:02 .
dr-xr-xr-x+ 3 root wheel 3 Jun 13 20:05 ..

I tried "echo *" to list the snapshot:
Code:
# cd /mnt/SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents/.zfs/snapshot
# echo *
SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00

And "rm -rf" to delete the snapshot file which gives me no error but the file still is there:
Code:
# cd /mnt/SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents/.zfs/snapshot
# rm -rf SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00
# echo *
SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00

The same if I use "rm -rf *":
Code:
# cd /mnt/SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents/.zfs/snapshot
# rm -rf *
zsh: sure you want to delete the only file in /mnt/SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents/.zfs/snapshot [yn]? y
# echo *
SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00

I even can't destroy the whole datasets:
Code:
# zfs destroy SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents
cannot destroy 'SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents': filesystem has children
use '-r' to destroy the following datasets:
SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents@SSDpool/LongDatasetNameToPreventTooLongPaths/SMB_daily-2020-06-19_03-00
# zfs destroy -r SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents
internal error: Invalid argument
zsh: abort (core dumped) zfs destroy -r SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents
# zfs destroy -fr SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents
internal error: Invalid argument
zsh: abort (core dumped) zfs destroy -fr SSDpool/LongDatasetNameToPreventTooLongPaths/SMB/Documents

I don't want to format all the drives and create to pool from scretch to get rid of the 5 strange snapshots because this dataset is used by iocage to host 10 jails and I'm not sure how to restore them on a new pool.

Any ideas how to delete snapshots or atleast the whole datasets?
 
Back
Top