'zfs destroy -r' of parent dataset destroys clones of subdatasets, while destroy -r of subdataset throws error/prompts to use -R #17050
Labels
Type: Defect
Incorrect behavior (e.g. crash, hang)
System information
Describe the problem you're observing
zfs destroy -r pool/dataset
will happily destroypool/dataset/subdataset
when it has clones, whilezfs destroy -r pool/dataset/subdataset
will not destroy the dataset, with the warning that it has clones and-R
has to be used to destroy the dataset.Describe how to reproduce the problem
pool/dataset
andpool/dataset/subdataset
zfs snapshot -r pool@snapshot
zfs clone pool/dataset/subdataset@snapshot pool/dataset/cloneofsubdataset
pool/dataset/subdataset
:zfs destroy -r pool/dataset/subdataset
. This will throw an error and prompting to use-R
.pool/dataset
:zfs destroy -r pool/dataset
and observe how it happily destroys bothpool/dataset
andpool/dataset/subdataset
Shouldn't the behaviour be consistent whether it concerns the dataset or any of its parents?
The text was updated successfully, but these errors were encountered: