Exporting a Veritas volume to a guest domain from the control domain

Use the following procedure to migrate a VxVM disk group from a non-LDom environment to an LDom environment.

Note:

This section applies to only the Split Storage Foundation model.

In the following example control domain is named "primary" and the guest domain is named "ldom1." The prompts in each step show in which domain to run the command.

To create virtual disks on top of the Veritas Volume Manager data volumes using the ldm command

  1. The VxVM diskgroup on the target LDom host is imported in the control domain, after which volumes are visible from inside the control domain.

    See the Veritas Volume Manager Administrator's Guide to move disk groups between systems.

  2. In the control domain (primary), configure a service exporting the VxVM volume containing a VxFS or UFS filesystem as a slice using the options=slice option:

    primary# ldm add-vdiskserverdevice options=slice \ 
    /dev/vx/dsk/dg-name/volume_name \ 
    volume_name volume_name@primary-vds0

    Caution:

    With Solaris 10, Update 5 and LDoms 1.1, a volume by default shows up as a full disk in the guest. The Virtual Disk Client driver writes a VTOC on block 0 of the virtual disk, which will end up as a WRITE on block 0 of the VxVM volume. This can potentially cause data corruption, because block 0 of the VxVM volume contains user data. Using options=slice exports a volume as a slice to the guest and does not cause any writes to block 0, therefore preserving user data.

  3. Add the exported disk to a guest LDom:

    primary# ldm add-vdisk vdisk1 volume_name
    volume_name@primary-vds0 ldom1
  4. Start the guest domain, and ensure that the new virtual disk is visible.

    primary# ldm bind ldom1
    primary# ldm start ldom1
  5. If the new virtual disk device node entires do not show up in the/dev/[r]dsk directories, then run the devfsadm command in the guest domain:

    ldom1# devfsadm -C

    In this example, the new disk appears as /dev/[r]dsk/c0d1s0.

    ldom1# ls -l /dev/dsk/c0d1s0
    lrwxrwxrwx 1 root root 62 Sep 11 13:30 /dev/dsk/c0d1s0 ->
    ../../devices/virtual-devices@100/channel-devices@200/disk@1:a
  6. Mount the file system on the disk to access the application data:

    ldom1# mount -F vxfs /dev/dsk/c0d1s0 /mnt
    ldom1# mount -F ufs /dev/dsk/c0d1s0 /mnt