Ketan
2009-Aug-05 13:09 UTC
[zfs-discuss] Remove the zfs snapshot keeping the original volume and clone
I created a snapshot and subsequent clone of a zfs volume. But now i ''m not able to remove the snapshot it gives me following error zfs destroy newpool/ldom2/zdisk4 at bootimg cannot destroy ''newpool/ldom2/zdisk4 at bootimg'': snapshot has dependent clones use ''-R'' to destroy the following datasets: newpool/ldom2/zdisk0 and if i promote the clone then the original volume becomes the dependent clone , is there a way to destroy just the snapshot leaving the clone and original volume intact ? -- This message posted from opensolaris.org
Henrik Bjornstrom - Sun Microsystems
2009-Aug-31 14:30 UTC
[zfs-discuss] Remove the zfs snapshot keeping the original volume and clone
Hi ! Have anyone given an answer to this that I have missed ? I have a customer that have the same question and I want to give him a correct answer. /Henrik Ketan wrote:> I created a snapshot and subsequent clone of a zfs volume. But now i ''m not able to remove the snapshot it gives me following error > > zfs destroy newpool/ldom2/zdisk4 at bootimg > cannot destroy ''newpool/ldom2/zdisk4 at bootimg'': snapshot has dependent clones > use ''-R'' to destroy the following datasets: > newpool/ldom2/zdisk0 > > and if i promote the clone then the original volume becomes the dependent clone , is there a way to destroy just the snapshot leaving the clone and original volume intact ? >-- Henrik Bjornstrom Sun Microsystems Email: Henrik.Bjornstrom at Sun.COM Box 51 Phone: +46 8 631 1315 164 94 KISTA SWEDEN
Richard Elling
2009-Aug-31 16:29 UTC
[zfs-discuss] Remove the zfs snapshot keeping the original volume and clone
From the ZFS man page: Clones can only be created from a snapshot. When a snapshot is cloned, it creates an implicit dependency between the parent and child. Even though the clone is created somewhere else in the dataset hierarchy, the original snapshot cannot be destroyed as long as a clone exists. The "origin" pro- perty exposes this dependency, and the destroy command lists any such dependencies, if they exist. The clone parent-child dependency relationship can be reversed by using the "promote" subcommand. This causes the "origin" file system to become a clone of the specified file system, which makes it possible to destroy the file system that the clone was created from. This implies that the question being asked is incomplete. What are they trying to do? -- richard On Aug 31, 2009, at 7:30 AM, Henrik Bjornstrom - Sun Microsystems wrote:> Hi ! > > Have anyone given an answer to this that I have missed ? I have a > customer that have the same question and I want to give him a > correct answer. > > /Henrik > > Ketan wrote: >> I created a snapshot and subsequent clone of a zfs volume. But now >> i ''m not able to remove the snapshot it gives me following error >> zfs destroy newpool/ldom2/zdisk4 at bootimg >> cannot destroy ''newpool/ldom2/zdisk4 at bootimg'': snapshot has >> dependent clones >> use ''-R'' to destroy the following datasets: >> newpool/ldom2/zdisk0 >> >> and if i promote the clone then the original volume becomes the >> dependent clone , is there a way to destroy just the snapshot >> leaving the clone and original volume intact ? >> > > > -- > Henrik Bjornstrom > > Sun Microsystems Email: Henrik.Bjornstrom at Sun.COM > Box 51 Phone: +46 8 631 1315 > 164 94 KISTA SWEDEN > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Lori Alt
2009-Aug-31 16:46 UTC
[zfs-discuss] Remove the zfs snapshot keeping the original volume and clone
On 08/31/09 08:30, Henrik Bjornstrom - Sun Microsystems wrote:> Hi ! > > Have anyone given an answer to this that I have missed ? I have a > customer that have the same question and I want to give him a correct > answer. > > /Henrik > > Ketan wrote: >> I created a snapshot and subsequent clone of a zfs volume. But now i >> ''m not able to remove the snapshot it gives me following error >> zfs destroy newpool/ldom2/zdisk4 at bootimg >> cannot destroy ''newpool/ldom2/zdisk4 at bootimg'': snapshot has dependent >> clones >> use ''-R'' to destroy the following datasets: >> newpool/ldom2/zdisk0 >> >> and if i promote the clone then the original volume becomes the >> dependent clone , is there a way to destroy just the snapshot leaving >> the clone and original volume intact ?no. As long as a clone exists, its origin snapshot must exist as well. lori
Henrik Bjornstrom - Sun Microsystems
2009-Sep-01 07:50 UTC
[zfs-discuss] Remove the zfs snapshot keeping the original volume and clone
Thanks for tha answers. Lori Alt wrote:> On 08/31/09 08:30, Henrik Bjornstrom - Sun Microsystems wrote: >> Hi ! >> >> Have anyone given an answer to this that I have missed ? I have a >> customer that have the same question and I want to give him a correct >> answer. >> >> /Henrik >> >> Ketan wrote: >>> I created a snapshot and subsequent clone of a zfs volume. But now i >>> ''m not able to remove the snapshot it gives me following error >>> zfs destroy newpool/ldom2/zdisk4 at bootimg >>> cannot destroy ''newpool/ldom2/zdisk4 at bootimg'': snapshot has >>> dependent clones >>> use ''-R'' to destroy the following datasets: >>> newpool/ldom2/zdisk0 >>> >>> and if i promote the clone then the original volume becomes the >>> dependent clone , is there a way to destroy just the snapshot >>> leaving the clone and original volume intact ? > no. As long as a clone exists, its origin snapshot must exist as well. > > lori > >-- Henrik Bjornstrom Sun Microsystems Email: Henrik.Bjornstrom at Sun.COM Box 51 Phone: +46 8 631 1315 164 94 KISTA SWEDEN