Sun Cluster System Administration Guide for Solaris OS

ProcedureHow to Add and Register a Device Group (Solaris Volume Manager)

Use the metaset command to create a Solaris Volume Manager disk set and register the disk set as a Sun Cluster device group. When you register the disk set, the name that you assigned to the disk set is automatically assigned to the device group.

The phys-schost# prompt reflects a global-cluster prompt. Perform this procedure on a global cluster.

This procedure provides the long forms of the Sun Cluster commands. Most commands also have short forms. Except for the long and short forms of the command names, the commands are identical. For a list of the commands and their short forms, see Appendix B, Sun Cluster Object-Oriented Commands.


Caution – Caution –

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


  1. Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on one of the nodes connected to the disks where you are creating the disk set.

  2. SPARC: Solaris 9 only: Calculate the number of names for Solstice DiskSuite metadevices or Solaris Volume Manager volumes that you need for your configuration, and modify the /kernel/drv/md.conf file on each node. This step is not required if you are running on Solaris 10.

    See “How to Set the Number of Metadevice or Volume Names and Disksets ” in Sun Cluster Software Installation Guide for Solaris OS.

  3. Add the Solaris Volume Manager disk set and register it as a device group with Sun Cluster. To create a multi-owner disk group, use the –M option.


    # metaset -s diskset -a -M -h nodelist
    
    -s diskset

    Specifies the disk set to be created.

    -a -h nodelist

    Adds the list of nodes that can master the disk set.

    -M

    Designates the disk group as multi-owner.


    Note –

    Running the metaset command to set up a Solstice DiskSuite/Solaris Volume Manager device group on a cluster results in one secondary by default, regardless of the number of nodes that are included in that device group. You can change the desired number of secondary nodes by using the clsetup utility after the device group has been created. Refer to How to Set the Desired Number of Secondaries for a Device Group for more information about disk failover.


  4. If you are configuring a replicated device group, set the replication property for the device group.


    # cldevicegroup sync devicegroup
    
  5. Verify that the device group has been added.

    The device group name matches the disk set name that is specified with metaset.


    # cldevicegroup list
    
  6. List the DID mappings.


    # cldevice show | grep Device
    
    • Choose drives that are shared by the cluster nodes that will master or potentially master the disk set.

    • Use the full DID device name, which has the form /dev/did/rdsk/dN, when you add a drive to a disk set.

    In the following example, the entries for DID device /dev/did/rdsk/d3 indicate that the drive is shared by phys-schost-1 and phys-schost-2.


    === DID Device Instances ===                   
    DID Device Name:                                /dev/did/rdsk/d1
      Full Device Path:                               phys-schost-1:/dev/rdsk/c0t0d0
    DID Device Name:                                /dev/did/rdsk/d2
      Full Device Path:                               phys-schost-1:/dev/rdsk/c0t6d0
    DID Device Name:                                /dev/did/rdsk/d3
      Full Device Path:                               phys-schost-1:/dev/rdsk/c1t1d0
      Full Device Path:                               phys-schost-2:/dev/rdsk/c1t1d0
    …
  7. Add the drives to the disk set.

    Use the full DID path name.


    # metaset -s setname -a /dev/did/rdsk/dN
    
    -s setname

    Specifies the disk set name, which is the same as the device group name.

    -a

    Adds the drive to the disk set.


    Note –

    Do not use the lower-level device name (cNtXdY) when you add a drive to a disk set. Because the lower-level device name is a local name and not unique throughout the cluster, using this name might prevent the metaset from being able to switch over.


  8. Verify the status of the disk set and drives.


    # metaset -s setname
    

Example 5–22 Adding a Solaris Volume Manager Device Group

The following example shows the creation of the disk set and device group with the disk drives /dev/did/rdsk/d1 and /dev/did/rdsk/d2 and verifies that the device group has been created.


# metaset -s dg-schost-1 -a -h phys-schost-1

# cldevicegroup list
dg-schost-1 
metaset -s dg-schost-1 -a /dev/did/rdsk/d1 /dev/did/rdsk/d2