Go to main content

Creating and Using Oracle® Solaris Kernel Zones

Exit Print View

Updated: August 2021

Managing Kernel Zone Storage Devices and Boot Order

The root of a kernel zone is always accessible and by default is a 16GB ZFS volume. To increase the disk space, you can enlarge the root disk as described in Managing Kernel Zone Memory. Or, you can add storage devices. Devices are portable across systems and provide increased performance over ZFS volumes.

    Additional kernel zone storage devices have the following requirements:

  • The full storage device path (for example, /dev/dsk/c9t0d0) must be specified.

  • The storage device must be defined by a valid storage URI.

  • The storage device must be a whole disk or LUN.

Use the bootpri property of the device resource type to specify the boot order of each storage device. Set the bootpri property to any positive integer value.

Caution  -  The bootpri property must be set only on a boot device. If the bootpri property is set on devices other than boot devices, data corruption might result.

To unset the bootpri property, use the zonecfg clear bootpri command.

The default boot order of each device is determined by sorting devices first by the bootpri property value, then by the id property value if multiple devices have the same bootpri value.

If multiple bootable devices are present during installation, the devices will be used for a mirrored ZFS pool in the zone.

Example 10  Adding Storage Devices to a Kernel Zone

This example shows how to add the storage device /dev/dsk/c9t0d0 to the kernel zone kzone1.

global$ pfbash zonecfg -z kzone1
zonecfg:kzone1> add device
zonecfg:kzone1:device> set storage=dev:/dev/dsk/c9t0d0
zonecfg:kzone1:device> set bootpri=4
zonecfg:kzone1:device> end
Example 11  Changing the Kernel Zone Default Boot Device to Use a Storage URI:

This example shows how to change the default boot device on the kernel zone kzone1 to use a storage URI located at iscsi://zfssa/luname.naa.600144F0DBF8AF19000052E820D60003.

global$ pfbash zonecfg -z kzone1
zonecfg:kzone1> select device id=0
zonecfg:kzone1:device> set storage=iscsi://zfssa/luname.naa.600144F0DBF8AF19000052E820D60003
zonecfg:kzone1:device> end
zonecfg:kzone1> info device
       storage: iscsi://zfssa/luname.naa.600144F0DBF8AF19000052E820D60003
       id: 0
       bootpri: 0