0% found this document useful (0 votes)
386 views

SC Quickreference

This document provides a summary of commands for managing Sun Cluster resources and configurations in 3 pages. It lists cluster commands for getting status, managing devices, resource groups, resources, and the cluster configuration. Example commands are given to create an NFS resource group with storage and network resources, and set properties.

Uploaded by

Rohaizad Minhat
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
386 views

SC Quickreference

This document provides a summary of commands for managing Sun Cluster resources and configurations in 3 pages. It lists cluster commands for getting status, managing devices, resource groups, resources, and the cluster configuration. Example commands are given to create an NFS resource group with storage and network resources, and set properties.

Uploaded by

Rohaizad Minhat
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Sun Cluster Commands – Page 1 Sun Microsystems, Juergen Schleich

Action Command Line Action Command Line


Sun Cluster Information Resource & Resource Group Operations
Cluster status SC32: cluster [status | show] [-v] Status/List Resource and SC32: clrg [list | status | show] -v
SC3x: scstat [-v] / scconf -pvv Resource Group SC32: clrs [list | status | show] -v
Installed Cluster SC3x: scinstall -pv or SC32: clrs list-props [[-t nfs] | -g [rg]] -v
version cat /etc/cluster/release SC3x: scrgadm -pvv or scconf -pv
Cluster name SC32: cluster list Switch a Resource Group SC32: clrg switch
SC3x: scconf -p | grep “Cluster name” SC3x: scswitch -z -g [rg] -h [host]
Cluster (did) devices SC32: cldev list -v Quisce a Resource Gbroup SC32: clrg quiesce [rg] [-k]
for all nodes SC3x: scdidadm -L SC3x: scswitch -Q -g [rg] [-k]
Cluster (did) devices SC32: cldev list -n [host] -v Suspend a Resource Group SC32: clrg suspend [rg] [-k]
on one node SC3x: scdidadm -l SC3x: scswitch -s -g [rg] [-k]
Further commands SC32: cldev status [-v] Resume a Resource Group SC32: clrg resume [rg]
Cluster (did) devices SC32: cldev show [-v] SC3x: scswitch -r -g [rg]
Cluster network SC32: clintr status / clintr show Manage/Unmanage SC32: clrg [manage | unmanage] [rg]
SC3x: scstat -W / scconf -p Resource Group SC3x: scswitch [-u | -o] -g [rg]
Status disk path SC32: cldev status Enable/Disable SC32: clrs [enable | disable] [rs]
monitoring SC32: clnode show | grep path_failure Resource(with/without SC32: clrs [monitor | unmonitor] [rs]
SC3x: scdpm -p all:all monitor) SC3x: scswitch [-e | -n] [-M] -j [resource]
Interactive menu SC32: clsetup Online/Offline Resource SC32: clrg [online | offline] [rg]
SC3x: scsetup Group SC3x: scswitch -F -g [rg] (-u is offline)
Online Resource Group with SC32: clrg online -emM [rg]
Device Group Operations all Resources SC3x: scswitch -Z -g [rg]
Switch a Device SC32: cldg switch -n [host] [devicegroup] Clear STOP_FAILED flag SC32: clrs clear -f STOP_FAILED -n [hostlist] [resource]
Group SC3x: scswitch -z -D [devicegroup] -h [host] SC3x: scswitch -c -j [resource] -h [hostlist] -f STOP_FAILED
Check localonly flag SC32: cldg show dsk/d[N] Clear Start_failed flag SC32: clrg restart -n [hostlist] [rg]
SC3x: scconf -pvv | grep dsk/d[N] SC3x: scswitch -R -h [hostlist] -g [rg]
Remove node from SC32:cldg remove-node -n [host] dsk/d[N] Register Resource Type SC32: clrt register [resource type]
nodelist SC3x: scconf -r -D name=dsk/d[N],nodelist=[host] SC3x: scrgadm -a -t [resource type]
Set localonly / SC32:cldg set -p localonly=true -p autogen=true dsk/d[N] Create Resource Group SC32: clrg create -n [hostlist] -p [property] [rg]
autogen flag SC3x: scconf -c -D name=dsk/d[N],localonly=true SC3x: scrgadm -a -g [rg] -h [hostlist] -y [property]
Cluster device SC32: cldg status [-v] Create Resource SC32: clrs create -g [rg] -t -t [resource type] -p [property] [rs]
groups SC32: cldg show SC3x: scrgadm -a -j [resource] -g [rg] -t [resource type]
SC3x: scstat -D [vv] -y [property] -x [ext_property]
Reconfigure global SC32: cldev populate Remove Resource Group SC32: clrg delete [-F] [rg]
devices SC3x: scgdevs SC3x: scrgadm -r -g [rg]
Clear global devices SC32: cldev clear Remove Resource SC32: clrs delete [-F] -g [rg] [rs]
SC3x: scdidadm -C SC3x: scrgadm -r -j [resource]
Set Resource and Resource Group properties
Set/Change Resource Group SC32: clrg set -n [hostlist] -p RG_dependencies=[rglist] [rg] SC3x: scrgadm -c -g [rg] -h [hostlist] -y RG_dependencies=[rglist]
property, e.g: RG_dependency SC32: clrg set -n [hostlist] -p RG_affinities=[++rglist] [rg] SC3x: scrgadm -c -g [rg] -h [hostlist] -y RG_affinities=[--rglist]
& RG_affinities
Set/Change Resource property SC32: clrs set -p Resource_dependencies=[rslist] [rs] SC3x: scrgadm -c -j [resource] -y Resource_dependencies=[rslist] -x [ext_property]
Sun Cluster Commands – Page 2 Sun Microsystems, Juergen Schleich

