Lori,

Thanks for the reply.

By "floating" I mean we have a set of scripts that will shut down a zone, 
export all the ZFS pools attached to that zone, modify the zone config to not 
have those datasets associated anymore, then, on another system, import the ZFS 
pools, modify the new zone's config to include those datasets, and boot the 
zone.

I'll look at using the mount-option thing, thanks for that.

- Johnson

On 07/16/10 10:30 AM, Lori Alt wrote:
>
> On 07/14/10 05:45 PM, Johnson Earls wrote:
> > Hello,
> >
> > How would I go about finding out which zone owns a particular dataset from 
> > a script running in the > global zone?
> >    
>
> > We have some ZFS datasets that can "float" between zones on different 
> > servers in order to provide > a manual application failover mechanism.
>
> I don't know what you mean by datasets "floating" between zones.  In 
> order for a zone to access a dataset, the dataset must have been 
> delegated to the zone, which requires some explicit action.
>
> But to answer your specific question, if you look at a mounted dataset's 
> entry in /etc/mnttab:
>
> rpool/z2-del    /myz2    zfs    
> rw,nodevices,setuid,nonbmand,exec,xattr,atime,zone=z2,dev=16d001c    
> 1279296850
>
> you'll see a 'zone=<name>' entry if the zone is delegated to the zone 
> (assuming it's mounted at all).
>
> Oddly, enough, the "zone=<zone>" string doesn't appear for the zone 
> root.  I'm not sure if that's intentional or an oversight.  But in any 
> case, it doesn't appear that you're looking for zone roots.
>
> You can also run through the zones, doing 'zoneconfig -z <zone> info' 
> commands to look for datasets delegated to each zone.
>
>
> Lori

- Johnson
jea...@responsys.com


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

Reply via email to