You can delegate ZFS filesystem as dataset from global zone to non global zone. With this method, non global zone administrator can administer property of filesystem delegated. Tips to delegate dataset as below.
- See ZFS file system on your host. In this example you will share mirrpool/fs1 filesystem.bash-3.00# zfs listNAME USED AVAIL REFER MOUNTPOINTmirrpool 168K 976M 18K /mirrpoolmirrpool/fs1 18K 976M 18K legacymirrpool/fs2 18K 976M 18K /mirrpool/fs2
- Reconfigure the non global zone to include ZFS filesystem. In this example non global zone name is zone1.bash-3.00# zonecfg -z zone1zonecfg:zone1> add datasetzonecfg:zone1:dataset> endzonecfg:zone1> exit
- See the zoned property of your ZFS filesystem.bash-3.00# zfs get -r zoned mirrpoolNAME PROPERTY VALUE SOURCEmirrpool zoned off defaultmirrpool/fs1 zoned off defaultmirrpool/fs2 zoned off default
- Reboot the non global zone.bash-3.00# zoneadm -z zone1 rebootzoneadm: zone 'zone1': WARNING: The zone.cpu-shares rctl is set butzoneadm: zone 'zone1': FSS is not the default scheduling class forzoneadm: zone 'zone1': this zone. FSS will be used for processeszoneadm: zone 'zone1': in the zone but to get the full benefit of FSS,zoneadm: zone 'zone1': it should be the default scheduling class.zoneadm: zone 'zone1': See dispadmin(1M) for more details.zoneadm: zone 'zone1': WARNING: e1000g0:1: no matching subnet found in netmasks(4) for 172.16.31.150; using default of 255.255.0.0.
- Login to the non global zone and see the ZFS filesystem that shared from global zone.bash-3.00# zlogin zone1[Connected to zone 'zone1' pts/5]Last login: Tue Nov 2 15:22:28 on pts/5Sun Microsystems Inc. SunOS 5.10 Generic January 2005# df -h mirrpool/fs2Filesystem size used avail capacity Mounted onmirrpool/fs2 976M 18K 976M 1% /mirrpool/fs2
- Remember that non global zone administrator can administer the file system. List the ZFS filesystem.# zfs listNAME USED AVAIL REFER MOUNTPOINTmirrpool 168K 976M 18K /mirrpoolmirrpool/fs2 18K 976M 18K /mirrpool/fs2
- Return to the global zone and see the zoned property of filesystem that you have delegated to non global zone.bash-3.00# zfs get -r zoned mirrpoolNAME PROPERTY VALUE SOURCEmirrpool zoned off defaultmirrpool/fs1 zoned off defaultmirrpool/fs2 zoned on local
No comments:
Post a Comment