This chapter provides information about and procedures for administering global devices, disk-path monitoring and cluster file systems.
Overview of Administering Global Devices and the Global Namespace
Administering the SCSI Protocol Settings for Storage Devices
For a high-level description of the related procedures in this chapter, see Table 5–3.
For conceptual information related to global devices, the global namespace, device groups, disk-path monitoring, and the cluster file system, see Sun Cluster Concepts Guide for Solaris OS.
Administration of Sun Cluster device groups depends on the volume manager that is installed on the cluster. Solaris Volume Manager is “cluster-aware,” so you add, register, and remove device groups by using the Solaris Volume Manager metaset(1M) command. If you are using VERITAS Volume Manager (VxVM), you create disk groups by using VxVM commands. You register the disk groups as Sun Cluster device groups with the clsetup utility. When removing VxVM device groups, you use both the clsetup command and VxVM commands.
For the Solaris 10 OS, global devices are not directly accessible from non-global zones.
Sun Cluster software automatically creates a raw-disk device group for each disk and tape device in the cluster. However, cluster device groups remain in an offline state until you access the groups as global devices. When administering device groups, or volume manager disk groups, you need to be on the cluster node that is the primary node for the group.
Normally, you do not need to administer the global device namespace. The global namespace is automatically set up during installation and automatically updated during Solaris OS reboots. However, if the global namespace needs to be updated, you can run the cldevice populate command from any cluster node. This command causes the global namespace to be updated on all other cluster node members, as well as on nodes that might join the cluster in the future.
Changes made to global device permissions are not automatically propagated to all the nodes in the cluster for Solaris Volume Manager and disk devices. If you want to change permissions on global devices, you must manually change the permissions on all the nodes in the cluster. For example, if you want to change permissions on global device /dev/global/dsk/d3s0 to 644, you must issue the following command on all nodes in the cluster:
# chmod 644 /dev/global/dsk/d3s0
VxVM does not support the chmod command. To change global device permissions in VxVM, consult the VxVM administrator's guide.
You must consider the following issues when completing dynamic reconfiguration (DR) operations on disk and tape devices in a cluster.
All of the requirements, procedures, and restrictions that are documented for the Solaris DR feature also apply to Sun Cluster DR support. The only exception is for the operating system quiescence operation. Therefore, review the documentation for the Solaris DR feature before using the DR feature with Sun Cluster software. You should review in particular the issues that affect nonnetwork IO devices during a DR detach operation.
Sun Cluster rejects DR remove-board operations on active devices in the primary node. DR operations can be performed on inactive devices in the primary node and on any devices in the secondary nodes.
After the DR operation, cluster data access continues as before.
Sun Cluster rejects DR operations that impact the availability of quorum devices. See Dynamic Reconfiguration With Quorum Devices for more information.
If the current primary node fails while you are performing the DR operation on a secondary node, cluster availability is impacted. The primary node will have no place to fail over until a new secondary node is provided.
To perform DR operations on global devices, complete the following steps in the order indicated.
Table 5–1 Task Map: Dynamic Reconfiguration With Disk and Tape Devices
Task |
For Instructions |
---|---|
1. If a DR operation that affects an active device group must be performed on the current primary node, switch the primary and secondary nodes before performing the DR remove operation on the device. | |
2. Perform the DR removal operation on the device being removed. |
Sun Enterprise 10000 DR Configuration Guide and the Sun Enterprise 10000 Dynamic Reconfiguration Reference Manual in the Solaris 9 on Sun Hardware, and Solaris 10 on Sun Hardware collections. |
For Sun Cluster to maintain the VxVM namespace, you must register any VxVM disk group or volume changes as Sun Cluster device group configuration changes. Registering these changes ensures that the namespace on all cluster nodes is updated. Examples of configuration changes that impact the namespace include adding, removing, or renaming a volume. Changing the volume permissions, owner, or group ID also impacts the namespace.
Never import or deport VxVM disk groups by using VxVM commands after the disk group has been registered with the cluster as a Sun Cluster device group. The Sun Cluster software handles all cases where disk groups need to be imported or be deported.
Each VxVM disk group must have a cluster-wide unique minor number. By default, when a disk group is created, VxVM chooses a random number that is a multiple of 1000 as that disk group's base minor number. For most configurations with only a small number of disk groups, the minor number is sufficient to guarantee uniqueness. The minor number for a newly created disk group might conflict with the minor number of a pre-existing disk group that was imported on a different node. In this case, attempting to register the Sun Cluster device group fails. To fix this problem, the new disk group should be given a new minor number that is a unique value and then registered as a Sun Cluster device group.
If you are setting up a mirrored volume, Dirty Region Logging (DRL) can be used to decrease volume recovery time after a node failure. Use of DRL is strongly recommended, although use of DRL could decrease I/O throughput.
VxVM does not support the chmod command. To change global device permissions in VxVM, consult the VxVM administrator's guide.
Sun Cluster 3.2 software does not support the VxVM Dynamic Multipathing (DMP) management of multiple paths from the same node.
If you use VxVM to set up shared disk groups for Oracle Parallel Server or Oracle RAC, use the cluster functionality of VxVM as described in the VERITAS Volume Manager Administrator's Reference Guide. Creating shared disk groups for Oracle Parallel Server or Oracle RAC differs from creating other disk groups. You must import the Oracle Parallel Server or Oracle RAC shared disk groups by using vxdg -s. You do not register the Oracle Parallel Server or Oracle RAC shared disk groups with the cluster framework. To create other VxVM disk groups, see SPARC: How to Create a New Disk Group When Initializing Disks (VERITAS Volume Manager).
You can configure a Sun Cluster device group to contain devices that are replicated by using storage-based replication. Sun Cluster supports Hitachi TrueCopy software for storage-based replication.
Before you can replicate data with Hitachi TrueCopy software, you must be familiar with the Hitachi TrueCopy documentation and have the Hitachi TrueCopy product and the latest Hitachi TrueCopy patches installed on your system. For information about installing the Hitachi TrueCopy software, see the Hitachi TrueCopy product documentation.
The Hitachi TrueCopy software configures a pair of devices as replicas with one device as the primary replica and the other device as the secondary replica. At any given time, the device attached to one set of nodes will be the primary replicas. The device attached to the other set of nodes will be the secondary replica.
In Sun Cluster, the primary replica is automatically moved whenever the Sun Cluster device group to which the replica belongs is moved. Therefore, the replica primary should never be moved in Sun Cluster by issuing a horcmtakeover directly. Rather, the takeover should be accomplished by moving the associated Sun Cluster device group.
The following table lists the tasks you must perform to set up a storage-based replicated device.
Table 5–2 Task Map: Administering a Storage-Based Replicate Device
Task |
Instructions |
---|---|
Install the TrueCopy software on your storage device and nodes. |
The documentation that shipped with your Hitachi storage device. |
Configure the Hitachi replication group. | |
Configure the DID device. | |
Register the replicated group. |
How to Add and Register a Device Group (Solaris Volume Manager) |
Verify the configuration. |
First, configure the Hitachi TrueCopy device groups on shared disks in the primary cluster. This configuration information is specified in the/etc/horcm.conf file on each of the cluster's nodes that has access to the Hitachi array. For more information about how to configure the /etc/horcm.conf file, see the Sun StorEdge SE 9900 V Series Command and Control Interface User and Reference Guide.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on the node connected to the storage array.
Add the horcm entry to the /etc/services file.
horcm 9970/udp |
Specify a port number and protocol name for the new entry.
Specify the Hitachi TrueCopy device group configuration information in the /etc/horcm.conf file.
For instructions, refer to the documentation that shipped with your TrueCopy software.
Start the TrueCopy CCI daemon by running the horcmstart.sh command on all nodes.
# /usr/bin/horcmstart.sh |
If you have not already created the replica pairs, create them now.
Use the paircreate command to create your replica pairs with the desired fence level. For instructions on creating the replica pairs, refer to your TrueCopy documentation.
On each node configured with replicated devices, verify that data replication is set up correctly by using the pairdisplay command.
# pairdisplay -g group-name Group PairVol(L/R) (Port#,TID,LU),Seq#,LDEV#,P/S,Status,Fence,Seq#,P-LDEV# M group-name pair1(L) (CL1-C , 0, 9) 54321 58..P-VOL PAIR DATA ,12345 29 - group-name pair1(R) (CL1-A , 0, 29)12345 29..S-VOL PAIR DATA ,----- 58 - |
Verify that all nodes can master the replication groups.
Determine which node contains the primary replica and which node contains the secondary replica by using the pairdisplay command.
# pairdisplay -g group-name Group PairVol(L/R) (Port#,TID,LU),Seq#,LDEV#,P/S,Status,Fence,Seq#,P-LDEV# M group-name pair1(L) (CL1-C , 0, 9) 54321 58..P-VOL PAIR DATA ,12345 29 - group-name pair1(R) (CL1-A , 0, 29)12345 29..S-VOL PAIR DATA ,----- 58 - |
The node with the local (L) device in the P-VOL state contains the primary replica and the node with the local (L) device in the S-VOL state contains the secondary replica.
Make the secondary node the master by running the horctakeover command on the node that contains the secondary replica.
# horctakeover -g group-name |
Wait for the initial data copy to complete before proceeding to the next step.
Verify that the node that performed the horctakeover now has the local (L) device in the P-VOL state.
# pairdisplay -g group-name Group PairVol(L/R) (Port#,TID,LU),Seq#,LDEV#,P/S,Status,Fence,Seq#,P-LDEV# M group-name pair1(L) (CL1-C , 0, 9) 54321 58..S-VOL PAIR DATA ,12345 29 - group-name pair1(R) (CL1-A , 0, 29)12345 29..P-VOL PAIR DATA ,----- 58 - |
Run the horctakeover command on the node that originally contained the primary replica.
# horctakeover -g group-name |
Verify that the primary node has changed back to the original configuration by running the pairdisplay command.
# pairdisplay -g group-name Group PairVol(L/R) (Port#,TID,LU),Seq#,LDEV#,P/S,Status,Fence,Seq#,P-LDEV# M group-name pair1(L) (CL1-C , 0, 9) 54321 58..P-VOL PAIR DATA ,12345 29 - group-name pair1(R) (CL1-A , 0, 29)12345 29..S-VOL PAIR DATA ,----- 58 - |
Continue the configuration of your replicated device by following the instructions in How to Configure DID Devices for Replication.
After you have configured a device group for your replicated device, you must configure the device identifier (DID) driver that the replicated device uses.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node of the cluster.
Confirm that the horcm daemon is running on all nodes.
# /usr/bin/horcmstart.sh |
Determine which node contains the secondary replica by running the pairdisplay command.
# pairdisplay -g group-name Group PairVol(L/R) (Port#,TID,LU),Seq#,LDEV#,P/S,Status,Fence,Seq#,P-LDEV# M group-name pair1(L) (CL1-C , 0, 9) 54321 58..P-VOL PAIR DATA ,12345 29 - group-name pair1(R) (CL1-A , 0, 29)12345 29..S-VOL PAIR DATA ,----- 58 - |
The node with the local (L) device in the S-VOL state contains the secondary replica.
On the node with secondary replica (as determined by the previous step), configure the DID devices for use with storage-based replication.
This command combines the two separate DID instances for the device replica pairs into a single, logical DID instance. The single instance enables the device to be used by volume management software from both nodes.
If multiple nodes are connected to the secondary replica, run this command on only one of these nodes.
# cldevice replicate -D primary-replica-nodename -S secondary replica-nodename |
Specifies the name of the remote node that contains the primary replica.
Specifies a source node other than the current node.
Specifies the name of the remote node that contains the secondary replica.
By default, the current node is the source node. Use the -S option to specify a different source node.
Verify that the DID instances have been combined.
# cldevice list -v device |
Verify that the TrueCopy replication is set.
# cldevice show device | |
If the DID remapping did not successfully combine all replicated devices, combine the individual replicated devices manually.
Exercise extreme care when combining DID instances manually. Improper device remapping can cause data corruption.
On the node that contains the secondary replica, run the cldevice combine command. This node must be local.
# cldevice combine -d destination-instance source-instance |
The remote DID instance, which corresponds to the primary replica.
The local DID instance, which corresponds to the secondary replica.
Verify that the DID remapping occurred successfully.
# cldevice list desination-instance source-instance |
One of the DID instances should not be listed.
On all nodes, verify that the DID devices for all combined DID instances are accessible.
# cldevice list -v |
To complete the configuration of your replicated device group, perform the steps in the following procedures.
How to Add and Register a Device Group (Solaris Volume Manager) or SPARC: How to Register a Disk Group as a Device Group (VERITAS Volume Manager)
When registering the device group, make sure to give it the same name as the TrueCopy replication group.
Before you verify the global device group, you must first create them. For information about creating a Solstice DiskSuite or Solaris Volume Manager device group, see How to Add and Register a Device Group (Solaris Volume Manager). For information about creating a VERITAS Volume Manager device group, see SPARC: How to Create a New Disk Group When Encapsulating Disks (VERITAS Volume Manager).
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 A, Sun Cluster Object-Oriented Commands.
Verify that the primary device group corresponds to the same node as the node that contains the primary replica.
# pairdisplay -g group-name # cldevicegroup status -n nodename group-name |
Perform a trial switchover to ensure that the device groups are configured correctly and the replicas can move between nodes.
If the device group is offline, bring it online.
# cldevicegroup switch -n nodename group-name |
The node to which the device group is switched. This node becomes the new primary
Verify that the switchover was successful by comparing the output of the following commands.
# pairdisplay -g group-name # cldevicegroup status -n nodename group-name |
This example completes the Sun Cluster specific steps necessary to set up TrueCopy replication in your cluster. The example assumes that you have already performed the following tasks:
Set up your Hitachi LUNs
Installed the TrueCopy software on your storage device and cluster nodes
Configured the replication pairs on your cluster nodes
For instructions about configuring your replication pairs, see How to Configure a Hitachi TrueCopy Replication Group.
This example involves a three-node cluster that uses TrueCopy. The cluster is spread across two remote sites, with two nodes at one site and one node at the other site. Each site has its own Hitachi storage device.
The following examples show the TrueCopy /etc/horcm.conf configuration file on each node.
HORCM_DEV #dev_group dev_name port# TargetID LU# MU# VG01 pair1 CL1-A 0 29 VG01 pair2 CL1-A 0 30 VG01 pair3 CL1-A 0 31 HORCM_INST #dev_group ip_address service VG01 node-3 horcm |
HORCM_DEV #dev_group dev_name port# TargetID LU# MU# VG01 pair1 CL1-A 0 29 VG01 pair2 CL1-A 0 30 VG01 pair3 CL1-A 0 31 HORCM_INST #dev_group ip_address service VG01 node-3 horcm |
HORCM_DEV #dev_group dev_name port# TargetID LU# MU# VG01 pair1 CL1-C 0 09 VG01 pair2 CL1-C 0 10 VG01 pair3 CL1-C 0 11 HORCM_INST #dev_group ip_address service VG01 node-1 horcm VG01 node-2 horcm |
In the preceding examples, three LUNs are replicated between the two sites. The LUNs are all in a replication group named VG01. The pairdisplay command verifies this information and shows that Node 3 has the primary replica.
# pairdisplay -g VG01 Group PairVol(L/R) (Port#,TID,LU),Seq#,LDEV#.P/S,Status,Fence, Seq#,P-LDEV# M VG01 pair1(L) (CL1-A , 0, 29)61114 29..S-VOL PAIR DATA ,----- 58 - VG01 pair1(R) (CL1-C , 0, 9)20064 58..P-VOL PAIR DATA ,61114 29 - VG01 pair2(L) (CL1-A , 0, 30)61114 30..S-VOL PAIR DATA ,----- 59 - VG01 pair2(R) (CL1-C , 0, 10)20064 59..P-VOL PAIR DATA ,61114 30 - VG01 pair3(L) (CL1-A , 0, 31)61114 31..S-VOL PAIR DATA ,----- 60 - VG01 pair3(R) (CL1-C , 0, 11)20064 60..P-VOL PAIR DATA ,61114 31 - |
# pairdisplay -g VG01 Group PairVol(L/R) (Port#,TID,LU),Seq#,LDEV#.P/S,Status,Fence, Seq#,P-LDEV# M VG01 pair1(L) (CL1-A , 0, 29)61114 29..S-VOL PAIR DATA ,----- 58 - VG01 pair1(R) (CL1-C , 0, 9)20064 58..P-VOL PAIR DATA ,61114 29 - VG01 pair2(L) (CL1-A , 0, 30)61114 30..S-VOL PAIR DATA ,----- 59 - VG01 pair2(R) (CL1-C , 0, 10)20064 59..P-VOL PAIR DATA ,61114 30 - VG01 pair3(L) (CL1-A , 0, 31)61114 31..S-VOL PAIR DATA ,----- 60 - VG01 pair3(R) (CL1-C , 0, 11)20064 60..P-VOL PAIR DATA ,61114 31 - |
# pairdisplay -g VG01 Group PairVol(L/R) (Port#,TID,LU),Seq#,LDEV#.P/S,Status,Fence, Seq#,P-LDEV# M VG01 pair1(L) (CL1-C , 0, 9)20064 58..P-VOL PAIR DATA ,61114 29 - VG01 pair1(R) (CL1-A , 0, 29)61114 29..S-VOL PAIR DATA ,----- 58 - VG01 pair2(L) (CL1-C , 0, 10)20064 59..P-VOL PAIR DATA ,61114 30 - VG01 pair2(R) (CL1-A , 0, 30)61114 30..S-VOL PAIR DATA ,----- 59 - VG01 pair3(L) (CL1-C , 0, 11)20064 60..P-VOL PAIR DATA ,61114 31 - VG01 pair3(R) (CL1-A , 0, 31)61114 31..S-VOL PAIR DATA ,----- 60 - |
To see which disks are being used, use the -fd option of the pairdisplay command as shown in the following examples.
# pairdisplay -fd -g VG01 Group PairVol(L/R) Device_File ,Seq#,LDEV#.P/S,Status,Fence,Seq#,P-LDEV# M VG01 pair1(L) c6t500060E8000000000000EEBA0000001Dd0s2 61114 29..S-VOL PAIR DATA ,----- 58 - VG01 pair1(R) c5t50060E800000000000004E600000003Ad0s2 20064 58..P-VOL PAIR DATA ,61114 29 - VG01 pair2(L) c6t500060E8000000000000EEBA0000001Ed0s2 61114 30..S-VOL PAIR DATA ,----- 59 - VG01 pair2(R) c5t50060E800000000000004E600000003Bd0s2 0064 59..P-VOL PAIR DATA ,61114 30 - VG01 pair3(L) c6t500060E8000000000000EEBA0000001Fd0s2 61114 31..S-VOL PAIR DATA ,----- 60 - VG01 pair3(R) c5t50060E800000000000004E600000003Cd0s2 20064 60..P-VOL PAIR DATA ,61114 31 - |
# pairdisplay -fd -g VG01 Group PairVol(L/R) Device_File ,Seq#,LDEV#.P/S,Status,Fence,Seq#,P-LDEV# M VG01 pair1(L) c5t500060E8000000000000EEBA0000001Dd0s2 61114 29..S-VOL PAIR DATA ,----- 58 - VG01 pair1(R) c5t50060E800000000000004E600000003Ad0s2 20064 58..P-VOL PAIR DATA ,61114 29 - VG01 pair2(L) c5t500060E8000000000000EEBA0000001Ed0s2 61114 30..S-VOL PAIR DATA ,----- 59 - VG01 pair2(R) c5t50060E800000000000004E600000003Bd0s2 20064 59..P-VOL PAIR DATA ,61114 30 - VG01 pair3(L) c5t500060E8000000000000EEBA0000001Fd0s2 61114 31..S-VOL PAIR DATA ,----- 60 - VG01 pair3(R) c5t50060E800000000000004E600000003Cd0s2 20064 60..P-VOL PAIR DATA ,61114 31 - |
# pairdisplay -fd -g VG01 Group PairVol(L/R) Device_File ,Seq#,LDEV#.P/S,Status,Fence ,Seq#,P-LDEV# M VG01 pair1(L) c5t50060E800000000000004E600000003Ad0s2 20064 58..P-VOL PAIR DATA ,61114 29 - VG01 pair1(R) c6t500060E8000000000000EEBA0000001Dd0s2 61114 29..S-VOL PAIR DATA ,----- 58 - VG01 pair2(L) c5t50060E800000000000004E600000003Bd0s2 20064 59..P-VOL PAIR DATA ,61114 30 - VG01 pair2(R) c6t500060E8000000000000EEBA0000001Ed0s2 61114 30..S-VOL PAIR DATA ,----- 59 - VG01 pair3(L) c5t50060E800000000000004E600000003Cd0s2 20064 60..P-VOL PAIR DATA ,61114 31 - VG01 pair3(R) c6t500060E8000000000000EEBA0000001Fd0s2 61114 31..S-VOL PAIR DATA ,----- 60 - |
These examples show that the following disks are being used:
On Node 1:
c6t500060E8000000000000EEBA0000001Dd0s2
c6t500060E8000000000000EEBA0000001Ed0s2
c6t500060E8000000000000EEBA0000001Fd0s
On Node 2:
c5t500060E8000000000000EEBA0000001Dd0s2
c5t500060E8000000000000EEBA0000001Ed0s2
c5t500060E8000000000000EEBA0000001Fd0s2
On Node 3:
c5t50060E800000000000004E600000003Ad0s2
c5t50060E800000000000004E600000003Bd0s2
c5t50060E800000000000004E600000003Cd0s2
To see the DID devices that corresponds to these disks, use the cldevice list command as shown in the following examples.
# cldevice list -v DID Device Full Device Path ---------- ---------------- 1 node-1:/dev/rdsk/c0t0d0 /dev/did/rdsk/d1 2 node-1:/dev/rdsk/c0t6d0 /dev/did/rdsk/d2 11 node-1:/dev/rdsk/c6t500060E8000000000000EEBA00000020d0 /dev/did/rdsk/d11 11 node-2:/dev/rdsk/c5t500060E8000000000000EEBA00000020d0 /dev/did/rdsk/d11 12 node-1:/dev/rdsk/c6t500060E8000000000000EEBA0000001Fd0 /dev/did/rdsk/d12 12 node-2:/dev/rdsk/c5t500060E8000000000000EEBA0000001Fd0 /dev/did/rdsk/d12 13 node-1:/dev/rdsk/c6t500060E8000000000000EEBA0000001Ed0 /dev/did/rdsk/d13 13 node-2:/dev/rdsk/c5t500060E8000000000000EEBA0000001Ed0 /dev/did/rdsk/d13 14 node-1:/dev/rdsk/c6t500060E8000000000000EEBA0000001Dd0 /dev/did/rdsk/d14 14 node-2:/dev/rdsk/c5t500060E8000000000000EEBA0000001Dd0 /dev/did/rdsk/d14 18 node-3:/dev/rdsk/c0t0d0 /dev/did/rdsk/d18 19 node-3:/dev/rdsk/c0t6d0 /dev/did/rdsk/d19 20 node-3:/dev/rdsk/c5t50060E800000000000004E6000000013d0 /dev/did/rdsk/d20 21 node-3:/dev/rdsk/c5t50060E800000000000004E600000003Dd0 /dev/did/rdsk/d21 22 node-3:/dev/rdsk/c5t50060E800000000000004E600000003Cd0 /dev/did/rdsk/d2223 23 node-3:/dev/rdsk/c5t50060E800000000000004E600000003Bd0 /dev/did/rdsk/d23 24 node-3:/dev/rdsk/c5t50060E800000000000004E600000003Ad0 /dev/did/rdsk/d24 |
When combining the DID instances for each pair of replicated devices, cldevice list should combine DID instance 12 with 22, instance 13 with 23 and instance 14 with 24. Because Node 3 has the primary replica, run the cldevice -T command from either Node 1 or Node 2. Always combine the instances from a node that has the secondary replica. Run this command from a single node only, not on both nodes.
The following example shows the output when combining DID instances by running the command on Node 1.
# cldevice replicate -D node-3 Remapping instances for devices replicated with node-3... VG01 pair1 L node-1:/dev/rdsk/c6t500060E8000000000000EEBA0000001Dd0 VG01 pair1 R node-3:/dev/rdsk/c5t50060E800000000000004E600000003Ad0 Combining instance 14 with 24 VG01 pair2 L node-1:/dev/rdsk/c6t500060E8000000000000EEBA0000001Ed0 VG01 pair2 R node-3:/dev/rdsk/c5t50060E800000000000004E600000003Bd0 Combining instance 13 with 23 VG01 pair3 L node-1:/dev/rdsk/c6t500060E8000000000000EEBA0000001Fd0 VG01 pair3 R node-3:/dev/rdsk/c5t50060E800000000000004E600000003Cd0 Combining instance 12 with 22 |
Checking the cldevice list output, the LUNs from both sites now have the same DID instance. Having the same DID instance makes each replica pair look like a single DID device, as the following example shows.
# cldevice list -v DID Device Full Device Path ---------- ---------------- 1 node-1:/dev/rdsk/c0t0d0 /dev/did/rdsk/d1 2 node-1:/dev/rdsk/c0t6d0 /dev/did/rdsk/d2 11 node-1:/dev/rdsk/c6t500060E8000000000000EEBA00000020d0 /dev/did/rdsk/d11 11 node-2:/dev/rdsk/c5t500060E8000000000000EEBA00000020d0 /dev/did/rdsk/d11 18 node-3:/dev/rdsk/c0t0d0 /dev/did/rdsk/d18 19 node-3:/dev/rdsk/c0t6d0 /dev/did/rdsk/d19 20 node-3:/dev/rdsk/c5t50060E800000000000004E6000000013d0 /dev/did/rdsk/d20 21 node-3:/dev/rdsk/c5t50060E800000000000004E600000003Dd0 /dev/did/rdsk/d21 22 node-1:/dev/rdsk/c6t500060E8000000000000EEBA0000001Fd0 /dev/did/rdsk/d1222 22 node-2:/dev/rdsk/c5t500060E8000000000000EEBA0000001Fd0 /dev/did/rdsk/d12 22 node-3:/dev/rdsk/c5t50060E800000000000004E600000003Cd0 /dev/did/rdsk/d22 23 node-1:/dev/rdsk/c6t500060E8000000000000EEBA0000001Ed0 /dev/did/rdsk/d13 23 node-2:/dev/rdsk/c5t500060E8000000000000EEBA0000001Ed0 /dev/did/rdsk/d13 23 node-3:/dev/rdsk/c5t50060E800000000000004E600000003Bd0 /dev/did/rdsk/d23 24 node-1:/dev/rdsk/c6t500060E8000000000000EEBA0000001Dd0 /dev/did/rdsk/d24 24 node-2:/dev/rdsk/c5t500060E8000000000000EEBA0000001Dd0 /dev/did/rdsk/d24 24 node-3:/dev/rdsk/c5t50060E800000000000004E600000003Ad0 /dev/did/rdsk/d24 |
The next step is to create the volume manager device group. Issue this command from the node that has the primary replica, in this example Node 3. Give the device group the same name as the replica group, as the following example shows.
# metaset -s VG01 -ah phys-deneb-3 # metaset -s VG01 -ah phys-deneb-1 # metaset -s VG01 -ah phys-deneb-2 # metaset -s VG01 -a /dev/did/rdsk/d22 # metaset -s VG01 -a /dev/did/rdsk/d23 # metaset -s VG01 -a /dev/did/rdsk/d24 # metaset Set name = VG01, Set number = 1 Host Owner phys-deneb-3 Yes phys-deneb-1 phys-deneb-2 Drive Dbase d22 Yes d23 Yes d24 Yes |
At this point the device group is usable, metadevices can be created, and the device group can be moved to any of the three nodes. However, to make switchovers and failovers more efficient, run cldevicegroup set to mark the device group as replicated in cluster configuration.
# cldevicegroup sync VG01 # cldevicegroup show VG01 === Device Groups=== Device Group Name VG01 Type: SVM failback: no Node List: phys-deneb-3, phys-deneb-1, phys-deneb-2 preferenced: yes numsecondaries: 1 device names: VG01 Replication type: truecopy |
Configuration of the replication group is complete with this step. To verify that the configuration was successful, perform the steps in How to Verify Replicated Global Device Group Configuration.
No special Sun Cluster commands are necessary for cluster file system administration. Administer a cluster file system as you would any other Solaris file system, using standard Solaris file-system commands, such as mount and newfs. Mount cluster file systems by specifying the -g option to the mount command. Cluster file systems can also be automatically mounted at boot. Cluster file systems are only visible from the global zone. If you require the cluster file system data to be accessible from a non-global zone, map the data to the non-global zone with zoneadm(1M)zoneadm or HAStoragePlus.
When the cluster file system reads files, the file system does not update the access time on those files.
The following restrictions apply to the cluster file-system administration:
The unlink(1M) command is not supported on nonempty directories.
The lockfs -d command is not supported. Use lockfs -n as a workaround.
You cannot remount a cluster file system with the directio mount option added at remount time.
You cannot set the directio mount option on a single file by using the directio ioctl.
The following VxFS features are not supported in a Sun Cluster 3.2 cluster file system. They are, however, supported in a local file system.
Quick I/O
Snapshots
Storage checkpoints
VxFS-specific mount options:
convosync (Convert O_SYNC)
mincache
qlog, delaylog, tmplog
VERITAS cluster file system (requires VxVM cluster feature & VERITAS Cluster Server)
Cache advisories can be used, but the effect is observed on the given node only.
All other VxFS features and options that are supported in a cluster file system are supported by Sun Cluster 3.2 software. See VxFS documentation for details about VxFS options that are supported in a cluster configuration.
The following guidelines for using VxFS to create highly available cluster file systems are specific to a Sun Cluster 3.2 configuration.
Create a VxFS file system by the following procedures in the VxFS documentation.
Mount and unmount a VxFS file system from the primary node. The primary node masters the disk on which the VxFS file system resides. A VxFS file system mount or unmount operation that is performed from a secondary node might fail.
Perform all VxFS administration commands from the primary node of the VxFS cluster file system.
The following guidelines for administering VxFS cluster file systems are not specific to Sun Cluster 3.2 software. However, the guidelines are different from the way you administer UFS cluster file systems.
You can administer files on a VxFS cluster file system from any node in the cluster. The exception is ioctls, which you must issue only from the primary node. If you do not know whether an administration command involves ioctls, issue the command from the primary node.
If a VxFS cluster file system fails over to a secondary node, all standard system-call operations that were in progress during failover are reissued transparently on the new primary. However, any ioctl-related operation in progress during the failover will fail. After a VxFS cluster file-system failover, check the state of the cluster file system. Administrative commands that were issued on the old primary before failover might require corrective measures. See VxFS documentation for more information.
As your cluster requirements change, you might need to add, remove, or modify the device groups on your cluster. Sun Cluster provides an interactive interface called clsetup that you can use to make these changes. clsetup generates cluster commands. Generated commands are shown in the examples at the end of some procedures. The following table lists tasks for administering device groups and provides links to the appropriate procedures in this section.
Sun Cluster software automatically creates a raw-disk device group for each disk and tape device in the cluster. However, cluster device groups remain in an offline state until you access the groups as global devices.
Task |
Instructions |
---|---|
Update the global device namespace without a reconfiguration reboot by using the cldevice populate command | |
Add Solaris Volume Manager disk sets and register them as device groups by using the metaset command |
How to Add and Register a Device Group (Solaris Volume Manager) |
Remove Solaris Volume Manager device groups from the configuration by using the metaset and metaclear commands |
How to Remove and Unregister a Device Group (Solaris Volume Manager) |
Remove a node from all device groups by using the cldevicegroup, metaset, and clsetup commands | |
Remove a node from a Solaris Volume Manager device group by using the metaset command |
How to Remove a Node From a Device Group (Solaris Volume Manager) |
SPARC: Add VERITAS Volume Manager disk groups as device groups by using VxVM commands and clsetup |
SPARC: How to Create a New Disk Group When Initializing Disks (VERITAS Volume Manager) SPARC: How to Create a New Disk Group When Encapsulating Disks (VERITAS Volume Manager) SPARC: How to Add a New Volume to an Existing Device Group (VERITAS Volume Manager) SPARC: How to Convert an Existing Disk Group to a Device Group (VERITAS Volume Manager) SPARC: How to Assign a New Minor Number to a Device Group (VERITAS Volume Manager) SPARC: How to Register a Disk Group as a Device Group (VERITAS Volume Manager) How to Convert a Local Disk Group to a Device Group (VxVM) How to Convert a Device Group to a Local Disk Group (VxVM) SPARC: How to Register Disk Group Configuration Changes (VERITAS Volume Manager) |
SPARC: Remove VERITAS Volume Manager device groups from the configuration by using the clsetup (to generate cldevicegroup) commands |
SPARC: How to Remove a Volume From a Device Group (VERITAS Volume Manager) SPARC: How to Remove and Unregister a Device Group (VERITAS Volume Manager) |
SPARC: Add a node to a VERITAS Volume Manager device group by using clsetup to generate cldevicegroup |
SPARC: How to Add a Node to a Device Group (VERITAS Volume Manager) |
SPARC: Remove a node from a VERITAS Volume Manager device group by using clsetup to generate cldevicegroup |
SPARC: How to Remove a Node From a Device Group (VERITAS Volume Manager) |
Remove a node from a raw-disk device group by using the cldevicegroup command | |
Change device group properties by using clsetup to generate cldevicegroup | |
Display device groups and properties by using the cldevicegroup show command | |
Change the desired number of secondaries for a device group by using clsetup to generate cldevicegroup |
How to Set the Desired Number of Secondaries for a Device Group |
Switch the primary for a device group by using the cldevicegroup switch command | |
Put a device group in maintenance state by using the metaset or vxdg commands |
When adding a new global device, manually update the global device namespace by running the cldevice populate command.
The cldevice populate command does not have any effect if the node that is running the command is not currently a cluster member. The command also has no effect if the /global/.devices/node@ nodeID file system is not mounted.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node of the cluster.
Reconfigure the namespace.
# cldevice populate |
The following example shows the output generated by successfully running the cldevice populate command.
# cldevice populate Configuring the /dev/global directory (global devices)... obtaining access to all attached disks reservation program successfully exiting |
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.
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 A, Sun Cluster Object-Oriented Commands.
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.
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 Disk Sets ” in Sun Cluster Software Installation Guide for Solaris OS.
Use the metaset(1M) command to 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 |
Specifies the disk set to be created.
Adds the list of nodes that can master the disk set.
Designates the disk group as multi-owner.
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.
If you are configuring a replicated device group, set the replication property for the device group.
# cldevicegroup sync devicegroup |
Verify that the device group has been added.
The device group name matches the disk set name that is specified with metaset.
# cldevicegroup list |
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 … |
Add the drives to the disk set.
Use the full DID path name.
# metaset -s setname -a /dev/did/rdsk/dN |
Specifies the disk set name, which is the same as the device group name.
Adds the drive to the disk set.
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.
Verify the status of the disk set and drives.
# metaset -s setname |
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 |
Device groups are Solaris Volume Manager disk sets that have been registered with Sun Cluster. To remove a Solaris Volume Manager device group, use the metaclear and metaset commands. These commands remove the device group with the same name and unregister the disk group as a Sun Cluster device group.
Refer to the Solaris Volume Manager documentation for the steps to remove a disk set.
Use this procedure to remove a cluster node from all device groups that list the node in their lists of potential primaries.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on the node that you are removing as a potential primary of all device groups.
Determine the device group or groups of which the node to be removed is a member.
Look for the node name in the Device group node list for each device group.
# cldevicegroup list -v |
If any of the device groups identified in Step 2 are of the device group type SVM, perform the steps in How to Remove a Node From a Device Group (Solaris Volume Manager) for each device group of that type.
If any of the device groups identified in Step 2 are of the device group type VxVM, perform the steps in SPARC: How to Remove a Node From a Device Group (VERITAS Volume Manager) for each device group of that type.
Determine the raw-device disk groups of which the node to be removed is a member.
# cldevicegroup list -v |
If any of the device groups listed in Step 5 are of the device group types Disk or Local_Disk, perform the steps in How to Remove a Node From a Raw-Disk Device Group for each of these device groups.
Verify that the node has been removed from the potential primaries list of all device groups.
The command returns nothing if the node is no longer listed as a potential primary of any device group.
# cldevicegroup list -v nodename |
Use this procedure to remove a cluster node from the list of potential primaries of a Solaris Volume Manager device group. Repeat the metaset command for each device group from which you want to remove the node.
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 A, Sun Cluster Object-Oriented Commands.
Verify that the node is still a member of the device group and that the device group is a Solaris Volume Manager device group.
Device group type SDS/SVM indicates a Solaris Volume Manager device group.
phys-schost-1% cldevicegroup show devicegroup |
Determine which node is the current primary for the device group.
# cluster status -t devicegroup |
Become superuser on the node that currently owns the device group that you want to modify.
Delete the node's host name from the device group.
# metaset -s setname -d -h nodelist |
Specifies the device group name.
Deletes from the device group the nodes identified with -h.
Specifies the nodename of the node or nodes that will be removed.
The update can take several minutes to complete.
If the command fails, add the -f (force) option to the command.
# metaset -s setname -d -f -h nodelist |
Repeat Step 4 for each device group from which the node is being removed as a potential primary.
Verify that the node has been removed from the device group.
The device group name matches the disk set name that is specified with metaset.
phys-schost-1% cldevicegroup list -v devicegroup |
The following example shows the removal of the host name phys-schost-2 from a device group configuration. This example eliminates phys-schost-2 as a potential primary for the designated device group. Verify removal of the node by running the cldevicegroup show command. Check that the removed node is no longer displayed in the screen text.
[Determine the Solaris Volume Manager device group for the node:] # cldevicegroup show dg-schost-1 === Device Groups === Device Group Name: dg-schost-1 Type: SVM failback: no Node List: phys-schost-1, phys-schost-2 preferenced: yes numsecondaries: 1 diskset name: dg-schost-1 [Determine which node is the current primary for the device group:] # cldevicegroup status dg-schost-1 === Cluster Device Groups === --- Device Group Status --- Device Group Name Primary Secondary Status ----------------- ------- --------- ------ dg-schost-1 phys-schost-1 phys-schost-2 Online [Become superuser on the node that currently owns the device group.] [Remove the host name from the device group:] # metaset -s dg-schost-1 -d -h phys-schost-2 [Verify removal of the node:] phys-schost-1% cldevicegroup list -v dg-schost-1 === Cluster Device Groups === --- Device Group Status --- Device Group Name Primary Secondary Status ----------------- ------- --------- ------ dg-schost-1 phys-schost-1 - Online |
If you are running Solaris 9 and intend to create more than three disk sets in the cluster, perform the following steps before you create the disk sets. You do not need to perform this procedure if you are running Solaris 10. Follow these steps if you are installing disk sets for the first time or if you are adding more disk sets to a fully configured 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 A, Sun Cluster Object-Oriented Commands.
Ensure that the value of the md_nsets variable is high enough. The value should accommodate the total number of disk sets you intend to create in the cluster.
On any node of the cluster, check the value of the md_nsets variable in the /kernel/drv/md.conf file.
If the number of disk sets in the cluster will be greater than the existing value of md_nsets minus one, increase the value of md_nsets on each node.
The maximum permissible number of disk sets is the value of md_nsets minus one. The maximum possible value of md_nsets is 32.
Ensure that the /kernel/drv/md.conf file is identical on each node of the cluster.
Failure to follow this guideline can result in serious Solaris Volume Manager errors and possible loss of data.
From one node, shut down the cluster.
# cluster shutdown -g0 -y |
Reboot each node in the cluster.
On SPARC based systems, do the following:
ok boot |
On x86 based systems, do the following:
When the GRUB menu is displayed, select the appropriate Solaris entry and press Enter. The GRUB menu appears similar to the following:
GNU GRUB version 0.95 (631K lower / 2095488K upper memory) +-------------------------------------------------------------------------+ | Solaris 10 /sol_10_x86 | | Solaris failsafe | | | +-------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, 'e' to edit the commands before booting, or 'c' for a command-line. |
On each node in the cluster, run the devfsadm(1M) command.
You can run this command on all nodes in the cluster at the same time.
From one node of the cluster, run the cldevice populate command.
On each node, verify that the cldevice populate command has been completed before you attempt to create any disk sets.
The cldevice command calls itself remotely on all nodes, even when the command is run from just one node. To determine whether the cldevice populate command has completed processing, run the following command on each node of the cluster.
# ps -ef | grep scgdevs |
This procedure is only for initializing disks. If you are encapsulating disks, use the procedure SPARC: How to Create a New Disk Group When Encapsulating Disks (VERITAS Volume Manager).
After adding the VxVM disk group, you need to register the device group.
If you use VxVM to set up shared disk groups for Oracle Parallel Server or Oracle RAC, use the cluster functionality of VxVM as described in the VERITAS Volume Manager Administrator's Reference Guide.
Become superuser on any cluster node that is physically connected to disks that make up the disk group being added.
Create the VxVM disk group and volume.
Use your preferred method to create the disk group and volume.
If you are setting up a mirrored volume, use Dirty Region Logging (DRL) to decrease volume recovery time after a node failure. However, DRL might decrease I/O throughput.
See the VERITAS Volume Manager documentation for the procedures to complete this step.
Register the VxVM disk group as a Sun Cluster device group.
See SPARC: How to Register a Disk Group as a Device Group (VERITAS Volume Manager).
Do not register the Oracle Parallel Server or Oracle RAC shared disk groups with the cluster framework.
This procedure is only for encapsulating disks. If you are initializing disks, use the procedure SPARC: How to Create a New Disk Group When Initializing Disks (VERITAS Volume Manager).
You can convert nonroot disks to Sun Cluster device groups by encapsulating the disks as VxVM disk groups, then registering the disk groups as Sun Cluster device groups.
Disk encapsulation is only supported during initial creation of a VxVM disk group. After a VxVM disk group is created and registered as a Sun Cluster device group, only disks which can be initialized should be added to the disk group.
If you use VxVM to set up shared disk groups for Oracle Parallel Server or Oracle RAC, use the cluster functionality of VxVM as described in the VERITAS Volume Manager Administrator's Reference Guide.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node of the cluster.
If the disk being encapsulated has file system entries in the /etc/vfstab file, make sure that the mount at boot option is set to no.
Set back to yes after the disk is encapsulated and registered as a Sun Cluster device group.
Encapsulate the disks.
Use vxdiskadm menus or the graphical user interface to encapsulate the disks. VxVM requires two free partitions as well as unassigned cylinders at the beginning or the end of the disk. Slice two must also be set to the entire disk. See the vxdiskadm man page for more information.
Shut down and restart the node.
The clnode evacuate command switches over all resource groups and device groups including all non-global zones from the specified node to a next preferred node. Use the shutdown command to shut down and restart the node.
# clnode evacuate node[,...] # shutdown -g0 -y -i6 |
If necessary, switch all resource groups and device groups back to the original node.
If the resource groups and device groups were initially configured to fail back to the primary node, this step is not necessary.
# cldevicegroup switch -n node devicegroup # clresourcegroup switch -z zone -n node resourcegroup |
The name of the node.
The name of the non-global zone on node that can master the resource group. Specify zone only if you specified a non-global zone when you created the resource group.
Register the VxVM disk group as a Sun Cluster device group.
See SPARC: How to Register a Disk Group as a Device Group (VERITAS Volume Manager).
Do not register the Oracle Parallel Server or Oracle RAC shared disk groups with the cluster framework.
If you set the mount at boot option to no in Step 2, set it back to yes.
When you add a new volume to an existing VxVM device group, perform the procedure from the primary node of the online device group.
After adding the volume, you need to register the configuration change by using the procedure SPARC: How to Register Disk Group Configuration Changes (VERITAS Volume Manager).
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.administer RBAC authorization on any node of the cluster.
Determine the primary node for the device group to which you are adding the new volume.
# cldevicegroup status |
If the device group is offline, bring the device group online.
# cldevicegroup switch -n nodename devicegroup |
Specifies the name of the node to which to switch the device group. This node becomes the new primary.
Specifies the device group to switch.
From the primary node (the node currently mastering the device group), create the VxVM volume in the disk group.
Refer to your VERITAS Volume Manager documentation for the procedure used to create the VxVM volume.
Synchronize the VxVM disk group changes to update the global namespace.
DPM
SPARC: How to Register Disk Group Configuration Changes (VERITAS Volume Manager).
You can convert an existing VxVM disk group to a Sun Cluster device group by importing the disk group onto the current node, then registering the disk group as a Sun Cluster device group.
Become superuser on any node of the cluster.
Import the VxVM disk group to the current node.
# vxdg import diskgroup |
Register the VxVM disk group as a Sun Cluster device group.
See SPARC: How to Register a Disk Group as a Device Group (VERITAS Volume Manager).
If device group registration fails because of a minor number conflict with another disk group, you must assign the new disk group a new, unused minor number. After assigning the new minor number, rerun the procedure to register the disk group as a Sun Cluster device group.
Become superuser on any node of the cluster.
Determine the minor numbers in use.
# ls -l /global/.devices/node@nodeid/dev/vx/dsk/* |
Choose another multiple of 1000 not in use as the base minor number for the new disk group.
Assign the new minor number to the disk group.
# vxdg reminor diskgroup base-minor-number |
Register the VxVM disk group as a Sun Cluster device group.
See SPARC: How to Register a Disk Group as a Device Group (VERITAS Volume Manager).
This example uses the minor numbers 16000-16002 and 4000-4001. The vxdg reminor command is used to assign the base minor number 5000 to the new device group.
# ls -l /global/.devices/node@nodeid/dev/vx/dsk/* /global/.devices/node@nodeid/dev/vx/dsk/dg1 brw------- 1 root root 56,16000 Oct 7 11:32 dg1v1 brw------- 1 root root 56,16001 Oct 7 11:32 dg1v2 brw------- 1 root root 56,16002 Oct 7 11:32 dg1v3 /global/.devices/node@nodeid/dev/vx/dsk/dg2 brw------- 1 root root 56,4000 Oct 7 11:32 dg2v1 brw------- 1 root root 56,4001 Oct 7 11:32 dg2v2 # vxdg reminor dg3 5000 |
This procedure uses the clsetup utility to register the associated VxVM disk group as a Sun Cluster device group.
After a device group has been registered with the cluster, never import or export a VxVM disk group by using VxVM commands. If you make a change to the VxVM disk group or volume, follow the procedure SPARC: How to Register Disk Group Configuration Changes (VERITAS Volume Manager) to register the device group configuration changes. This procedure ensures that the global namespace is in the correct state.
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 A, Sun Cluster Object-Oriented Commands.
Ensure that the following prerequisites have been completed prior to registering a VxVM device group:
Superuser privilege on a node in the cluster.
The name of the VxVM disk group to be registered as a device group.
A preferred order of nodes to master the device group.
A desired number of secondary nodes for the device group.
When you define the preference order, you also specify whether the device group should be switched back to the most preferred node if that node fails and later returns to the cluster.
See cldevicegroup(1CL) for more information about node preference and failback options.
Nonprimary cluster nodes (spares) transition to secondary according to the node preference order. The default number of secondaries for a device group is normally set to one. This default setting minimizes performance degradation that is caused by primary checkpointing of multiple secondary nodes during normal operation. For example, in a four-node cluster, the default behavior configures one primary, one secondary, and two spare nodes. See also How to Set the Desired Number of Secondaries for a Device Group.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node of the cluster.
Start the clsetup utility.
# clsetup |
The Main Menu is displayed.
To work with VxVM device groups, type the number that corresponds to the option for device groups and volumes.
The Device Groups Menu is displayed.
To register a VxVM device group, type the number that corresponds to the option for registering a VxVM disk group as a device group.
Follow the instructions and type the name of the VxVM disk group to be registered as a Sun Cluster device group.
If this device group is replicated by using controller-based replication, this name must match the TrueCopy replication group name.
If you use VxVM to set up shared disk groups for Oracle Parallel Server/Oracle RAC, you do not register the shared disk groups with the cluster framework. Use the cluster functionality of VxVM as described in the VERITAS Volume Manager Administrator's Reference Guide.
If you encounter the following error while attempting to register the device group, reminor the device group.
scconf: Failed to add device group - in use |
To reminor the device group, use the procedure SPARC: How to Assign a New Minor Number to a Device Group (VERITAS Volume Manager). This procedure enables you to assign a new minor number that does not conflict with a minor number that an existing device group uses.
If you are configuring a replicated device group, set the replication property for the device group.
# cldevicegroup sync devicegroup |
Verify that the device group is registered and online.
If the device group is properly registered, information for the new device group is displayed when you use the following command.
# cldevicegroup status devicegroup |
If you change any configuration information for a VxVM disk group or volume that is registered with the cluster, you must synchronize the device group by using clsetup. Such configuration changes include adding or removing volumes, as well as changing the group, owner, or permissions of existing volumes. Reregistration after configuration changes ensures that the global namespace is in the correct state. See How to Update the Global Device Namespace.
The following example shows the cldevicegroup command generated by clsetup when it registers a VxVM device group (dg1), and the verification step. This example assumes that the VxVM disk group and volume were created previously.
# clsetup # cldevicegroup create -t vxvm -n phys-schost-1,phys-schost-2 -p failback=true dg1 # cldevicegroup status dg1 === Cluster Device Groups === --- Device Group Status --- Device Group Name Primary Secondary Status ----------------- ------- --------- ------ dg1 phys-schost-1 phys-schost-2 Online |
To create a cluster file system on the VxVM device group, see How to Add a Cluster File System.
If problems occur with the minor number, see SPARC: How to Assign a New Minor Number to a Device Group (VERITAS Volume Manager).
When you change any configuration information for a VxVM disk group or volume, you need to register the configuration changes for the Sun Cluster device group. Registration ensures that the global namespace is in the correct state.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node in the cluster.
Start the clsetup utility.
# clsetup |
The Main Menu is displayed.
To work with VxVM device groups, type the number that corresponds to the option for device groups and volumes.
The Device Groups Menu is displayed.
To register configuration changes, type the number that corresponds to the option for synchronizing volume information for a VxVM device group.
Follow the instructions and type the name of the VxVM disk group that has changed configuration.
The following example shows the cldevicegroup command generated by clsetup a changed VxVM device group (dg1) is registered. This example assumes that the VxVM disk group and volume were created previously.
# clsetup cldevicegroup sync dg1 |
Perform this procedure to change a local VxVM disk group to a globally accessible VxVM device group.
Become superuser on a node of the cluster.
Start the clsetup utility
# clsetup |
Unset the localonly property.
Specify the nodes that can master the disk group.
Verify that the device group is configured.
phys-schost# cldevicegroup show |
Perform this procedure to change a VxVM device group to a local VxVM disk group that is not managed by Sun Cluster software. The local disk group can have more than one node in its node list, but it can be mastered by only one node at a time.
Become superuser on a node of the cluster.
Take the device group offline.
phys-schost# cldevicegroup offline devicegroup |
Unregister the device group.
Verify that the disk group is no longer registered with Sun Cluster software.
phys-schost# cldevicegroup status |
Command output should no longer show the device group that you unregistered.
Import the disk group.
phys-schost# vxdg import diskgroup |
Set the localonly property of the disk group.
Start the clsetup utility.
phys-schost# clsetup |
Choose the menu item, Device groups and volumes.
Choose the menu item, Set a VxVM disk group as a local disk group.
Follow the instructions to set the localonly property and to specify the single node that is to exclusively master the disk group.
When finished, quit the clsetup utility.
Verify that the disk group is successfully configured as a local disk group.
phys-schost# vxdg list diskgroup |
After removing the volume from the device group, you must register the configuration changes to the device group by using the procedure SPARC: How to Register Disk Group Configuration Changes (VERITAS Volume Manager).
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.modify RBAC authorization on any node of the cluster.
Determine the primary node and status for the device group.
# cldevicegroup status devicegroup |
If the device group is offline, bring it online.
# cldevicegroup online devicegroup |
From the primary node (the node currently mastering the device group), remove the VxVM volume in the disk group.
# vxedit -g diskgroup -rf rm volume |
Specifies the VxVM disk group that contains the volume.
Removes the specified volume. The -r option makes the operation recursive. The -f option is required to remove an enabled volume.
Using the clsetup utility, register the device group configuration changes to update the global namespace.
See SPARC: How to Register Disk Group Configuration Changes (VERITAS Volume Manager).
Removing a Sun Cluster device group causes the corresponding VxVM disk group to be exported, not destroyed. However, even though the VxVM disk group still exists, it cannot be used in the cluster unless reregistered.
This procedure uses the clsetup utility to remove a VxVM disk group and unregister it as a Sun Cluster device group.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node of the cluster.
Take the device group offline.
# cldevicegroup offline devicegroup |
Start the clsetup utility.
# clsetup |
The Main Menu is displayed.
To work with VxVM device groups, type the number that corresponds to the option for device groups and volumes.
The Device Groups Menu is displayed.
To unregister a VxVM disk group, type the number that corresponds to the option for unregistering a VxVM device group.
Follow the instructions and type the name of the VxVM disk group to be unregistered.
The following example shows the VxVM device group dg1 taken offline, and the cldevicegroup command generated by clsetup when it removes and unregisters the device group.
# cldevicegroup offline dg1 # clsetup cldevicegroup delete dg1 |
This procedure adds a node to a device group using the clsetup utility.
The prerequisites to add a node to a VxVM device group are:
Superuser privilege on a node in the cluster
The name of the VxVM device group to which the node will be added
The name or node ID of the nodes to add
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.modify RBAC authorization on any node of the cluster.
Start the clsetup utility.
# clsetup |
The Main Menu is displayed.
To work with VxVM device groups, type the number that corresponds to the option for device groups and volumes.
The Device Groups Menu is displayed.
To add a node to a VxVM device group, type the number that corresponds to the option for adding a node to a VxVM device group.
Follow the instructions and type the device group and node names.
Verify that the node has been added.
Look for the device group information for the new disk displayed by the following command.
# cldevicegroup show devicegroup |
The following example shows the scconf command generated by clsetup when it adds a node (phys-schost-3 ) to a VxVM device group (dg1 ), and the verification step.
# clsetup cldevicegroup add-node -n phys-schost-3 dg1 # cldevicegroup show dg1 === Device Groups === Device Group Name: dg1 Type: VxVM failback: yes Node List: phys-schost-1, phys-schost-3 preferenced: no numsecondaries: 1 diskgroup names: dg1 |
Use this procedure to remove a cluster node from the list of potential primaries of a VERITAS Volume Manager (VxVM) device group (disk group).
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 A, Sun Cluster Object-Oriented Commands.
Verify that the node is still a member of the group and that the group is an VxVM device group.
Device group type VxVM indicates a VxVM device group.
phys-schost-1% cldevicegroup show devicegroup |
Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.modify RBAC authorization on a current cluster member node.
Start the clsetup utility.
# clsetup |
The Main Menu is displayed.
To reconfigure a device group, type the number that corresponds to the option for device groups and volumes.
To remove the node from the VxVM device group, type the number that corresponds to the option for removing a node from a VxVM device group.
Follow the prompts to remove the cluster node from the device group. You are asked for information about the following:
VxVM device group
Node name
Verify that the node has been removed from the VxVM device group or groups.
# cldevicegroup show devicegroup |
This example shows removal of the node named phys-schost-1 from the dg1 VxVM device group.
[Determine the VxVM device group for the node:] # cldevicegroup show dg1 === Device Groups === Device Group Name: dg1 Type: VXVM failback: no Node List: phys-schost-1, phys-schost-2 preferenced: no numsecondaries: 1 diskgroup names: dg1 [Become superuser and start the clsetup utility:] # clsetup Select Device groups and volumes>Remove a node from a VxVM device group. Answer the questions when prompted. You will need the following information. Name: Example: VxVM device group name dg1 node names phys-schost-1 [Verify that the cldevicegroup command executed properly:] cldevicegroup remove-node -n phys-schost-1 dg1 Command completed successfully. Dismiss the clsetup Device Groups Menu and Main Menu. [Verify that the node was removed:] # cldevicegroup show dg1 === Device Groups === Device Group Name: dg1 Type: VXVM failback: no Node List: phys-schost-2 preferenced: no numsecondaries: 1 device names: dg1 |
Use this procedure to remove a cluster node from the list of potential primaries of a raw-disk device group.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.modify RBAC authorization on a node in the cluster other than the node to remove.
Identify the device groups that are connected to the node being removed, and determine which are raw-disk device groups.
# cldevicegroup show -n nodename -t rawdisk + |
Disable the localonly property of each Local_Disk raw-disk device group.
# cldevicegroup set -p localonly=false devicegroup |
See the cldevicegroup(1CL) man page for more information about the localonly property.
Verify that you have disabled the localonly property of all raw-disk device groups that are connected to the node being removed.
The Disk device group type indicates that the localonly property is disabled for that raw-disk device group.
# cldevicegroup show -n nodename -t rawdisk -v + |
Remove the node from all raw-disk device groups that are identified in Step 2.
You must complete this step for each raw-disk device group that is connected to the node being removed.
# cldevicegroup remove-node -n nodename devicegroup |
This example shows how to remove a node (phys-schost-2) from a raw-disk device group. All commands are run from another node of the cluster (phys-schost-1).
[Identify the device groups connected to the node being removed, and determine which are raw-disk device groups:] phys-schost-1# cldevicegroup show -n phys-schost-2 -t rawdisk -v + Device Group Name: dsk/d4 Type: Disk failback: false Node List: phys-schost-2 preferenced: false localonly: false autogen true numsecondaries: 1 device names: phys-schost-2 Device Group Name: dsk/d2 Type: VxVM failback: true Node List: pbrave2 preferenced: false localonly: false autogen true numsecondaries: 1 diskgroup name: vxdg1 Device Group Name: dsk/d1 Type: SVM failback: false Node List: pbrave1, pbrave2 preferenced: true localonly: false autogen true numsecondaries: 1 diskset name: ms1 (dsk/d4) Device group node list: phys-schost-2 (dsk/d2) Device group node list: phys-schost-1, phys-schost-2 (dsk/d1) Device group node list: phys-schost-1, phys-schost-2 [Disable the localonly flag for each local disk on the node:] phys-schost-1# cldevicegroup set -p localonly=false dsk/d4 [Verify that the localonly flag is disabled:] phys-schost-1# cldevicegroup show -n phys-schost-2 -t rawdisk + (dsk/d4) Device group type: Disk (dsk/d8) Device group type: Local_Disk [Remove the node from all raw-disk device groups:] phys-schost-1# cldevicegroup remove-node -n phys-schost-2 dsk/d4 phys-schost-1# cldevicegroup remove-node -n phys-schost-2 dsk/d2 phys-schost-1# cldevicegroup remove-node -n phys-schost-2 dsk/d1 |
The method for establishing the primary ownership of a device group is based on the setting of an ownership preference attribute called preferenced. If the attribute is not set, the primary owner of an otherwise unowned device group is the first node that attempts to access a disk in that group. However, if this attribute is set, you must specify the preferred order in which nodes attempt to establish ownership.
If you disable the preferenced attribute, then the failback attribute is also automatically disabled. However, if you attempt to enable or re-enable the preferenced attribute, you have the choice of enabling or disabling the failback attribute.
If the preferenced attribute is either enabled or re-enabled, you are required to re-establish the order of nodes in the primary ownership preference list.
This procedure uses clsetup to set or unset the preferenced attribute and the failback attribute for Solaris Volume Manager or VxVM device groups.
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 A, Sun Cluster Object-Oriented Commands.
To perform this procedure, you need the name of the device group for which you are changing attribute values.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.modify RBAC authorization on any node of the cluster.
Start the clsetup utility.
# clsetup |
The Main Menu is displayed.
To work with device groups, type the number that corresponds to the option for device groups and volumes.
The Device Groups Menu is displayed.
To change key properties of a device group, type the number that corresponds to the option for changing key properties of a VxVM or Solaris Volume Manager device group).
The Change Key Properties Menu is displayed.
To change a device group property, type the number that corresponds to the option for changing the preferenced and/or failback properties.
Follow the instructions to set the preferenced and failback options for a device group.
Verify that the device group attributes have been changed.
Look for the device group information displayed by the following command.
# cldevicegroup show -v devicegroup |
The following example shows the cldevicegroup command generated by clsetup when it sets the attribute values for a device group (dg-schost-1).
# cldevicegroup set -p preferenced=true -p failback=true -p numsecondaries=1 \ -p nodelist=phys-schost-1,phys-schost-2 dg-schost-1 # cldevicegroup show dg-schost-1 === Device Groups === Device Group Name: dg-schost-1 Type: SVM failback: yes Node List: phys-schost-1, phys-schost-2 preferenced: yes numsecondaries: 1 diskset names: dg-schost-1 |
The numsecondaries property specifies the number of nodes within a device group that can master the group if the primary node fails. The default number of secondaries for device services is one. You can set the value to any integer between one and the number of operational nonprimary provider nodes in the device group.
This setting is an important factor in balancing cluster performance and availability. For example, increasing the desired number of secondaries increases the device group's opportunity to survive multiple failures that occur simultaneously within a cluster. Increasing the number of secondaries also decreases performance regularly during normal operation. A smaller number of secondaries typically results in better performance, but reduces availability. However, a larger number of secondaries does not always result in greater availability of the file system or device group in question. Refer to Chapter 3, Key Concepts for System Administrators and Application Developers, in Sun Cluster Concepts Guide for Solaris OS for more information.
If you change the numsecondaries property, secondary nodes are added or removed from the device group if the change causes a mismatch between the actual number of secondaries and the desired number.
This procedure uses the clsetup utility to set the numsecondaries property for all types of device groups. Refer to cldevicegroup(1CL) for information about device group options when configuring any device group.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.modify RBAC authorization on any node of the cluster.
Start the clsetup utility.
# clsetup |
The Main Menu is displayed.
To work with device groups, select the option labeled Device groups and volumes.
The Device Groups Menu is displayed.
To change key properties of a device group, select the option labeled Change key properties of a device group.
The Change Key Properties Menu is displayed.
To change the desired number of secondaries, type the number that corresponds to the option for changing the numsecondaries property.
Follow the instructions and type the desired number of secondaries to be configured for the device group. The corresponding cldevicegroup command is then executed, a log is printed, and the utility returns to the previous menu.
Validate the device group configuration.
# cldevicegroup show dg-schost-1 === Device Groups === Device Group Name: dg-schost-1 Type: VxVm This might also be SDS or Local_Disk. failback: yes Node List: phys-schost-1, phys-schost-2 phys-schost-3 preferenced: yes numsecondaries: 1 diskgroup names: dg-schost-1 |
If you change any configuration information for a VxVM disk group or volume that is registered with the cluster, you must reregister the device group by using clsetup. Such configuration changes include adding or removing volumes, as well as changing the group, owner, or permissions of existing volumes. Reregistration after configuration changes ensures that the global namespace is in the correct state. See How to Update the Global Device Namespace.
Verify that the device group attribute has been changed.
Look for the device group information that is displayed by the following command.
# cldevicegroup show -v devicegroup |
The following example shows the cldevicegroup command that is generated by clsetup when it configures the desired number of secondaries for a device group (dg-schost-1). This example assumes that the disk group and volume were created previously.
# cldevicegroup set -p numsecondaries=1 dg-schost-1 # cldevicegroup show -v dg-schost-1 === Device Groups === Device Group Name: dg-schost-1 Type: SVM failback: yes Node List: phys-schost-1, phys-schost-2 preferenced: yes numsecondaries: 1 diskset names: dg-schost-1 |
The following example shows the cldevicegroup command that is generated by clsetup when it sets the desired number of secondaries for a device group (dg-schost-1) to two. See How to Set the Desired Number of Secondaries for a Device Group for information about changing the desired number of secondaries after a device group is created.
# cldevicegroup set -p numsecondaries=2 dg-schost-1 # cldevicegroup show dg-schost-1 === Device Groups === Device Group Name: dg-schost-1 Type: VxVM failback: yes Node List: phys-schost-1, phys-schost-2 preferenced: yes numsecondaries: 1 diskgroup names: dg-schost-1 |
The following example shows use of a null string value to configure the default number of secondaries. The device group will be configured to use the default value, even if the default value changes.
# cldevicegroup set -p numsecondaries= dg-schost-1 # cldevicegroup show -v dg-schost-1 === Device Groups === Device Group Name: dg-schost-1 Type: SVM failback: yes Node List: phys-schost-1, phys-schost-2 phys-schost-3 preferenced: yes numsecondaries: 1 diskset names: dg-schost-1 |
You do not need to be superuser to list the configuration. However, you do need solaris.cluster.read authorization.
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 A, Sun Cluster Object-Oriented Commands.
Use one method from the following list.
See the Sun Cluster Manager online help for more information.
Use cldevicegroup show to list the configuration for all device groups in the cluster.
Use cldevicegroup show devicegroup to list the configuration of a single device group.
Use cldevicegroup status devicegroup to determine the status of a single device group.
Use cldevicegroup status + to determine the status of all device groups in the cluster.
Use the -v option with any of these commands to obtain more detailed information.
# cldevicegroup status + === Cluster Device Groups === --- Device Group Status --- Device Group Name Primary Secondary Status ----------------- ------- --------- ------ dg-schost-1 phys-schost-2 phys-schost-1 Online dg-schost-2 phys-schost-1 -- Offline dg-schost-3 phys-schost-3 phy-shost-2 Online |
# cldevicegroup show dg-schost-1 === Device Groups === Device Group Name: dg-schost-1 Type: SVM failback: yes Node List: phys-schost-2, phys-schost-3 preferenced: yes numsecondaries: 1 diskset names: dg-schost-1 |
This procedure can also be used to start (bring online) an inactive device group.
You can also bring an inactive device group online or switch the primary for a device group by using the Sun Cluster Manager GUI. See the Sun Cluster Manager online help for more information.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a profile that provides solaris.cluster.modify RBAC authorization on any node of the cluster.
Use cldevicegroup switch to switch the device group primary.
# cldevicegroup switch -n nodename devicegroup |
Specifies the name of the node to switch to. This node become the new primary.
Specifies the device group to switch.
Verify that the device group has been switched to the new primary.
If the device group is properly registered, information for the new device group is displayed when you use the following command.
# cldevice status devicegroup |
The following example shows how to switch the primary for a device group and verify the change.
# cldevicegroup switch -n phys-schost-1 dg-schost-1 # cldevicegroup status dg-schost-1 === Cluster Device Groups === --- Device Group Status --- Device Group Name Primary Secondary Status ----------------- ------- --------- ------ dg-schost-1 phys-schost-1 phys-schost-2 Online |
Putting a device group in maintenance state prevents that device group from automatically being brought online whenever one of its devices is accessed. You should put a device group in maintenance state when completing repair procedures that require that all I/O activity be acquiesced until completion of the repair. Putting a device group in maintenance state also helps prevent data loss by ensuring that a device group is not brought online on one node while the disk set or disk group is being repaired on another node.
Before a device group can be placed in maintenance state, all access to its devices must be stopped, and all dependent file systems must be unmounted.
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 A, Sun Cluster Object-Oriented Commands.
Place the device group in maintenance state.
If the repair procedure being performed requires ownership of a disk set or disk group, manually import that disk set or disk group.
For Solaris Volume Manager:
# metaset -C take -f -s diskset |
If you are taking ownership of a Solaris Volume Manager disk set, you must use the metaset -C take command when the device group is in maintenance state. Using metaset -t brings the device group online as part of taking ownership. If you are importing a VxVM disk group, you must use the -t flag when importing the disk group. Using the -t flag prevents the disk group from automatically being imported if this node is rebooted.
For VERITAS Volume Manager:
# vxdg -t import disk-group-name |
Complete the repair procedure that you need to perform.
Release ownership of the disk set or disk group.
Before taking the device group out of maintenance state, you must release ownership of the disk set or disk group. Failure to release ownership can result in data loss.
For Solaris Volume Manager:
# metaset -C release -s diskset |
For VERITAS Volume Manager:
# vxdg deport diskgroupname |
Bring the device group online.
# cldevicegroup online devicegroup # cldevicegroup enable devicegroup |
This example shows how to put device group dg-schost-1 in maintenance state, and remove the device group from maintenance state.
[Place the device group in maintenance state.] # cldevicegroup disable dg-schost-1 # cldevicegroup offline dg-schost-1 [If needed, manually import the disk set or disk group.] For Solaris Volume Manager: # metaset -C take -f -s dg-schost-1 For VERITAS Volume Manager: # vxdg -t import dg1 [Complete all necessary repair procedures.] [Release ownership.] For Solaris Volume Manager: # metaset -C release -s dg-schost-1 For VERITAS Volume Manager: # vxdg deport dg1 [Bring the device group online.] # cldevicegroup online dg-schost-1 # cldevicegroup enable dg-schost-1 |
Sun Cluster software installation automatically assigns SCSI reservations to all storage devices. Use the following procedures to check the settings of devices and, if necessary, to override the setting for a device.
How to Display the Default Global SCSI Protocol Settings for All Storage Devices
How to Change the Default Global SCSI Protocol Settings for All Storage Devices
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.read RBAC authorization.
From any node, display the current global default SCSI protocol setting.
# cluster show -t global |
For more information, see the cluster(1CL) man page.
The following example displays the SCSI protocol settings for all storage devices on the cluster.
# cluster show -t global === Cluster === Cluster Name: racerxx installmode: disabled heartbeat_timeout: 10000 heartbeat_quantum: 1000 private_netaddr: 172.16.0.0 private_netmask: 255.255.248.0 max_nodes: 64 max_privatenets: 10 global_fencing: scsi3 Node List: phys-racerxx-1, phys-racerxx-2 |
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.read RBAC authorization.
From any node, display the SCSI protocol setting of the storage device.
# cldevice show device |
The name of the device path or a device name.
For more information, see the cldevice(1CL)man page.
The following example displays the SCSI protocol for the device /dev/rdsk/c4t8d0.
# cldevice show /dev/rdsk/c4t8d0 === DID Device Instances === DID Device Name: /dev/did/rdsk/d3 Full Device Path: phappy1:/dev/rdsk/c4t8d0 Full Device Path: phappy2:/dev/rdsk/c4t8d0 Replication: none default_fencing: global |
The default fencing setting of a single storage device overrides the global setting when the device's default fencing is set to pathcount or scsi3. If the default fencing setting of a storage device is set to global, the storage device will use the global setting. For example, if a storage device has the default setting pathcount, the setting will not change if you use this procedure to change the global SCSI protocol settings to scsi3. You must use the How to Change the SCSI Protocol for a Single Storage Device procedure to change the default setting of a single device.
To change the default fencing setting for a quorum device you must unconfigure the device, change the setting, and reconfigure the quorum device.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.
Set the SCSI protocol for all storage devices that are not quorum devices.
cluster set -p global_fencing={scsi3 | pathcount} |
Sets the current global default fencing algorithm for all shared devices.
Uses the SCSI-3 protocol.
Determines the fencing protocol by the number of DID paths that are attached to the shared device.
The following example sets the SCSI protocol for all storage devices on the cluster to the SCSI-3 protocol.
# cluster set -p global_fencing=scsi3 |
To change the default fencing setting for a quorum device you must unconfigure the device.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.
Set the SCSI protocol of the storage device.
# cldevice set -p default_fencing ={pathcount | scsi3 | global} device |
Modifies the device properties.
Determines the fencing protocol by the number of DID paths that are attached to the shared device.
Uses the SCSI-3 protocol.
Uses the global default fencing setting.
Specifies the name of the device path or device name.
For more information, see the cluster(1CL) man page.
The following example sets the device 11, specified by device number, to the SCSI-3 protocol.
# cldevice set -p default_fencing=scsi3 5 |
The cluster file system is a globally available file system that can be read and accessed from any node of the cluster.
Table 5–4 Task Map: Administering Cluster File Systems
Task |
Instructions |
---|---|
Add cluster file systems after the initial Sun Cluster installation by using newfs(1M) and mkdir | |
Remove a cluster file system by using fuser(1M) and umount(1M) | |
Check global mount points in a cluster for consistency across nodes by using sccheck(1M) |
Perform this task for each cluster file system you create after your initial Sun Cluster installation.
Be sure you specify the correct disk device name. Creating a cluster file system destroys any data on the disks. If you specify the wrong device name, you will erase data that you might not intend to delete.
Ensure the following prerequisites have been completed prior to adding an additional cluster file system:
Superuser privilege is established on a node in the cluster.
Volume manager software be installed and configured on the cluster.
A device group (Solaris Volume Manager device group or a VxVM device group) or block disk slice exists on which to create the cluster file system.
If you used Sun Cluster Manager to install data services, one or more cluster file systems already exist if shared disks on which to create the cluster file systems were sufficient.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser on any node in the cluster.
For faster file system creation, become superuser on the current primary of the global device for which you are creating a file system.
Create a file system by using the newfs command.
The newfs command is valid only for creating new UFS file systems. To create a new VxFS file system, follow the procedures provided in your VxFS documentation.
# newfs raw-disk-device |
The following table shows examples of names for the raw-disk-device argument. Note that naming conventions differ for each volume manager.
Volume Manager |
Disk Device Name |
Description |
---|---|---|
Solaris Volume Manager |
/dev/md/oracle/rdsk/d1 |
Raw disk device d1 within the oracle disk set. |
SPARC: VERITAS Volume Manager |
/dev/vx/rdsk/oradg/vol01 |
Raw disk device vol01 within the oradg disk group. |
None |
/dev/global/rdsk/d1s3 |
Raw disk device for block slice d1s3. |
On each node in the cluster, create a mount-point directory for the cluster file system.
A mount point is required on each node, even if the cluster file system will not be accessed on that node.
For ease of administration, create the mount point in the /global/devicegroup directory. Using this location enables you to easily distinguish cluster file systems, which are globally available, from local file systems.
# mkdir -p /global/devicegroup mountpoint |
Name of the directory that corresponds to the name of the device group that contains the device.
Name of the directory on which to mount the cluster file system.
On each node in the cluster, add an entry to the /etc/vfstab file for the mount point.
Use the following required mount options.
Logging is required for all cluster file systems.
Solaris UFS logging – Use the global,logging mount options. See the mount_ufs(1M) man page for more information about UFS mount options.
The syncdir mount option is not required for UFS cluster file systems. If you specify syncdir, you are guaranteed POSIX-compliant file-system behavior. If you do not, you will experience the same behavior as with UFS file systems. When you do not specify syncdir, performance of writes that allocate disk blocks, such as when appending data to a file, can significantly improve. However, in some cases, without syncdir you would not discover an out-of-space condition until you close a file. The cases in which you could have problems if you do not specify syncdir are rare. With syncdir (and POSIX behavior), the out-of-space condition would be discovered before the close.
Solaris Volume Manager transactional volume – Use the global mount option (do not use the logging mount option). See your Solaris Volume Manager documentation for information about setting up transactional volumes.
Transactional volumes are scheduled to be removed from the Solaris OS in an upcoming Solaris software release. Solaris UFS logging provides the same capabilities but superior performance, as well as lower system administration requirements and overhead.
VxFS logging – Use the global and log mount options. See the mount_vxfs man page that is provided with VxFS software for more information.
To automatically mount the cluster file system, set the mount at boot field to yes.
Ensure that, for each cluster file system, the information in its /etc/vfstab entry is identical on each node.
Ensure that the entries in each node's /etc/vfstab file list devices in the same order.
Check the boot order dependencies of the file systems.
For example, consider the scenario where phys-schost-1 mounts disk device d0 on /global/oracle, and phys-schost-2 mounts disk device d1 on /global/oracle/logs. With this configuration, phys-schost-2 can boot and mount /global/oracle/logs only after phys-schost-1 boots and mounts /global/oracle .
See the vfstab(4) man page for details.
On any node in the cluster, verify that mount points exist and /etc/vfstab file entries are correct on all nodes of the cluster.
# sccheck |
If no errors occur, nothing is returned.
From any node in the cluster, mount the cluster file system.
# mount /global/devicegroup mountpoint |
On each node of the cluster, verify that the cluster file system is mounted.
You can use either the df or mount command to list mounted file systems.
To manage a VxFS cluster file system in a Sun Cluster environment, run administrative commands only from the primary node on which the VxFS cluster file system is mounted.
The following example creates a UFS cluster file system on the Solaris Volume Manager metadevice or volume /dev/md/oracle/rdsk/d1.
# newfs /dev/md/oracle/rdsk/d1 ... [on each node:] # mkdir -p /global/oracle/d1 # vi /etc/vfstab #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # /dev/md/oracle/dsk/d1 /dev/md/oracle/rdsk/d1 /global/oracle/d1 ufs 2 yes global,logging [save and exit] [on one node:] # sccheck # mount /dev/md/oracle/dsk/d1 /global/oracle/d1 # mount ... /global/oracle/d1 on /dev/md/oracle/dsk/d1 read/write/setuid/global/logging/largefiles on Sun Oct 3 08:56:16 2001 |
You remove a cluster file system by merely unmounting it. To also remove or delete the data, remove the underlying disk device (or metadevice or volume) from the system.
Cluster file systems are automatically unmounted as part of the system shutdown that occurs when you run cluster shutdown to stop the entire cluster. A cluster file system is not unmounted when you run shutdown to stop a single node. However, if the node being shut down is the only node with a connection to the disk, any attempt to access the cluster file system on that disk results in an error.
Ensure that the following prerequisites have been completed prior to unmounting cluster file systems:
Superuser privilege is established on a node in the cluster.
The file system is not busy. A file system is considered busy if a user is working in a directory in the file system, or if a program has a file open in that file system. The user or program could be running on any node in the cluster.
Become superuser on any node in the cluster.
Determine which cluster file systems are mounted.
# mount -v |
On each node, list all processes that are using the cluster file system, so that you know which processes you are going to stop.
# fuser -c [ -u ] mountpoint |
Reports on files that are mount points for file systems and any files within those mounted file systems.
(Optional) Displays the user login name for each process ID.
Specifies the name of the cluster file system for which you want to stop processes.
On each node, stop all processes for the cluster file system.
Use your preferred method for stopping processes. If necessary, use the following command to force termination of processes associated with the cluster file system.
# fuser -c -k mountpoint |
A SIGKILL is sent to each process that uses the cluster file system.
On each node, verify that no processes are using the file system.
# fuser -c mountpoint |
From just one node, unmount the file system.
# umount mountpoint |
Specifies the name of the cluster file system you want to unmount. This can be either the directory name where the cluster file system is mounted, or the device name path of the file system.
(Optional) Edit the /etc/vfstab file to delete the entry for the cluster file system being removed.
Perform this step on each cluster node that has an entry for this cluster file system in its /etc/vfstab file.
(Optional) Remove the disk device group/metadevice/volume/plex.
See your volume manager documentation for more information.
The following example removes a UFS cluster file system that is mounted on the Solaris Volume Manager metadevice or volume/dev/md/oracle/rdsk/d1.
# mount -v ... /global/oracle/d1 on /dev/md/oracle/dsk/d1 read/write/setuid/global/logging/largefiles # fuser -c /global/oracle/d1 /global/oracle/d1: 4006c # fuser -c -k /global/oracle/d1 /global/oracle/d1: 4006c # fuser -c /global/oracle/d1 /global/oracle/d1: # umount /global/oracle/d1 (On each node, remove the highlighted entry:) # vi /etc/vfstab #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # /dev/md/oracle/dsk/d1 /dev/md/oracle/rdsk/d1 /global/oracle/d1 ufs 2 yes global,logging [Save and exit.] |
To remove the data on the cluster file system, remove the underlying device. See your volume manager documentation for more information.
The sccheck(1M) utility verifies the syntax of the entries for cluster file systems in the /etc/vfstab file. If no errors occur, nothing is returned.
Run sccheck after making cluster configuration changes, such as removing a cluster file system, that have affected devices or volume management components.
Disk path monitoring (DPM) administration commands enable you to receive notification of secondary disk-path failure. Use the procedures in this section to perform administrative tasks that are associated with monitoring disk paths. Refer to Chapter 3, Key Concepts for System Administrators and Application Developers, in Sun Cluster Concepts Guide for Solaris OS for conceptual information about the disk-path monitoring daemon. Refer to the cldevice(1CL) man page for a description of the scdpm command options and related commands. Refer to the syslogd(1M) man page for logged errors that the daemon reports.
Disk paths are automatically added to the monitoring list monitored when I/O devices are added to a node by using the cldevice command. Disk paths are also automatically unmonitored when devices are removed from a node by using Sun Cluster commands.
Task |
Instructions |
---|---|
Monitor a disk path by using the cldevice monitor command | |
Unmonitor a disk path by using the cldevice unmonitor command | |
Print the status of faulted disk paths for a node by using the cldevice status command | |
Monitor disk paths from a file by using the cldevice command | |
Enable or disable the automatic rebooting of a node when all monitored disk paths fail by using the clnode set command |
How to Enable the Automatic Rebooting of a Node When All Monitored Disk Paths Fail How to Disable the Automatic Rebooting of a Node When All Monitored Disk Paths Fail |
The procedures in the following section that issue the cldevice command include the disk-path argument. The disk-path argument consists of a node name and a disk name. The node name is not required and defaults to all if you do not specify it.
Perform this task to monitor disk paths in your cluster.
DPM is not supported on nodes that run versions that were released prior to Sun Cluster 3.1 10/03 software. Do not use DPM commands while a rolling upgrade is in progress. After all nodes are upgraded, the nodes must be online to use DPM commands.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node in the cluster.
Monitor a disk path.
# cldevice monitor -n node disk |
Verify that the disk path is monitored.
# cldevice status device |
The following example monitors the schost-1:/dev/did/rdsk/d1 disk path from a single node. Only the DPM daemon on the node schost-1 monitors the path to the disk /dev/did/dsk/d1 .
# cldevice monitor -n schost-1 /dev/did/dsk/d1 # cldevice status d1 Device Instance Node Status --------------- ---- ------ /dev/did/rdsk/d1 phys-schost-1 Ok |
The following example monitors the schost-1:/dev/did/dsk/d1 disk path from all nodes. DPM starts on all nodes for which /dev/did/dsk/d1 is a valid path.
# cldevice monitor /dev/did/dsk/d1 # cldevice status /dev/did/dsk/d1 Device Instance Node Status --------------- ---- ------ /dev/did/rdsk/d1 phys-schost-1 Ok |
The following example forces the daemon to reread the disk configuration from the CCR and prints the monitored disk paths with status.
# cldevice monitor + # cldevice status Device Instance Node Status --------------- ---- ------ /dev/did/rdsk/d1 schost-1 Ok /dev/did/rdsk/d2 schost-1 Ok /dev/did/rdsk/d3 schost-1 Ok schost-2 Ok /dev/did/rdsk/d4 schost-1 Ok schost-2 Ok /dev/did/rdsk/d5 schost-1 Ok schost-2 Ok /dev/did/rdsk/d6 schost-1 Ok schost-2 Ok /dev/did/rdsk/d7 schost-2 Ok /dev/did/rdsk/d8 schost-2 Ok |
Use this procedure to unmonitor a disk path.
DPM is not supported on nodes that run versions that were released prior to Sun Cluster 3.1 10/03 software. Do not use DPM commands while a rolling upgrade is in progress. After all nodes are upgraded, the nodes must be online to use DPM commands.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node in the cluster.
Determine the state of the disk path to unmonitor.
# cldevice status device |
On each node, unmonitor the appropriate disk paths.
# cldevice unmonitor -n node disk |
The following example unmonitors the schost-2:/dev/did/rdsk/d1 disk path and prints disk paths with status for the entire cluster.
# cldevice unmonitor -n schost2 /dev/did/rdsk/d1 # cldevice status -n schost2 /dev/did/rdsk/d1 Device Instance Node Status --------------- ---- ------ /dev/did/rdsk/d1 schost-2 Unmonitored |
Use the following procedure to print the faulted disk paths for a cluster.
DPM is not supported on nodes that run versions that were released prior to Sun Cluster 3.1 10/03 software. Do not use DPM commands while a rolling upgrade is in progress. After all nodes are upgraded, the nodes must be online to use DPM commands.
Become superuser on any node in the cluster.
Print the faulted disk paths throughout the cluster.
# cldevice status -s fail |
The following example prints faulted disk paths for the entire cluster.
# cldevice status -s fail Device Instance Node Status --------------- ---- ------ dev/did/dsk/d4 phys-schost-1 fail |
Use the following procedure to monitor or unmonitor disk paths from a file.
To change your cluster configuration by using a file, you must first export the current configuration. This operation creates an XML file that you can then modify to set the configuration items you are changing. The instructions in this procedure describe this entire process.
DPM is not supported on nodes that run versions that were released prior to Sun Cluster 3.1 10/03 software. Do not use DPM commands while a rolling upgrade is in progress. After all nodes are upgraded, the nodes must be online to use DPM commands.
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 A, Sun Cluster Object-Oriented Commands.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node in the cluster.
Export your device configuration to an XML file.
# cldevice export -o configurationfile |
Specify the file name for your XML file.
Modify the configuration file so that device paths are monitored.
Find the device paths that you want to monitor, and set the monitored attribute to true.
Monitor the device paths.
# cldevice monitor -i configurationfile |
Specify the file name of the modified XML file.
Verify that device path is now monitored.
# cldevice status |
In the following example, the device path between the node phys-schost–2 and device d3 is monitored by using an XML file.
The first step is to export the current cluster configuration.
# cldevice export -o deviceconfig |
The deviceconfig XML file shows that the path between phys-schost–2 and d3 is not currently monitored.
<?xml version="1.0"?> <!DOCTYPE cluster SYSTEM "/usr/cluster/lib/xml/cluster.dtd"> <cluster name="brave_clus"> . . . <deviceList readonly="true"> <device name="d3" ctd="c1t8d0"> <devicePath nodeRef="phys-schost-1" monitored="true"/> <devicePath nodeRef="phys-schost-2" monitored="false"/> </device> </deviceList> </cluster> |
To monitor that path, set the monitored attribute to true, as follows.
<?xml version="1.0"?> <!DOCTYPE cluster SYSTEM "/usr/cluster/lib/xml/cluster.dtd"> <cluster name="brave_clus"> . . . <deviceList readonly="true"> <device name="d3" ctd="c1t8d0"> <devicePath nodeRef="phys-schost-1" monitored="true"/> <devicePath nodeRef="phys-schost-2" monitored="true"/> </device> </deviceList> </cluster> |
Use the cldevice command to read the file and turn on monitoring.
# cldevice monitor -i deviceconfig |
Use the cldevice command to verify that the device is now monitored.
# cldevice status |
For more details about exporting cluster configuration and using the resulting XML file to set cluster configuration, see the cluster(1CL) and the clconfiguration(5CL) man pages.
When you enable this feature, a node automatically reboots, provided that the following conditions are met:
All monitored disk paths on the node fail.
At least one of the disks is accessible from a different node in the cluster.
Rebooting the node restarts all resource groups and device groups that are mastered on that node on another node.
If all monitored disk paths on a node remain inaccessible after the node automatically reboots, the node does not automatically reboot again. However, if any disk paths become available after the node reboots but then fail, the node automatically reboots again.
On any node in the cluster, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.
For all nodes in the cluster, enable the automatic rebooting of a node when all monitored disk paths to it fail.
# clnode set -p reboot_on_path_failure=enabled + |
When you disable this feature and all monitored disk paths on a node fail, the node does not automatically reboot.