Beruflich Dokumente
Kultur Dokumente
Also both versions of Cluster have a text based GUI tool, so don't be afraid to use this, especially if the task is a simple one
• scsetup (3.1)
• clsetup (3.2)
Also all the commands in version 3.1 are available to version 3.2
At the bottom of the installation guide I listed the daemons and processing running after a fresh install, now is the time explain what these
processes do, I have managed to obtain informtion on most of them but still looking for others.
http://www.datadisk.co.uk/html_docs/sun/sun_cluster_cs.htm 9/15/2010
Sun Cluster 3.2 - Cheat Sheet Page 2 of 12
Public managment network service daemon manages network status information received from the local IPMP daemon
pnmd running on each node and facilitates application failovers caused by complete public network failures on nodes. It
is automatically restarted if it is stopped.
Disk path monitoring daemon monitors the status of disk paths, so that they can be reported in the output of the
cldev status command. It is automatically restarted if it is stopped.
scdpmd Multi-threaded DPM daemon runs on each node. It is automatically started by an rc script when a node boots. It
monitors the availibility of logical path that is visiable through various multipath drivers (MPxIO), HDLM,
Powerpath, etc. Automatically restarted by rpc.pmfd if it dies.
File locations
http://www.datadisk.co.uk/html_docs/sun/sun_cluster_cs.htm 9/15/2010
Sun Cluster 3.2 - Cheat Sheet Page 3 of 12
SCSI Reservations
scsi2:
/usr/cluster/lib/sc/pgre -c pgre_inkeys -d /dev/did/rdsk/d4s2
Display reservation keys
scsi3:
/usr/cluster/lib/sc/scsi -c inkeys -d /dev/did/rdsk/d4s2
scsi2:
/usr/cluster/lib/sc/pgre -c pgre_inresv -d /dev/did/rdsk/d4s2
determine the device owner
scsi3:
/usr/cluster/lib/sc/scsi -c inresv -d /dev/did/rdsk/d4s2
Command shortcuts
In version 3.2 there are number of shortcut command names which I have detailed below, I have left the full command name in the rest of
the document so it is obvious what we are performing, all the commands are located in /usr/cluster/bin
shortcut
cldevice cldev
cldevicegroup cldg
clinterconnect clintr
clnasdevice clnas
clquorum clq
clresource clrs
clresourcegroup clrg
clreslogicalhostname clrslh
clresourcetype clrt
clressharedaddress clrssa
http://www.datadisk.co.uk/html_docs/sun/sun_cluster_cs.htm 9/15/2010
Sun Cluster 3.2 - Cheat Sheet Page 4 of 12
3.1 3.2
cluster shutdown -g0 -y
##other nodes in cluster
scswitch -S -h <host>
shutdown -i5 -g0 -y
shutdown entire cluster
## Last remaining node
scshutdown -g0 -y
Cluster information
3.1 3.2
cluster list -v
Cluster scstat -pv cluster show
cluster status
clnode list -v
Nodes scstat –n clnode show
clnode status
cldevice list
Devices scstat –D cldevice show
cldevice status
clquorum list -v
Quorum scstat –q clquorum show
clqorum status
clinterconnect show
Transport info scstat –W
clinterconnect status
clresource list -v
Resources scstat –g clresource show
clresource status
clresourcegroup list -v
scsat -g
Resource Groups scrgadm -pv
clresourcegroup show
clresourcegroup status
clresourcetype list -v
Resource Types clresourcetype list-props -v
clresourcetype show
IP Networking Multipathing scstat –i clnode status -m
Installation info (prints packages and version) scinstall –pv clnode show-rev -v
http://www.datadisk.co.uk/html_docs/sun/sun_cluster_cs.htm 9/15/2010
Sun Cluster 3.2 - Cheat Sheet Page 5 of 12
Cluster Configuration
3.1 3.2
Release cat /etc/cluster/release
Integrity check sccheck cluster check
Configure the cluster (add nodes, add data scinstall
services, etc) scinstall
Cluster configuration utility (quorum, data scsetup clsetup
sevices, resource groups, etc)
Rename cluster rename -c <cluster_name>
Set a property cluster set -p <name>=<value>
## List cluster commands
cluster list-cmds
## Detailed configuration
cluster show -t global
Status cluster status
Reset the cluster private network settings cluster restore-netprops <cluster_name>
Place the cluster into install mode cluster set -p installmode=enabled
Add a node scconf –a –T node=<host><host> clnode add -c <clustername> -n <nodename> -e endpoint1,endpoin
Remove a node scconf –r –T node=<host><host> clnode remove
Prevent new nodes from entering scconf –a –T node=.
scconf -c -q node=<node>,maintstate
Put a node into maintenance state Note: use the scstat -q command to verify
that the node is in maintenance mode, the
vote count should be zero for that node.
scconf -c -q node=<node>,reset
Get a node out of maintenance state Note: use the scstat -q command to verify
that the node is in maintenance mode, the
vote count should be one for that node.
http://www.datadisk.co.uk/html_docs/sun/sun_cluster_cs.htm 9/15/2010
Sun Cluster 3.2 - Cheat Sheet Page 6 of 12
Node Configuration
3.1 3.2
clnode add [-c <cluster>] [-n <sponsornode>] \
-e <endpoint> \
Add a node to the cluster -e <endpoint>
<node>
## Make sure you are on the node you wish to remove
Remove a node from the cluster clnode remove
Evacuate a node from the cluster scswitch -S -h <node> clnode evacuate <node>
Cleanup the cluster configuration (used after clnode clear <node>
removing nodes)
## Standard list
clnode list [+|<node>]
List nodes
## Destailed list
clnode show [+|<node>]
Quorum devices are nodes and disk devices, so the total quorum will be all nodes and devices added together. You can use the scsetup
(3.1)/clsetup(3.2) interface to add/remove quorum devices or use the below commands.
3.1
scconf –a –q globaldev=d11
Adding a SCSI device to the quorum clquorum add [-t <type>] [-p <name>=<value>] [+
Note: if you get the error message "uable to scrub device"
use scgdevs to add device to the global device namespace.
Adding a NAS device to the quorum n/a clquorum add -t netapp_nas -p filer=<nasdevice>
Adding a Quorum Server n/a clquorum add -t quorumserver -p qshost<IPaddres
Removing a device to the quorum scconf –r –q globaldev=d11 clquorum remove [-t <type>] [+|<devicename>]
## Evacuate all nodes ## Place the cluster in install mode
cluster set -p installmode=enabled
## Put cluster into maint mode
Remove the last quorum device scconf –c –q installmode ## Remove the quorum device
clquorum remove <device>
## Remove the quorum device
http://www.datadisk.co.uk/html_docs/sun/sun_cluster_cs.htm 9/15/2010
Sun Cluster 3.2 - Cheat Sheet Page 7 of 12
## Standard list
clquorum list -v [-t <type>] [-n <node>] [+|<de
## Detailed list
List clquorum show [-t <type>] [-n <node>]
## Status
clquorum status [-t <type>] [-n <node>] [+|<dev
scconf –c –q reset
Resetting quorum info clquorum reset
Note: this will bring all offline quorum devices online
Device Configuration
3.1
Check device cldevice check [-n <node>] [+]
Remove all devices from node cldevice clear [-n <node>]
## Turn on monitoring
cldevice monitor [-n <node>] [+|<device>]
Monitoring
## Turn off monitoring
cldevice unmonitor [-n <node>] [+|<device>]
## Standard display
cldevice status [-s <state>] [-n <node>]
Status
## Display failed disk paths
cldevice status -s fail
http://www.datadisk.co.uk/html_docs/sun/sun_cluster_cs.htm 9/15/2010
Sun Cluster 3.2 - Cheat Sheet Page 8 of 12
## Standard List
cldevice list [-n <node>] [+|<device>]
Lists all the configured devices including scdidadm –L
paths across all nodes. ## Detailed list
cldevice show [-n <node>] [+|<device>]
List all the configured devices including paths scdidadm –l see above
on node only.
Reconfigure the device database, creating scdidadm –r
cldevice populate
new instances numbers if required. cldevice refresh [-n <node>] [+]
Perform the repair procedure for a particular scdidadm –R <c0t0d0s0> - device cldevice repair [-n <node>] [+|<device>]
path (use then when a disk gets replaced) scdidadm –R 2 - device id
Disks group
3.1
Create a device group n/a cldevicegroup create
Remove a device group n/a cldevicegroup delete <devgrp
Adding scconf -a -D type=vxvm,name=appdg,nodelist=<host>:<host>,preferenced=true cldevicegroup add
Removing scconf –r –D name=<disk group> cldevicegroup remove
Set a property cldevicegroup set [
## Standard list
cldevicegroup list [
List scstat
## Detailed configuration re
cldevicegroup show [
Transport Cable
http://www.datadisk.co.uk/html_docs/sun/sun_cluster_cs.htm 9/15/2010
Sun Cluster 3.2 - Cheat Sheet Page 9 of 12
3.1
Add clinterconnect add <endpoint>,<endpoint>
Remove clinterconnect remove <endpoint>,<endpoint>
Enable scconf –c –m endpoint=<host>:qfe1,state=enabled clinterconnect enable [-n <node>] [+|<endpoint>,<en
scconf –c –m endpoint=<host>:qfe1,state=disabled
Disable clinterconnect disable [-n <node>] [+|<endpoint>,<e
Note: it gets deleted
## Standard and detailed list
List scstat
clinterconnect show [-n <node>][+|<endpoint>,<endpo
Status scstat clinterconnect status [-n <node>][+|<endpoint>,<end
Resource Groups
3.1
http://www.datadisk.co.uk/html_docs/sun/sun_cluster_cs.htm 9/15/2010
Sun Cluster 3.2 - Cheat Sheet Page 10 of 12
Evacuate all resource groups from a node clresourcegroup evacuate [+|-n <node>]
(used when shutting down a node)
scswitch –u –g <res_group>
Unmanaging clresourcegroup unmanage <res_group>
Note: (all resources in group must be disabled)
Resources
3.1
Adding failover network resource scrgadm –a –L –g <res_group> -l <logicalhost> clreslogicalhostname create
Adding shared network resource scrgadm –a –S –g <res_group> -l <logicalhost> clressharedaddress create
scrgadm –a –j apache_res -g <res_group> \
adding a failover apache application and -t SUNW.apache -y Network_resources_used = <logicalhost>
attaching the network resource -y Scalable=False –y Port_list = 80/tcp \
-x Bin_dir = /usr/apache/bin
scrgadm –a –j apache_res -g <res_group> \
adding a shared apache application and -t SUNW.apache -y Network_resources_used = <logicalhost>
attaching the network resource -y Scalable=True –y Port_list = 80/tcp \
-x Bin_dir = /usr/apache/bin
scrgadm -a -g rg_oracle -j hasp_data01 -t SUNW.HAStoragePlus \ clresource create -t HAStorage
Create a HAStoragePlus failover resource > -x FileSystemMountPoints=/oracle/data01 \ -p FilesystemMountPoints=<mount
> -x Affinityon=true -p Affinityon=true <rs-hasp>
scrgadm –r –j res-ip
Removing clresource delete [-g <res_group>][
Note: must disable the resource first
http://www.datadisk.co.uk/html_docs/sun/sun_cluster_cs.htm 9/15/2010
Sun Cluster 3.2 - Cheat Sheet Page 11 of 12
## Changing
clresource set -t <type>
changing or adding properties scrgadm -c -j <resource> -y <property=value>
## Adding
clresource set -p <name>+=<value>
Resource Types
3.1
Adding (register in 3.2) scrgadm –a –t <resource type> i.e SUNW.HAStoragePlus clresourcetype register <type>
Register a resource type to a node n/a clresourcetype add-node -
Deleting (remove in 3.2) scrgadm –r –t <resource type> clresourcetype unregister
Deregistering a resource type from a node n/a clresourcetype remove-node
Listing scrgadm –pv | grep ‘Res Type name’ clresourcetype list [<type>]
Listing resource type properties clresourcetype list-props
Show resource types clresourcetype show [<type>]
http://www.datadisk.co.uk/html_docs/sun/sun_cluster_cs.htm 9/15/2010
Sun Cluster 3.2 - Cheat Sheet Page 12 of 12
http://www.datadisk.co.uk/html_docs/sun/sun_cluster_cs.htm 9/15/2010