Is it possible to split a zfs clone to allow the original snapshot to be destroyed?

# zfs create zpool1/test1
# zfs snapshot zpool1/test1@snap1
# zfs clone zpool1/test1@snap1 zpool1/test1clone
# zfs destroy zpool1/test1@snap1
cannot destroy 'zpool1/test1@snap1': snapshot has dependent clones
use '-R' to destroy the following datasets:

At this point, it would like to 'actualize' the zpool1/test1clone file system, essentially as if I had performed a zfs send zpool1/test1@snap1 | zfs receive zpool1/test1clone.


If you don't want there to be any ties between the child and parent filesystems, you will have to do a zfs send/receive.


You would need to promote the ZFS clone to a filesystem in order to be able to destroy the original snapshot/filesystem.

zfs promote zpool1/test1clone

Please see: http://download.oracle.com/docs/cd/E19253-01/819-5461/gcvfl/index.html

zfs promote filesystem
     Promotes a clone file system to no longer  be  dependent
     on its "origin" snapshot. This makes it possible to des-
     troy the file system that the clone  was  created  from.
     The   clone   parent-child  dependency  relationship  is
     reversed, so that the "origin"  file  system  becomes  a
     clone of the specified file system.
  • promote doesn't really do what I want, as all it seems to do really seems to do is move the snapshot from the original file system onto the cloned filesystem, and then setups a dependency the other way around, meaning the original filesystem now has a dependency. I want to remove any dependencies between the file systems – Matthew Watson May 3 '11 at 11:37
  • Rename the promoted filesystem. – ewwhite May 3 '11 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.