Actions
Bug #2957
closedzfs destroy -R/r sometimes fails when removing defer-destroyed snapshot
Start date:
2012-07-02
Due date:
% Done:
0%
Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
Description
The problem is that when iterating datasets to delete we have to destroy the clones of the snapshot before destroying the snapshot, but once the clones are all destroyed the kernel will already have destroyed the snapshot, causing libzfs to fail with a very confusing error message:
$ sudo zfs create rpool/test
$ sudo zfs snapshot rpool/test@snap
$ sudo zfs clone rpool/test@snap rpool/clone
$ sudo zfs destroy -d rpool/test@snap
$ sudo zfs destroy -R rpool/test
cannot destroy 'rpool/test@snap': dataset does not exist
A test case for this has been added to the ZFS test suite as zpool_destroy_010_pos.
Actions