Adding ZFS File Systems to a Non-Global Zone
A ZFS file system that is added to a native zone must have its mountpoint
property set to legacy
. For example, for the system1/zone/zion
file system, you would type the following command on the global or kernel zone:
global$ zfs set mountpoint=legacy system1/zone/zion
Then you would add that file system to the native zone by using the add fs
subcommand of the zonecfg
command.
Note:
To add the files system, ensure that it is not previously mounted on another location.global$ zonecfg -z zion zonecfg:zion> add fs zonecfg:zion:fs> set type=zfs zonecfg:zion:fs> set special=system1/zone/zion zonecfg:zion:fs> set dir=/opt/data zonecfg:zion:fs> end
This syntax adds the ZFS file system, system1/zone/zion
, to the already configured zion
zone, which is mounted at /opt/data
. The zone administrator can create and destroy files within the file system. The file system cannot be remounted to a different location. Likewise, the zone administrator cannot change properties on the file system such as atime
, readonly
, compression
, and so on.
The global zone administrator is responsible for setting and controlling properties of the file system.
For more information about the zonecfg
command and about configuring resource types with zonecfg
, see
Creating and Using Oracle Solaris Zones.