beautypg.com

Storage within a zone, Using a device in a local zone – Sun Microsystems SOLARIS 10 User Manual

Page 81

background image

Version 3.1-en

Solaris 10 Container Guide - 3.1 5. Cookbooks

Effective: 30/11/2009

5.1.12. Storage within a zone
[dd] Storage can be used in different ways in local zones. The type of use can be classified in the
following ways:

Device or NFS

Use thedevice in the local zone directly

Mount

The global zone provides a file system per lofs to the local zone

The global zone mounts a file system when the local zone is booted

The zone mounts a file system from a device

Access

read/write

read only

Share writable file system with several zones

5.1.12.1. Using a device in a local zone
[dd] If direct access to a device is required by the local zone, the device must be made available by
the corresponding zone configuration. Once the zone has been restarted, the device entry is available
under /dev, as seen from the local zone.

global# zonecfg -z zone1
zonecfg:zone1> add device
zonecfg:zone1:device> set match=/dev/rdsk/c1d0s0
zonecfg:zone1:device> end
zonecfg:zone1> info device
device:
match: /dev/rdsk/c1d0s0
zonecfg:zone1> commit
zonecfg:zone1> exit

5.1.12.2. The global zone supplies a file system per lofs to the local zone
[dd] /export/globalhome of the global zone is to be mounted as writable in the local zone as
/export/home. Since /export/globalhome is already available in the global zone, the file
system can be added as a loopback filesystem. If the loopback filesystem is mounted as writable,
both the global zone as well as zone1 can write on the file system.

global# zonecfg -z zone1
zonecfg:zone1> add fs
zonecfg:zone1:fs> set special=/export/globalhome
zonecfg:zone1:fs> set dir=/export/home
zonecfg:zone1:fs> set type=lofs
zonecfg:zone1:fs> add options rw
zonecfg:zone1:fs> info
fs:
dir: /export/home
special: /export/globalhome
raw not specified
type: lofs
options: [rw]
zonecfg:zone1:fs> end
zonecfg:zone1>

74