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
I've got scripts that gather disk usage and i/o statistics per dataset, but
I'd like to make those statistics available in the zone which owns the dataset,
rather than the global zone (which is where the dtrace script has to run). So
I'd like to be able to find out which zone owns the dataset in order to direct
output into a directory within that zone. Is this possible?
Thanks in advance,
- Johnson
jea...@responsys.com
_______________________________________________
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