Go to main content

Using Oracle® Compute Cloud Service - Dedicated Compute Capacity - SPARC Model 300

Exit Print View

Updated: April 2018

Prepare a Volume for Use With Zones

After you create a volume (LUN), you can prepare it for exclusive use by a zone.

By default, zone creation provides storage by automatically creating a ZFS filesystem in the Global Zone that contains all of the storage for the zone. This behavior is not optimal for zones created in the OPC environment since local storage is limited and use of local storage prevents migration of zones between instances. For OPC zones, configure zones to use volumes (iSCSI LUNs) provided by the ZFSSA as they can be shared and duplicated more easily.

Complete these steps to remove the default storage that is allocated to a zone and instead configure use of a disk volume (iSCSI LUN).

  1. Log in to the CLI with root privileges.
  2. Identify the disks that are available on the instance for use by zones.

    To exit the prompt after viewing the necessary information, press the ctrl+c key combination.

    root@opc-192-168-50-6:~# format
    Searching for disks...done
    0. c0t600144F0E196E8460000579DD8CE0003d0 <SUN-ZFS Storage 7330-1.0 cyl 323 alt 2 hd 254 sec 254>
    1. c1d0 <SUN-DiskImage-20GB cyl 27902 alt 2 hd 96 sec 768>
    Specify disk (enter its number): ^C

    In this example:

    • Disk0 is c0t600144F0E196E8460000579DD8CE0003d0, which comes from the SUN-ZFS storage appliance.

    • Disk1 is c1d0 and is the local boot disk.


      Caution  -  Use extreme caution with this local boot disk. Damaging the data on this disk may render the whole compute instance unbootable, which would require you to open a service request (SR) with Oracle to repair/reinstall the instance.

      For information about using Oracle Solaris Zones on shared storage, refer to Getting Started With Oracle Solaris Zones on Shared Storage.

  3. Determine the URI that can be used to provide this disk to a zone.
    root@opc-192-168-50-6:~# suriadm lookup-uri /dev/dsk/c0t600144F0E196E8460000579DD8CE0003d0

    The list of available URIs that correspond to the volume includes several options, but the one that includes the volume GUID number (iscsi:// is preferred.

  4. Add the URI-described disk to the zone configuration.

    The process of adding storage devices to native, legacy support (branded) or kernel zones does not modify the zones boot location it only adds additional storage on an ISCSI LUN. By default a dedicated ZFS filesystem is created in the Global Zone to host the zones root pool information, this filesystem is mounted at /system/zones/zone-name in the global zone. In order to have the zone boot from dedicated disks rather than space shared from the Global Zone, please follow the guidance in Configure an iSCSI LUN as a Native or Branded Zone Root Pool or Configure an iSCSI LUN as a Kernel Zone Root Pool.

    root@opc-192-168-50-6:~# zonecfg -z testzone
    Use 'create' to begin configuring a new zone.
    zonecfg:testzone> create
    create: Using system default template 'SYSdefault'
    zonecfg:testzone> add device
    zonecfg:testzone:device> set storage=iscsi://
    zonecfg:testzone:device> end
    zonecfg:testzone> commit
    zonecfg:testzone> exit