2011-11-27 5:24, Ian Collins пишет:
I was trying to destroy a filesystem and I was baffled by the following
error:

zfs destroy -r rpool/test/opt
cannot destroy 'rpool/test/opt/csw@20111101_1405': dataset already exists

zfs destroy -r rpool/test/opt/csw@20111101_1405
cannot destroy 'rpool/test/opt/csw@20111101_1405': snapshot is cloned

It turns out there was a zfs receive writing to the filesystem.

A more sensible error would have been "dataset is busy".

I would not be surprised if "zfs recv" would receive an
incremental stream doing work like this:
* clone the currently available "origin" snapshot into
  a temporary dataset
* write new data into this dataset (i.e. if the receive
  fails, older FS remains consistent)
* promote the temp dataset after a sucessful receive

This is a wild guess without consulting the sources,
but sounds reasonable due to practice. If so, the error
message "as is" happens to be valid.

But you're correct that it might be more informative
for this corner case as well... :)

//Jim
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to