Go to main content
Oracle® Solaris Cluster 4.3 System Administration Guide

Exit Print View

Updated: June 2017
 
 

How to Add and Register a Replicated Device Group (ZFS)

Use this procedure to create a replicated ZFS device group that is managed by HAStoragePlus.

To create a ZFS storage pool (zpool) that does not use HAStoragePlus, instead go to How to Configure a Local ZFS Storage Pool Without HAStoragePlus.

Before You Begin

To replicate ZFS, you must create a named device group and list the disks that belong to the zpool. A device can belong to only one device group at a time, so if you already have an Oracle Solaris Cluster device group that contains the device, you must delete the group before you add that device to a new ZFS device group.

The name of the Oracle Solaris Cluster device group that you create (Solaris Volume Manager or raw-disk) must be the same as the name of the replicated device group.

  1. Delete the default device groups that correspond to the devices in the zpool.

    For example, if you have a zpool called mypool that contains two devices /dev/did/dsk/d2 and /dev/did/dsk/d13, you must delete the two default device groups called d2 and d13.

    # cldevicegroup offline dsk/d2 dsk/d13
    # cldevicegroup delete dsk/d2 dsk/d13
  2. Create a named device group with DIDs that correspond to those in the device group you removed in Step 1.
    # cldevicegroup create -n pnode1,pnode2 -d d2,d13 -t rawdisk mypool

    This action creates a device group called mypool (with the same name as the zpool), which manages the raw devices /dev/did/dsk/d2 and /dev/did/dsk/d13.

  3. Create a zpool that contains those devices.
    # zpool create mypool mirror /dev/did/dsk/d2 /dev/did/dsk/d13
  4. Create a resource group to manage migration of the replicated devices (in the device group) with only global zones in its nodelist.
    # clresourcegroup create -n pnode1,pnode2 migrate_srdfdg-rg
  5. Create an hasp-rs resource in the resource group you created in Step 4, setting theglobaldevicepaths property to a device group of type raw-disk.

    You created this device in Step 2.

    # clresource create -t HAStoragePlus -x globaldevicepaths=mypool \
    -g migrate_srdfdg-rg hasp2migrate_mypool
  6. Set the +++ value in the rg_affinities property from this resource group to the resource group you created in Step 4.
    # clresourcegroup create -n pnode1,pnode2 \
    -p RG_affinities=+++migrate_srdfdg-rg oracle-rg
  7. Create an HAStoragePlus resource (hasp-rs) for the zpool you created in Step 3 in the resource group that you created in either Step 4 or Step 6.

    Set the resource_dependencies property to the hasp-rs resource that you created in Step 5.

    # clresource create -g oracle-rg -t HAStoragePlus -p zpools=mypool \
    -p resource_dependencies=hasp2migrate_mypool \
    -p ZpoolsSearchDir=/dev/did/dsk hasp2import_mypool
  8. Use the new resource group name where a device group name is required.