In a sparse root zone, /usr is mounted read-only from the global zone. You can use this procedure to add a writable directory, such as /usr/local, under /usr in your zone.
You must be the global administrator in the global zone to perform this procedure.
Become superuser, or assume the Primary Administrator role.
To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.
Create the directory /usr/local in the global zone.
global# mkdir -p /usr/local |
Specify a directory in the global zone to serve as the backing store for the zone's /usr/local directory.
global# mkdir -p /storage/local/my-zone |
Edit the configuration for the zone my-zone.
global# zonecfg -z my-zone |
Add the loopback-mounted filesystem.
zonecfg:my-zone> add fs zonecfg:my-zone:fs> set dir=/usr/local zonecfg:my-zone:fs> set special=/storage/local/my-zone zonecfg:my-zone:fs> set type=lofs zonecfg:my-zone:fs> end zonecfg:my-zone> commit zonecfg:my-zone> exit |
Boot the zone.