Use zonecfg to configure the lofs mount; this will work nicely for CDs in addition to ordinary filesystems:
# zonecfg -z zone1 zonecfg:zone1> add fs zonecfg:zone1:fs> set dir=/depot zonecfg:zone1:fs> set special=/depot zonecfg:zone1:fs> set type=lofs zonecfg:zone1:fs> add options [nodevices] zonecfg:zone1:fs> end zonecfg:zone1> commit zonecfg:zone1> exit
special is the directory from the global zone to mount; dir is the mount point within the non-global zone.
If adding a CD, while in the “fs” configuration mode, change the options to the following:
zonecfg:zone1:fs> add options [ro,nodevices]
A reboot of the non-global zone (init 6 within the zone) is necessary for the changes to be visible.
All filesystems configured for the zone can be listed as follows:
# zonecfg -z zone1
zonecfg:zone1> info fs
fs:
dir: /depot
special: /depot
raw not specified
type: lofs
options: []
To remove the filesystem from the non-global zone, do the following:
# zonecfg -z zone1 zonecfg:zone1> remove fs dir=/mnt zonecfg:zone1> commit zonecfg:zone1> exit
Again, a reboot is necessary for the reconfiguration to take effect.
References: Sun Developer Network forums, File Systems and Non-Global Zones and Resource Type Properties.
Post a Comment