Adding or Delegating ZFS File system to Non-Global Zones Print E-mail
(0 votes, average: 0 out of 5)
Written by geekyS   
Saturday, 20 December 2008 17:47

This Geekyfacts article explains the procedure to add & delegate ZFS file system to Non-Global zone


Adding ZFS File system to a Non-Global Zone

 

ZFS file system can be added to Non-global zones using zonecfg command's add fs option. Before adding, the file system mountpoint property should be set to legacy and file system should not been mounted already in another location.

 

Non-global zone can create and delete files under the added file system, but it will not get the contol to change the file system properties like mountpoint,readonly,atime,compression. Global zone is responsible for controlling and managing the file system.

 

Creating a ZFS file system

 

[root@geekyfacts]# zfs create testpool/zonefs

 

[root@geekyfacts]# zfs list
NAME              USED  AVAIL  REFER  MOUNTPOINT
testpool          134K  1.86G    18K  /testpool
testpool/zonefs    18K  1.86G    18K  /testpool/zonefs
[root@geekyfacts]#

 

Setting mountpoint of testpool/zonefs filesystem as legacy

 

[root@geekyfacts]# zfs set mountpoint=legacy testpool/zonefs

Adding testpool/zonefs file system to the non-global zone - tzone

 

[root@geekyfacts]# zonecfg -z tzone
zonecfg:tzone> add fs
zonecfg:tzone:fs> set type=zfs
zonecfg:tzone:fs> set special=testpool/zonefs
zonecfg:tzone:fs> set dir=/zonefs
zonecfg:tzone:fs> end
zonecfg:tzone> commit
zonecfg:tzone> exit
[root@geekyfacts]#


Delegating ZFS File system to a Non-Global Zone

 

Delegating the file system will provide control to non-global zone for managing the file system properties and the priviledge to perform activities like create snapshot,clone over the file system.


[root@geekyfacts]# zonecfg -z tzone
zonecfg:tzone> add dataset
zonecfg:tzone:dataset> set name=testpool/zonefs
zonecfg:tzone:dataset> end
zonecfg:tzone> commit
zonecfg:tzone> exit
[root@geekyfacts]#

 

 

 

Last Updated on Monday, 22 December 2008 08:37