Logical Domains 1.3 Administration Guide

ProcedureExport a ZFS Volume as a Single Slice Disk

  1. Create a ZFS volume to use as a single slice disk.

    The following example shows how to create a ZFS volume, zdisk0, to use as a single slice disk.

    service# zfs create -V 100m ldoms/domain/test/zdisk0

    The size of the volume defines the size of the virtual disk. This example creates a 100-megabyte volume to get a 100-megabyte virtual disk.

  2. From the control domain, export the corresponding device to that ZFS volume, and set the slice option so that the volume is exported as a single slice disk.

    primary# ldm add-vdsdev options=slice /dev/zvol/dsk/ldoms/domain/test/zdisk0 \
  3. From the control domain, assign the volume to a guest domain.

    The following shows how to assign the volume, zdisk0, to guest domain ldg1.

    primary# ldm add-vdisk zdisk0 zdisk0@primary-vds0 ldg1
  4. After the guest domain is started and running the Solaris OS, you can list the disk (c0d9, for example) and see that the disk is accessible and is a single slice disk (s0).

    ldg1# ls -1 /dev/dsk/c0d9s*