You can share ZFS filesystem from global zone to non global zone. But only global zone administrator can administer properties of ZFS filesystem. Below is tips to share ZFS filesystem.
- 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 170K 976M 21K /mirrpoolmirrpool/fs1 18K 976M 18K /mirrpool/fs1
- Set the mountpoint property for filesystem to legacy.bash-3.00# zfs set mountpoint=legacy mirrpool/fs1bash-3.00# zfs listNAME USED AVAIL REFER MOUNTPOINTmirrpool 142K 976M 18K /mirrpoolmirrpool/fs1 18K 976M 18K legacy
- Reconfigure the non global zone to include ZFS filesystem. In this example non global zone name is zone1.zonecfg:zone1> add fszonecfg:zone1:fs> set type=zfszonecfg:zone1:fs> set special=mirrpool/fs1zonecfg:zone1:fs> set dir=/zonepoolzonecfg:zone1:fs> endzonecfg:zone1> exit
- 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 /zonepoolFilesystem size used avail capacity Mounted onmirrpool/fs1 0K 18K 976M 1% /zonepool
- Remember that non global zone administrator can not administer the file system. Non global zone can not list ZFS filesystem.# zfs listno datasets available
No comments:
Post a Comment