On Dec 11, 2009, at 4:17 AM, Alexander Skwar <alexanders.mailinglists+nos...@gmail.com > wrote:

Hello Jeff!

Could you (or anyone else, of course *G*) please show me how?

Situation:

There shall be 2 snapshots of a ZFS called rpool/rb-test
Let's call those snapshots "01" and "02".

$ sudo zfs create rpool/rb-test

$ zfs list rpool/rb-test
NAME            USED  AVAIL  REFER  MOUNTPOINT
rpool/rb-test    18K   170G    18K  /rpool/rb-test

$ sudo zfs snapshot rpool/rb-t...@01
$ sudo zfs snapshot rpool/rb-t...@02
$ sudo zfs clone rpool/rb-t...@02 rpool/rb-test-02
$ sudo zfs promote rpool/rb-test-02
$ zfs list -r rpool | grep rb-test
rpool/rb-test 0 170G 18K /rpool/rb-test rpool/rb-test-02 18K 170G 18K /rpool/rb-test-02 rpool/rb-test...@01 0 - 18K - rpool/rb-test...@02 0 - 18K -

Now, what do I need to do, so that I get rpool/rb-test
back to where it was when the snapshot rpool/rb-t...@01
was created, but WITHOUT losing what's at rpool/rb-t...@02?

As there's no rpool/rb-t...@01, I obviously can't do a
zfs rollback rpool/rb-t...@01.

I suppose I might be able to do "zfs rollback rpool/rb-test...@01",
but that would destroy rpool/rb-test...@02, wouldn't it?

Could you please be so kind and show what exactly
needs to be done?

I think you might be confused at what happens when you promote a cloned file system. When it is promoted the clone becomes the file system and the original becomes the clone. In this manner you are rolling back to the snapshot, but preserving the original as a clone and keeping the other snapshots as snapshots of the clone, you just might need to fix mountpoints and/or rename file systems to suit your taste.

If you "pivot" clones, sub-clones and their snapshots too many times you really will make accounting difficult and zfs destroy will take a long time to unwind the references, so use sparingly and clean up unused references when you can.

-Ross

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

Reply via email to