When using the zones on the shared storage support feature in Oracle Solaris, the zones framework will automatically manage all of the ZFS storage pools associated with the rootzpool or zpool resources for a particular zone.
To facilitate zone and storage resource migration, ZFS storage pools associated with rootzpool or zpool resources are not persistently configured on the system. They will not appear in the system's global ZFS storage pool repository /etc/zfs/zpool.cache.
The zones framework creates corresponding ZFS storage pools when you install or clone a zone. You can configure more than one shared storage resource with the zonecfg add storage command per rootzpool or zpool resource. In this case, a mirrored ZFS storage pool will be created by default.
You can create ZFS storage pools in advance by using custom configurations such as encryption), or different redundancy levels like raidz or raidz2. After first configuring all the required shared storage resources in the zone configuration, use the zpool utility to export the pre-created ZFS storage pool again. The zones framework will first attempt to import and use this pre-created ZFS storage pool during zone installation and cloning.
When you use the zoneadm attach syntax, the zones framework will initially configure all shared storage resources and then import all configured ZFS storage pools.
For the zoneadm detach command syntax, the zones framework will first export all configured ZFS storage pools and then unconfigure all shared storage resources.
When uninstalling a zone with the zoneadm uninstall command, the zones framework will first export all configured ZFS storage pools and then unconfigure all shared storage resources by default. However, you can explicitly request that ZFS storage pools be destroyed by using the –x force-zpool-destroy option with the zoneadm uninstall command.
During system boot, the zones SMF service svc:/system/zones:default is run. The SMF service will configure shared storage resources and import ZFS storage pools for all zones in the installed state that have rootzpool or zpool resources. Any failures during this stage will be logged to the corresponding SMF services log file /var/svc/log/system-zones:default.log.
ZFS storage pools configured with rootzpool or zpool resources will appear as virtualized ZFS storage pools inside the zone, but they cannot be managed directly by the zone administrator.
While in use by a running zone, ZFS storage pools cannot be destroyed or exported by the global zone.
From the global zone, you can use the zpool command for administrative actions on ZFS storage pools managed by the zones framework. Administrative actions include bringing a specific device online or taking it offline, replacing faulted devices, and adding or removing devices. To keep the zone configuration in sync, update the corresponding storage URIs accordingly to reflect changes made to the shared storage resources being used.