Where appropriate, the zoneadm CLI subcommands have been enhanced with options specific to ZFS storage pool management.
The install, clone, and attach subcommands of zoneadm have the following options:
This option applies to all zpool resources specified in the zone configuration and instructs the zones framework to forcibly import any ZFS storage pools that might appear to be in use, such as by another system. This mimics the behavior of zpool import -f command.
This option facilitates importing ZFS storage pools onto a new system during zone migration when the ZFS storage pools were never properly exported on another system, for example, by using the zoneadm detach or zoneadm uninstall commands. In these situations, the forcible import must be applied to all ZFS storage pools configured for a particular zone.
This option instructs the zones framework to forcibly create a new ZFS storage pool, either over an existing old pool or onto a device that appears to be currently in use for other purposes. This mimics the behavior of the zpool create -f command syntax.
This option's scope is limited to the ZFS storage pools specified in a comma-separated list of zpool names or specified by using the option multiple times, for example:
-x force-zpool-create=rpool,pool2,pool3 -x force-zpool-create=pool1 -x force-zpool-create=pool2
The ZFS storage pool name to be used here is the name property of the corresponding zpool resource in the zone configuration. To specify the ZFS storage pool described by the rootzpool resource, use the name rpool.
This option instructs the zones framework to forcibly create new ZFS storage pools for all zpool and rootzpool resources specified in the zone configuration.
The zoneadm uninstall subcommand has the following options:
This option instructs the zones framework to destroy a ZFS storage pool while uninstalling a zone. This mimics the behavior of zpool destroy poolname command. This option takes a zpoolname list:
The scope of this option is limited to the ZFS storage pools specified in the comma-separated list of zpool names, or specified by using the option multiple times, for example:
-x force-zpool-destroy=rpool,pool2,pool3 -x force-zpool-destroy=pool1 -x force-zpool-destroy=pool2
The name arguments correspond to the name property specified in the zone configuration for the desired zpool resource. The name rpool is used to specify the ZFS storage pool associated with the rootzpool resource.
This option instructs the zones framework to destroy the ZFS storage pools of all zpool and rootzpool resources specified in the zone configuration when uninstalling the zone.
Note that the options to force the zones framework to destroy ZFS storage pools when uninstalling a zone should be used with caution. Even though you might want to uninstall a zone in the current, active boot environment (BE), there could be other zone boot environments (ZBEs) within this ZFS storage pool that belong to currently inactive boot environments. Destroying the ZFS storage pool associated with a rootzpool resource will make the zone unavailable to all boot environments that carry this zone in the installed state. For more information about zone boot environments, refer to the beadm(8) man page.
Specify this option to destroy storage. Note that not all storage URI types support this operation. You can destroy storage referenced by file or NFS storage URIs, but not storage referenced by dev, iSCSI, or lu storage URIs.
For zones that are configured with a rootzpool resource, the zoneadm move command cannot change the path name of the ZFS storage pool. However, the zoneadm move command can change the underlying storage devices of the ZFS storage pool.