The scsetup(1M) utility is an interactive interface to the scconf(1M) command. When scsetup runs, it generates scconf commands. These generated commands are shown in the examples at the end of some procedures.
Manually update the global device namespace when adding a new global device by running scgdevs(1M).
The scgdevs command does not have any effect if the node running the command is not currently a cluster member or if the /global/.devices/node@nodeID file system is not mounted.
The following example shows output generated by a successful run of scgdevs.
# scgdevs Configuring the /dev/global directory (global devices)... obtaining access to all attached disks reservation program successfully exiting |
Disk device groups map directly to Solstice DiskSuite disksets. When you create a diskset using metaset(1M), you also create the disk device group with the same name and register it as a Sun Cluster disk device group.
Become superuser on the node connected to the disks where you want to create the diskset.
Use metaset to add the Solstice DiskSuite diskset and register it as a disk device group with Sun Cluster.
# metaset -s diskset -a -h node-list |
Specifies the diskset to be created.
Adds the list of nodes that can master the diskset.
Verify that the disk device group has been added.
The disk device group name will match the diskset name specified with metaset.
# scconf -p | egrep disk-device-group |
The following example shows the creation of the diskset and disk device group and verifies that the disk device group has been created.
# metaset -s dg-schost-1 # scconf -p | egrep dg-schost-1 Device group name: dg-schost-1 |
This procedure is only for initializing disks. If you are encapsulating disks, use the procedure "3.3.4 How to Create a New Disk Group When Encapsulating Disks (VERITAS Volume Manager)".
After adding the VxVM disk group, you need to register the disk device group.
Become superuser on a node of the cluster that is physically connected to the 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, we strongly recommend that Dirty Region Logging (DRL) be used to decrease volume recovery time in the event of a system crash.
See the VERITAS Volume Manager documentation for the procedures to complete this step.
The VxVM disk group must be registered as a Sun Cluster disk device group. See "3.3.8 How to Register a Disk Group as a Disk Device Group (VERITAS Volume Manager)".
This procedure is only for encapsulating disks. If you are initializing disks, use the procedure "3.3.3 How to Create a New Disk Group When Initializing Disks (VERITAS Volume Manager)".
You can make non-root disks into Sun Cluster disk device groups by first encapsulating them as VxVM disk groups, then registering them as Sun Cluster disk device groups.
Disk encapsulation is only supported during initial creation of VxVM disk groups. Once a disk group is created and registered, only disks which can be initialized should be added to the disk group.
Become superuser on a 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.
This can be set back to yes once the disk has been encapsulated and registered as a Sun Cluster disk 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 2 must also be set to the entire disk. See the vxdiskadm(1M) man page for more information.
Shut down and restart the node.
The scswitch(1M) command will switch over all resource groups and device groups from the node to the next preferred node. Then shutdown(1M) is used to shut down and restart the node.
# scswitch -S -h node # shutdown -g 0 -i 6 -y |
If necessary, switch all resource groups, and device groups back.
If the resource groups and device groups were initially configured to fail back to the primary node, this step is not necessary.
# scswitch -z -h node -D devgrp1 [ ,devgrp2,... ] # scswitch -z -h node -g resgrp1 [ ,resgrp2,... ] |
The VxVM disk group must be registered as a Sun Cluster disk device group. See "3.3.8 How to Register a Disk Group as a Disk Device Group (VERITAS Volume Manager)".
After adding the volume, you need to register the configuration change by using the procedure "3.3.9 How to Register Disk Group Configuration Changes (VERITAS Volume Manager)".
When you add a new volume to an existing VxVM disk device group, you need to perform the procedure from the primary node for the disk device group, and the disk device group must be online.
Become superuser on a node of the cluster.
Determine the primary node for the disk device group.
# scstat -D |
Determine if the disk device group is offline.
If no, proceed to Step 4.
If yes, bring the disk group online.
# scswitch -z -D disk-device-group -h node |
Switches the specified device group.
Specifies the name of the node to switch the disk device group to.
From the primary node (the node currently mastering the disk 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.
The change to the VxVM disk group must be registered to update the global namespace. See "3.3.9 How to Register Disk Group Configuration Changes (VERITAS Volume Manager)".
You can make an existing VxVM disk group into a Sun Cluster disk device group by first importing the disk group onto the current node, then registering the disk group as a Sun Cluster disk device group.
Become superuser on a node of the cluster.
Import the VxVM disk group onto the current node.
# vxdg import diskgroup |
The VxVM disk group must be registered as a Sun Cluster disk device group. See "3.3.8 How to Register a Disk Group as a Disk Device Group (VERITAS Volume Manager)".
If registering a VxVM disk device group fails due to a minor number conflict with another disk group, the new disk group must be assigned a new, unused minor number. After assigning the new minor number, you then rerun the procedure to register the disk group as a Sun Cluster disk device group.
Become superuser on a node of the cluster.
Determine the minor numbers in use.
# ls -l /dev/vx/dsk/* |
Choose any other multiple of 1000 that is 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 |
This example shows the minor numbers 16000-16002 and 4000-4001 being used. The vxdg reminor command is used to reminor the new disk device group to use the base minor number 5000.
# ls -l /dev/vx/dsk/* /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 /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 |
The VxVM disk group must be registered as a Sun Cluster disk device group. See "3.3.8 How to Register a Disk Group as a Disk Device Group (VERITAS Volume Manager)".
This procedure uses the scsetup(1M) utility to register the associated VxVM disk group as a Sun Cluster disk device group.
Once a disk device group has been registered, if you make a change to the VxVM disk group or volume, use the procedure "3.3.9 How to Register Disk Group Configuration Changes (VERITAS Volume Manager)" to register the disk device group configuration changes. This will ensure that the global namespace is in the correct state.
The prerequisites to register a VxVM disk device group are:
Superuser privilege on a node in the cluster.
The name of the VxVM disk group to be registered as a disk device group.
A preferred order of nodes to master the disk device group.
When you define the preference order, you also specify whether you want the disk device group to be switched back to the most preferred node in the event that the most preferred node goes down and later returns to the cluster.
See scconf(1M) for more information on node preference and failback options.
Become superuser on a node of the cluster.
Enter the scsetup utility.
# scsetup |
The Main Menu appears.
To work with VxVM disk device groups, enter 3 (Device groups and volumes).
The Device Groups Menu appears.
To register a VxVM disk device group, enter 1 (Register a VxVM disk group as a device group).
Follow the instructions and enter the VxVM disk group to be registered as a Sun Cluster disk device group. If you encounter the following error while attempting to register the disk device group, use the procedure "3.3.7 How to Assign a New Minor Number to a Disk Device Group (VERITAS Volume Manager)". This procedure will enable you to assign a new minor number that does not conflict with a minor number used by existing disk device groups.
scconf: Failed to add device group - in use |
Verify that the disk device group has been registered and brought online.
Look for the disk device information for the new disk displayed by the following command.
# scstat -D |
The following example shows the scconf command generated by scsetup when it registers a VxVM disk device group (dg1), and the verification step. This example assumes that the VxVM disk group and volume were created previously.
# scconf -a -D type=vxvm,name=dg1,nodelist=phys-schost-1:phys-schost-2 # scstat -D -- Device Group Servers -- Device Group Primary Secondary ------------ ------- --------- Device group servers: dg1 phys-schost-1 phys-schost-2 -- Device Group Status -- Device Group Status ------------ ------ Device group status: dg1 Online |
To create a cluster file system on the VxVM disk device group, see "3.4.1 How to Add an Additional Cluster File System". If there are problems with the minor number, see "3.3.7 How to Assign a New Minor Number to a Disk 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 disk device group. This ensures that the global namespace is in the correct state.
Become superuser on a node in the cluster.
Enter the scsetup(1M) utility.
# scsetup |
The Main Menu appears.
To work with VxVM disk device groups, enter 3 (Device groups and volumes).
The Device Groups Menu appears.
To register configuration changes, enter 2 (Synchronize volume information for a VxVM device group).
Follow the instructions and enter the VxVM disk group that has changed configuration.
The following example shows the scconf command generated by scsetup when it registers a changed VxVM disk device group (dg1). This example assumes that the VxVM disk group and volume were created previously.
# scconf -c -D name=dg1,sync |
Disk device groups map directly to Solstice DiskSuite disksets. Thus, to remove a Solstice DiskSuite disk device group, you use the metaclear(1M) and metaset(1M) commands. These commands remove the disk device group with the same name and unregister the disk group as a Sun Cluster disk device group.
Refer to the Solstice DiskSuite documentation for the steps to remove a diskset.
After removing the volume from the disk device group, you must register the configuration changes to the disk device group using the procedure "3.3.9 How to Register Disk Group Configuration Changes (VERITAS Volume Manager)".
Become superuser on a node of the cluster.
Determine the primary node for the disk device group.
# scstat -D |
Determine if the disk device group is offline.
If no, proceed to Step 4.
If yes, bring the disk group online.
# scswitch -z -D disk-device-group -h node |
Performs the switch.
Specifies the device group to switch.
Specifies the name of the node to become the new primary.
From the primary node (the node currently mastering the disk device group), remove the VxVM volume in the disk group.
# vxedit -g diskgroup -rf rm volume |
Specifies the VxVM disk group containing the volume.
Removes the specified volume.
After removing a volume, you must register the configuration changes to the disk device group. To register the configuration changes, see "3.3.9 How to Register Disk Group Configuration Changes (VERITAS Volume Manager)".
Removing a Sun Cluster disk device group will cause the corresponding VxVM disk group to be deported, not destroyed. However, even though the VxVM disk group still exists, it cannot be used in the cluster unless re-registered.
This procedure uses the scsetup(1M) utility to remove a VxVM disk group and unregister it as a Sun Cluster disk device group.
Become superuser on a node of the cluster.
Take the disk device group offline.
# scswitch -F -D disk-device-group |
Places the disk device group offline.
Specifies the device group to take offline.
Enter the scsetup utility.
The Main Menu appears.
# scsetup |
To work with VxVM device groups, enter 3 (Device groups and volumes).
The Device Groups Menu appears.
To unregister a VxVM disk group, enter 3 (Unregister a VxVM device group).
Follow the instructions and enter the VxVM disk group to be unregistered.
The following example shows the VxVM disk device group dg1 taken offline, and the scconf(1M) command generated by scsetup when it removes and unregisters the disk device group.
# scswitch -F -D dg1 # scconf -r -D name=dg1 |
This procedure adds a node to a disk device group using the scsetup(1M) utility.
The prerequisites to add a node to a VxVM disk 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
Become superuser on a node of the cluster.
Enter the scsetup(1M) utility
The Main Menu appears.
# scsetup |
To work with VxVM disk device groups, enter 3 (Device groups and volumes).
The Device Groups Menu appears.
To add a node to a VxVM disk device group, enter 4 (Add a node to a VxVM device group).
Follow the instructions and enter 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.
# scconf -p |
The following example shows the scconf command generated by scsetup when it adds a node (phys-schost-3) to a VxVM disk device group (dg1), and the verification step.
# scconf -a -D type=vxvm,name=dg1,nodelist=phys-schost-3 # scconf -p ... Device group name: dg1 Device type: VXVM Failback enabled: yes Node preference list: phys-schost-1, phys-schost-3 |
The method for establishing the primary ownership of a disk 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 disk 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 scsetup(1M) to set or unset the preferenced attribute and the failback attribute for Solstice DiskSuite or VxVM disk device groups.
To run this procedure, you need the name of the disk device group for which you are changing attribute values.
Become superuser on a node of the cluster.
Enter the scsetup(1M) utility
The Main Menu appears.
# scsetup |
To work with disk device groups, enter 3 (Device groups and volumes).
The Device Groups Menu appears.
To change a device group property, enter 6 (Change key properties of a VxVM or Solstice DiskSuite device group).
Follow the instructions to set the preferenced and failback options for a device group.
Verify that the disk device group attributes have been changed.
Look for the device group information displayed by the following command.
# scconf -p |
The following example shows the scconf command generated by scsetup when it sets the attribute values for a disk device group (dg-schost-1).
# scconf -c -D name=dg-schost-1,nodelist=phys-schost-1:phys-schost-2,\ preferenced=true,failback=enabled # scconf -p Device group name: dg-schost-1 Device type: SDS Failback enabled: yes Node preference list: phys-schost-1, phys-schost-2 Diskset name: dg-schost-1 |
You do not need to be superuser to list the configuration.
Use scconf(1M) to list the disk device group configuration.
% scconf -p |
When using the scconf command, look for the information listed under device groups.
# scconf -p ... Device group name: dg-schost-1 Device type: SDS Failback enabled: yes Node preference list: phys-schost-2, phys-schost-3 Diskset name: dg-schost-1 |
This procedure can also be used to start (bring online) an inactive device group.
Become superuser on a node of the cluster.
Use scswitch(1M) to switch the disk device group primary.
# scswitch -z -D disk-device-group -h node |
Performs the switch.
Specifies the device group to switch.
Specifies the name of the node to become the new primary.
Verify that the disk device group has been switched to the new primary.
Look for the disk device information for the device group displayed by the following command.
# scstat -D |
The following example shows how to switch the primary for a disk device group and verify the change.
# scswitch -z -D dg-schost-1 -h phys-schost-1 # scstat -D ... Device Group Name: dg-schost-1 Status: Online Primary: phys-schost-1 |