Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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:
zpool1/test1clone
# 

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.

share|improve this question

2 Answers 2

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.

share|improve this answer

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.
share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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