Domů » Články » Sun Cluster 3 Command Summary
 

Sun Cluster 3 Command Summary

Cluster Node Operations
Operation Command Example
Boot a node – none cluster mode boot -x (At „ok“ prompt) ok boot -x
Stopping a node 1. scswitch scswitch -S -h nodeA (switch resources)
2. shutdown shutdown -y -g30 -i0
Rebooting a node 1. scswitch scswitch -S -h nodeA (switch resources)
2. shutdown shutdown -y -g30 -i6
Disable quorum vote for a node scconf scconf -c -q node=nodeA,maintstate
Stopping the cluster scshutdown scshutdown -y -g10
Display status information scstat scstat [ -pvv ]
Display quorum information scstat scstat -q
Display cluster configuration scconf scconf -p [ -pvv ]
Check the cluster configuration sccheck sccheck -v
Backup the cluster configuration tar tar -cv /etc/cluster/ccr
Restore the cluster configuration 1. scshutdown 1. scshutdown -y -g0
2. boot 2. ok boot -sx
3. tar 3. tar -xv
Cluster Quorum Device Operations
Operation Command Example
Display quorum information scstat scstat -q
Remove a quorum device scconf scconf -r -q globaldev=d30
Add a quorum device scconf scconf -a -q globaldev=d12
Put into maintenance state scconf scconf -c -q globaldev=d15,maintstate
Bring out of maintenance state scconf scconf -c -q globaldev=d15,reset
Veritas Volume Manager Operations
Operation Command Example
Add disk group to cluster scconf scconf -a -D type=vxvm,name=m-dg,nodelist=nodeA:nodeB
Register change to disk group scconf scconf -c -D name=mydg,sync
Switch device group to a node scswitch scswitch -z -D mydg -h nodeA (node to switch to)
Check status scstat scstat -D
Change properties scconf scconf -c -D name=mydg,nodelist=nodeA:nodeB,
preferenced=true,failback=disabled
Nafo Group Operations
Operation Command Example
Creating nafo group pnmset pnmset -c nafo0 -o create hme0 qfe0
Deleting nafo group pnmset pnmset -c nafo0 -o delete
Adding a card pnmset pnmset -c nafo0 -o add qfe0
Removing card pnmset pnmset -c nafo0 -o remove qfe0
Switching active adaptor pnmset pnmset -c nafo0 -o switch qfe0 (Adaptor to switch to)
Check status pnmset pnmset -l
Display current configuration pnmset pnmset -p
Which group a card belongs to pnmrtop pnmrtop hme0
Which is the active card pnmptor pnmptor nafo0
Change pnm parameters vi vi /etc/cluster/pnmparams
Resource Group Operations
Operation Command Example
Check current status scstat scstat -g
View configuration scrgadm scrgadm -p [-pvv] -g my-rg
Switch to a node scswitch scswitch -z -g my-rg -h nodeB (Bring online on nodeB)
Take offline on all nodes scswitch scswitch -F -g my-rg
Bring online on primary node scswitch scswitch -Z -g my-rg
Brine online on named node scswitch scswitch -z -g my-rg -h nodeB
Put into unmanaged state scswitch scswitch -F -g my-rg
scswitch -n -j my-res (Disable all resource in group)
scswitch -u -g my-rg
Bring into managed state scswitch scswitch -Z my-rg
Restart resource group scswitch scswitch -R -h nodeB -g my-rg
Disable resource scswitch scswitch -n -j my-resource
Enable resource scswitch scswitch -e -j my-resource
Clear STOP_FAILED flag scswitch scswitch -c -h nodeB -j my-resource -f STOP_FAILED
Device Group Operations
Operation Command Example
Check current status scstat scstat -D
Switch to a node scswitch scswitch -z -D my-dg -h nodeA
Put into maintenance scswitch scswitch -m -D my-dg
Bring online scswitch scswitch -z -D my-dg -h nodeB
Resource Group Configuration
Operation Command Example
Create Resource Group scrgadm -a -g my-rg -h nodeA,nodeB [ -y Pathprefix=/my-directory ]
Add resource to Group scrgadm -a -j my-res -g my-rg -t SUNW.nfs -x ServicePaths=/my-directory
Remove resource from group 1. scswitch -F -g my-rg (Switch resource group offline)
2. scswitch -n -j my-res (Disable resource)
3. scrgadm -r -j my-res (Remove resource)
4. scswitch -Z my-rg (bring resource group on-line)
Add logical host resource scrgadm -a -L -j my-lh -g my-rg -l logical_host_name
Add share address resource scrgadm -a -S -j my_salh -g my-rg -l logical_host_name
Modify resource parameter scrgadm -a -j my-res -x property=new_value
Remove a resource group 1. scstat -g (List group and its resources)
2. scswitch -F -g my-rg (Switch resource group offline)
3. scswitch -n -j my-res (Disable resources)
4. scrgadm -r -j my-res (Remove resources)
5. scrgadm -r -g my-rg (Remove resource group)