Action Command Line Action Command Line Action Command Line


Quorum Operations Boot Operations Rebuild Sun Cluster configuration – only SC3.2 onwards
Status quorum SC32: clq [list|status|show] -v Boot a node boot Export Cluster cluster export > clusterconfig.xml
device SC3x: scstat -q configuration
Add quorum device SC32: clq add [diddevice] Boot NONE cluster boot -x Delete all Resources clrg delete -F +
SC3x: scconf -a -q globaldev=[diddevice] and Groups
Remove quorum SC32: clq remove [diddevice] Stop a node init 0 or shutdown Recreate Resource clrg create -i clusterconfig.xml
device SC3x: scconf -r -q globaldev=[diddevice] Groups
Stop the cluster scshutdown Recreate Resources clrs create -i clusterconfig.xml

Switch all online clrg online +


Example to create NFS Resource Group
Register Reosource SC32: clrt register SUNW.nfs
Type SC3x: scrgadm -a -t SUNW.nfs
Create Resource SC32: clrg create -n host1,host2 -p Pathprefix=/global/nfs1 nfs1-rg
Group SC3x: scrgadm -a -g nfs1-rg -h host1,host2 -y Pathprefix=/global/nfs1
Create logical host SC32: clrslh create -g nfs1-rg -h logical_host -N ipmp0@host1,ipmp0@host2 logical_host-rs
Resource SC3x: scrgadm -a -L -j logical_host-rs -g nfs1-rg -l logical_host -n ipmp0@host0,ipmp0@host1
Optional: Create SC32: clrt register SUNW.HAStoragePlus
Storage Resource SC3x: scrgadm -a -t SUNW.HAStoragePlus
vi /etc/vfstab
for failover filesystem: /dev/md/nfsset/dsk/d10 /dev/md/nfsset/rdsk/d10 /global/nfs1 ufs 2 no logging
for global filesystem: /dev/md/nfsset/dsk/d10 /dev/md/nfsset/rdsk/d10 /global/nfs1 ufs 2 no global, logging
SC32: clrs create -g nfs1-rg -t SUNW.HAStoragePlus -p FilesystemMountPoints=/global/nfs1 -p AffinityOn=True nfs1-hastp-rs
SC3x: scrgadm -a -j nfs1-hastp-rs -g nfs1-rg -t SUNW.HAStoragePlus -x FilesystemMountPoints=/global/nfs1 -x AffinityOn=True
for zfs: SC32 only: clrs create -g nfs1-rg -t SUNW.HAStoragePlus -p Zpools=nfs1zpool -p AffinityOn=True nfs1-hastp-rs
Switch Resource SC32: clrg online -M nfs1-rg
Group online SC3x: scswitch -Z -g nfs1-rg
Create NFS mkdir /global/nfs1/SUNW.nfs; mkdir /global/nfs1/data
Resource vi /global/nfs1/SUNW.nfs/dfstab.nfs1-server-rs (add 'share -F nfs -o rw /global/nfs1/data)
SC32: clrs create -g nfs1-rg -t SUNW.nfs [-p Resource_dependencies=nfs1-hastp-rs] nfs1-server-rs
SC3x: scrgadm -a -j nfs1-server-rs -g nfs1-rg -t SUNW.nfs [-y Resource_dependencies=nfs1-hastp-rs]
Set property for NFS SC32: clrs set -p Failover_mode=SOFT nfs1-server-rs
Resource SC3x: scrgadm -c -j nfs1-server-rs -y Failover_mode=SOFT

You might also like