hey anil,

given that things work, i'd recommend leaving them alone.

if you really want to insist on cleaning things up aesthetically
then you need to do multiple zfs operation and you'll need to shutdown
the zones.

assuming you haven't cloned any zones (because if you did that
complicates things), you could do:

- shutdown your zones

- zfs promote of the latest zbe

- destroy all of the new snapshots of the promoted zbe (and the
  old zbe filesystems which are now dependants of those snapshots.)

- a rename of the promoted zbe to whatever name you want to
  standardize on.

note that i haven't tested any of this, but in theory it should work.

it may be the case that some of the zfs operations above may fail due to
the zoned bit being set for zbes.  if this is the case then you'll need
to clear the zoned bit, do the operations, and then reset the zoned bit.

please don't come crying to me if this doesn't work.  ;)

ed


On Wed, Jul 29, 2009 at 07:44:37PM -0700, Anil wrote:
> I create a couple of zones. I have a zone path like this:
> 
> r...@vps1:~# zfs list -r zones/cars
> NAME                  USED  AVAIL  REFER  MOUNTPOINT
> zones/fans           1.22G  3.78G    22K  /zones/fans
> zones/fans/ROOT      1.22G  3.78G    19K  legacy
> zones/fans/ROOT/zbe  1.22G  3.78G  1.22G  legacy
> 
> I then upgrade the global zone, this creates the zfs clones/snapshots for the 
> zones:
> 
> r...@vps1:~# zfs list -r zones/fans
> NAME                    USED  AVAIL  REFER  MOUNTPOINT
> zones/fans             4.78G  5.22G    22K  /zones/fans
> zones/fans/ROOT        4.78G  5.22G    19K  legacy
> zones/fans/ROOT/zbe    2.64G  5.22G  2.64G  legacy
> zones/fans/ROOT/zbe-1  2.13G  5.22G  3.99G  legacy
> 
> I create a couple of new zones, the mounted zfs tree looks like this:
> 
> r...@vps1:~# zfs list -r zones/cars
> NAME                  USED  AVAIL  REFER  MOUNTPOINT
> zones/cars           1.22G  3.78G    22K  /zones/cars
> zones/cars/ROOT      1.22G  3.78G    19K  legacy
> zones/cars/ROOT/zbe  1.22G  3.78G  1.22G  legacy
> 
> 
> So, now the problem is, I have some zones that have a zbe-1 and some that 
> have a zfs clone with just zbe name.
> 
> After making sure everything works for a month now, I want to clean up that. 
> I want to promote all of them to be just zbe. I understand I won't be able to 
> revert back to original zone bits, but I could have 40+ zones on this system, 
> and I prefer them all to be consistent looking.
> 
> Here is a full hierarchy now:
> r...@vps1:~# zfs get -r mounted,origin,mountpoint zones/fans
> NAME                       PROPERTY    VALUE                      SOURCE
> zones/fans                 mounted     yes                        -
> zones/fans                 origin      -                          -
> zones/fans                 mountpoint  /zones/fans                default
> zones/fans/ROOT            mounted     no                         -
> zones/fans/ROOT            origin      -                          -
> zones/fans/ROOT            mountpoint  legacy                     local
> zones/fans/ROOT/zbe        mounted     no                         -
> zones/fans/ROOT/zbe        origin      -                          -
> zones/fans/ROOT/zbe        mountpoint  legacy                     local
> zones/fans/ROOT/z...@zbe-1  mounted     -                          -
> zones/fans/ROOT/z...@zbe-1  origin      -                          -
> zones/fans/ROOT/z...@zbe-1  mountpoint  -                          -
> zones/fans/ROOT/zbe-1      mounted     yes                        -
> zones/fans/ROOT/zbe-1      origin      zones/fans/ROOT/z...@zbe-1  -
> zones/fans/ROOT/zbe-1      mountpoint  legacy                     local
> 
> 
> How do I go about renaming and destroying the original zbe fs? I believe this 
> will involve me to promote the zbe-1 and then destroy zbe followed by 
> renaming zbe-1 to zbe. But this is a live system, I don't have something to 
> play with first. Any tips?
> 
> Thanks!
> -- 
> This message posted from opensolaris.org
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to