Re: [zones-discuss] Add a zpool to a Zone w/o reboot
Thanks for the suggestion, unfortunately it doesn't work... # zfs get zoned slabzone1-zp01 NAMEPROPERTY VALUE SOURCE slabzone1-zp01 zoned on local # zlogin slabzone1 # zfs mount slabzone1-zp01 cannot open 'slabzone1-zp01': dataset does not exist I wonder what rebooting the zone does to get it to be able to access the dataset, its almost like its importing the zpool. I'll have to do some research. zpool list/get commands do work inside the zone (example follows slabzone1-zp00 is a zpool already allocated to the zone). # zlogin slabzone1 # zpool list NAME SIZE USED AVAILCAP HEALTH ALTROOT slabzone1-zp00 3.97G 399M 3.58G 9% ONLINE - # zpool get all slabzone1-zp00 NAMEPROPERTY VALUE SOURCE slabzone1-zp00 size 3.97G - slabzone1-zp00 used 399M- slabzone1-zp00 available3.58G - slabzone1-zp00 capacity 9% - slabzone1-zp00 altroot - default slabzone1-zp00 health ONLINE - slabzone1-zp00 guid 12130506518989635213 - slabzone1-zp00 version 10 default slabzone1-zp00 bootfs - default slabzone1-zp00 delegation on default slabzone1-zp00 autoreplace off default slabzone1-zp00 cachefile- default slabzone1-zp00 failmode waitdefault I think whatever happens must happen at the zpool level, because when you add a top level dataset (ex tank/zonedata) to a zone it can see the tank zpool using the zpool list/get commands. Thanks, Alex -Original Message- From: Ben Rockwood [mailto:b...@cuddletech.com] Sent: Friday, February 13, 2009 4:12 PM To: Maidak Alexander J Cc: zones-discuss@opensolaris.org Subject: Re: [zones-discuss] Add a zpool to a Zone w/o reboot Maidak Alexander J wrote: I added a zpool to a nonglobal zone using the following method: # *zpool list slabzone1-zp01* NAME SIZE USED AVAILCAP HEALTH ALTROOT slabzone1-zp01 4.19G 112K 4.19G 0% ONLINE - # *zonecfg -z slabzone1* zonecfg:slabzone1 *add dataset* zonecfg:slabzone1:dataset *set name=slabzone1-zp01* zonecfg:slabzone1:dataset *end* zonecfg:slabzone1 *exit* How can I get the nonglobal zone to see the zpool without rebooting the nonglobal zone? I'm not sure you can,... a reboot is always the best method, but if I were to try it I'd: * Add the dataset proprty (you did that) * Umount the dataset (zfs umount slabzone1-zp01) * Set the zoned property (zfs set zoned=on slabzone1-zp01) * Attempt to mount it inside the zone (zfs mount zlabzone1-zp01) Remember, you are providing a dataset to the zone, not a pool. In your case, the zone root will be given to the pool, but thats not required. Because of this, don't bother with 'zpool' commands in the zone, they don't work. Good luck. benr. ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Add a zpool to a Zone w/o reboot
Sorry Alex, I didn't include enough information to properly convey my idea. From the *global* zone, you would use # mount -F lofs ZFS-mountpoint zonepath/root/directory-in-the-zone For example: # mount -F lofs /mypool/zones/myzone-usr-local /zones/myzone/root/usr/local On Mon, Feb 16, 2009 at 5:50 PM, Maidak Alexander J maidakalexand...@johndeere.com wrote: Thanks for the suggestion, unfortunately it doesn't work... # zfs get zoned slabzone1-zp01 NAMEPROPERTY VALUE SOURCE slabzone1-zp01 zoned on local # zlogin slabzone1 # zfs mount slabzone1-zp01 cannot open 'slabzone1-zp01': dataset does not exist I wonder what rebooting the zone does to get it to be able to access the dataset, its almost like its importing the zpool. I'll have to do some research. zpool list/get commands do work inside the zone (example follows slabzone1-zp00 is a zpool already allocated to the zone). # zlogin slabzone1 # zpool list NAME SIZE USED AVAILCAP HEALTH ALTROOT slabzone1-zp00 3.97G 399M 3.58G 9% ONLINE - # zpool get all slabzone1-zp00 NAMEPROPERTY VALUE SOURCE slabzone1-zp00 size 3.97G - slabzone1-zp00 used 399M- slabzone1-zp00 available3.58G - slabzone1-zp00 capacity 9% - slabzone1-zp00 altroot - default slabzone1-zp00 health ONLINE - slabzone1-zp00 guid 12130506518989635213 - slabzone1-zp00 version 10 default slabzone1-zp00 bootfs - default slabzone1-zp00 delegation on default slabzone1-zp00 autoreplace off default slabzone1-zp00 cachefile- default slabzone1-zp00 failmode waitdefault I think whatever happens must happen at the zpool level, because when you add a top level dataset (ex tank/zonedata) to a zone it can see the tank zpool using the zpool list/get commands. Thanks, Alex -Original Message- From: Ben Rockwood [mailto:b...@cuddletech.com] Sent: Friday, February 13, 2009 4:12 PM To: Maidak Alexander J Cc: zones-discuss@opensolaris.org Subject: Re: [zones-discuss] Add a zpool to a Zone w/o reboot Maidak Alexander J wrote: I added a zpool to a nonglobal zone using the following method: # *zpool list slabzone1-zp01* NAME SIZE USED AVAILCAP HEALTH ALTROOT slabzone1-zp01 4.19G 112K 4.19G 0% ONLINE - # *zonecfg -z slabzone1* zonecfg:slabzone1 *add dataset* zonecfg:slabzone1:dataset *set name=slabzone1-zp01* zonecfg:slabzone1:dataset *end* zonecfg:slabzone1 *exit* How can I get the nonglobal zone to see the zpool without rebooting the nonglobal zone? I'm not sure you can,... a reboot is always the best method, but if I were to try it I'd: * Add the dataset proprty (you did that) * Umount the dataset (zfs umount slabzone1-zp01) * Set the zoned property (zfs set zoned=on slabzone1-zp01) * Attempt to mount it inside the zone (zfs mount zlabzone1-zp01) Remember, you are providing a dataset to the zone, not a pool. In your case, the zone root will be given to the pool, but thats not required. Because of this, don't bother with 'zpool' commands in the zone, they don't work. Good luck. benr. ___ zones-discuss mailing list zones-discuss@opensolaris.org -- --JeffV ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Add a zpool to a Zone w/o reboot
Maidak Alexander J wrote: I added a zpool to a nonglobal zone using the following method: # *zpool list slabzone1-zp01* NAME SIZE USED AVAILCAP HEALTH ALTROOT slabzone1-zp01 4.19G 112K 4.19G 0% ONLINE - # *zonecfg -z slabzone1* zonecfg:slabzone1 *add dataset* zonecfg:slabzone1:dataset *set name=slabzone1-zp01* zonecfg:slabzone1:dataset *end* zonecfg:slabzone1 *exit* How can I get the nonglobal zone to see the zpool without rebooting the nonglobal zone? I'm not sure you can,... a reboot is always the best method, but if I were to try it I'd: * Add the dataset proprty (you did that) * Umount the dataset (zfs umount slabzone1-zp01) * Set the zoned property (zfs set zoned=on slabzone1-zp01) * Attempt to mount it inside the zone (zfs mount zlabzone1-zp01) Remember, you are providing a dataset to the zone, not a pool. In your case, the zone root will be given to the pool, but thats not required. Because of this, don't bother with 'zpool' commands in the zone, they don't work. Good luck. benr. ___ zones-discuss mailing list zones-discuss@opensolaris.org