Go to main content

Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: August 2019
 
 

Assigning Shared Storage Resources to Oracle Solaris Zones

Assign shared storage resources to zones in the zone configuration by using storage URIs to describe the location of a storage object.

Two zone configuration resource types, rootzpool, and zpool, and a property type, storage, are used to assign shared storage resources to a particular Oracle Solaris Zone. These are configured and maintained with the zonecfg.

storage Property for Zones

    When using shared storage resources, the storage property defines the location of the storage object in a host-independent format by using storage URIs. The following storage URIs are currently supported by the Oracle Solaris Zones framework in Oracle Solaris:

  • dev: local device path storage URI, DAS

  • iscsi: iSCSI storage URI

  • lu: Fibre Channel (FC) and Serial Attached SCSI (SAS)

The storage property is managed using the following zonecfg subcommands from within a rootzpool or zpool resource scope:

zonecfg:zonename:zpool> add storage URI-string
zonecfg:zonename:zpool> remove storage URI-string

rootzpool Resource

The rootzpool resource is a dedicated ZFS storage pool for a zone. The entire zone installation is encapsulated into its own dedicated ZFS storage pool. This ZFS storage pool will be composed of shared storage resources.

The rootzpool resource must specify at least one storage property. Multiple storage properties can be specified to describe redundant ZFS storage pool configurations. Note that there can be only one rootzpool resource per zone configuration.

The ZFS storage pool name for a rootzpool resource will be automatically assigned as zonename_rpool. The name cannot be changed. The rootzpool resource is managed by using the following zonecfg subcommands from the global resource scope:

zonecfg:zonename> add rootzpool
zonecfg:zonename:rootzpool> add storage URI-string
zonecfg:zonename:rootzpool> end

zonecfg:zonename> remove rootzpool

zonecfg:zonename> select rootzpool storage=URI-string

zonecfg:zonename> info rootzpool

zpool Resource

The zpool resource describes a ZFS storage pool composed of shared storage resources that is delegated to the Oracle Solaris Zone. The zpool resource will specify at least one storage property. Multiple storage properties can be specified to describe redundant ZFS storage pool configurations. There can be multiple zpool resources defined for a zone configuration.

The ZFS storage pool name for a zpool resource is assigned by combining the zone name and the specified name property, as zonename_name. For the name property, the zonecfg will verify that the string is eligible for a ZFS storage name and a ZFS dataset name. The string rpool is not permitted and cannot be used for this property.

The zpool resource is managed using the following zonecfg subcommands from the global resource scope:

zonecfg:zonename> add zpool
zonecfg:zonename:zpool> add storage URI-string
zonecfg:zonename:zpool> set name=name-string
zonecfg:zonename:zpool> end

zonecfg:zonename> remove zpool
zonecfg:zonename> remove zpool name=name-string
zonecfg:zonename> remove zpool storage=URI-string

zonecfg:zonename> select zpool storage=URI-string

zonecfg:zonename> info zpool
zonecfg:zonename> info zpool name=name-string
zonecfg:zonename> info zpool storage=URI-string

Renaming Zones

You can use the zoneadm command to rename a zone that is in either the configured or the installed state.

global$ zoneadm -z zonename rename new-zonename

In addition, you can use the zonecfg command to rename a zone that is in the configured state.

zonecfg:zonename> set zonename=new-zonename

Relocating Shared Storage Resource

To alter a storage resource URI within a rootzpool or zpool resource when the location description changes for an existing shared storage resource, use the zonecfg remove storage old-URI command syntax followed by the add storage new-URI command.