Anda di halaman 1dari 10

25/9/2014

Sun Cluster 3.1 Command Line Cheat Sheet | Syslog.eu

Syslog.eu
System log of the Unix and other worlds
Search

Search

Home
Photo Gallery
Online services
-- Main Menu --

Mar
13
By admin
0
Tweet

0
Like

Sun Cluster 3.1 Command Line Cheat Sheet


Category: Solaris, Unix Tags: Solaris, Solaris Cluster Leave a Comment

This page describes basic Sun Cluster 3.1 administration commands, including the following command line
interface commands: scrgadm, scswitch, scconf, scstat, and scdpm.

scrgadm
Manage registration and unregistration of resource types, resource groups, and resources
Action
-a

(add)

Object
-g

Who

What

(group)

f registration- -y
file path

-c

(change)

-j

(resource)

-r

(remove)

-t

(resource type)

Hosts
-

(physical host) x (extensionparam=value) l (logical host)


(param=value)

-p[vv] (print)
v = state of resources L (for Logicalhostnames) vv = parameter values n netiflist
S

(for Shared Addresses) -

http://syslog.eu/50-sun-cluster-3-1-command-line-cheat-sheet-html

1/10

25/9/2014

Sun Cluster 3.1 Command Line Cheat Sheet | Syslog.eu

n netiflist X auxnodelist

Examples
Register a resource type named MyDatabase:
# scrgadm -a -t MyDatabase
Create a failover resource group named MyDatabaseRG:
# scrgadm -a -g MyDatabaseRG
Create a scalable resource group named MyWebServerRG:
# scrgadm -a -g MyWebServerRG
-y Maximum_primaries=integer
-y Desired_primaries=integer
Create a resource of a given type in a resource group:
# scrgadm -a -j resource-name -t resource-type-name -g RG-name
See the rg_properties(5) man page for a description of the resource group properties. See the
r_properties(5) man page for a description of the resource properties.

scconf
Update the Sun Cluster software configuration
Action

Object
C

-a

(add)

-c

(change) -A (adapter)

-r

(remove)

p[vv]

(cluster option)

(transport
junction)
-B

(cable
(print) endpoint)
-m

What
cluster=clustername
add: trtype=type,name=name,node=node[,other-options] change
name=name,node=node[,state=state][,other-options_remove
name=_name,node=node
add: type=type,name=name[,other-options] change
name=name[,state=state][,other-options] remove name=name
add: endpoint=[node:]name[@port],endpoint=[node:]name[@port]
[,noenable] change: endpoint=[node:]name[@port],state=state remove:
endpoint=[node:] name[@port]

(private net
name)

add: node=node[,privatehostname=node[,privatehostname=hostalias]

-q (quorum)

add: globaldev=devicename[,node=node,node=node[,...]] change:


node=node,{maintstate | reset]} change globaldev= devicename,
{maintstate | reset} change:resetchange: installmoderemove:
globaldev=devicename

-P

add: type=type,name=name[,nodelist=node [: node]...][,preferenced=


http://syslog.eu/50-sun-cluster-3-1-command-line-cheat-sheet-html

2/10

25/9/2014

Sun Cluster 3.1 Command Line Cheat Sheet | Syslog.eu

-D

(devicegroup)

(authentication)

-h (nodes)

{true | false}][,failback={enabled | disabled}][,otheroptions ]


change name=name [,nodelist=node[:node]...][,preferenced={true |
false}][,failback={enabled | disabled}][,other-options ]
removename=name [,nodelist=node[:node]...]
add: node=nodename[,...][,authtype=authtype] change
authtype=authtype remove {node=nodename [,...] | all}
add: node=nodename remove node=nodename or nodeID

Examples
Register a new disk group:
# scconf -a -D type=vxvm,name=new-disk-group,nodelist=nodex:nodex
Synchronize device group information after adding a volume:
# scconf -c -D name=diskgroup,sync
Add a shared quorum device to the cluster:
# scconf -a -q globaldev=nodename
Clear installmode:
# scconf -c -q reset
Configure a second set of cluster transport connections:
# scconf -a
-A trtype=transport,name=ifname1,node=nodename1
-A trtype=transport,name=ifname2,node=nodename2
-m endpoint=nodename1:ifname1,endpoint=nodename2:ifname2
Secure the cluster against other machines that might attempt to add themselves to the cluster:
# scconf -a -T node=.

scswitch
Perform ownership/state change of resource groups and disk device groups in Sun Cluster
configurations
Action
-z

(bring online)

Object
-g (resource
group) -

Who

http://syslog.eu/50-sun-cluster-3-1-command-line-cheat-sheet-html

Special

3/10

25/9/2014

Sun Cluster 3.1 Command Line Cheat Sheet | Syslog.eu

(device
group)
D

(bring everything
online)
-Z

(take offline for all


nodes)
-F

(target host) -h "" (no receiver) takes resource group offline

(resource
group)
-g (resource
group)D (device
group)
-g

no -g brings all resource groups online

specifies the number of seconds to keep


resource groups from switching back onto a node
after that node has been successfully evacuated.
Default is 60 seconds, and can be set up to 65535
seconds. Starting with Sun Cluster 3.1 Update 3.
-K #

(switch all DG and


RG)

(losing
host)

-S

-R

(restart all RG)

(set maintenance
mode)
-m

-u

(unmanage RG)

-o

(online RG)

(enable resource)
-n (disable resource)
-e

-h

(clear flag

(device
group)
-g (resource
group)
-g (resource
group)
-j (resource)
-j (resource)
-D

j
STOP_FAILED)
f

(quiesce resource
group (starting in Sun
Cluster 3.1 update 3))
-Q

(target host)

-M

disables monitoring only

-M

disables monitoring only

(resource) h (target host)


(flag name)

(resource
group)
-g

Examples
Switch over resource-grp-2 to be mastered by node1:
# scswitch -z -h node1 -g resource-grp-2
Switch over resource-grp-3, a resource group configured to have multiple primaries, to be mastered by
node1, node2, node3:
# scswitch -z -h node1,node2,node3 -g resource-grp-3
Switch all managed resource groups online on their most preferred node or nodes:
# scswitch -z
Quiesce resource-grp-2. Stops RG from continuously bouncing around from one node to another in the event
of the failure of a START or STOP method:

http://syslog.eu/50-sun-cluster-3-1-command-line-cheat-sheet-html

4/10

25/9/2014

Sun Cluster 3.1 Command Line Cheat Sheet | Syslog.eu

# scswitch -Q -g resource-group-2
Switch over all resource groups and disk device groups from node1 to a new set of primaries:
# scswitch -S -h node1
Restart some resource groups on specified nodes:
node1# scswitch -R -h node1,node2 -g resource-grp-1,resource-grp-2
Disable some resources:
# scswitch -n -j resource-1,resource-2
Enable a resource:
# scswitch -e -j resource-1
Take resource groups to the unmanaged state:
# scswitch -u -g resource-grp-1,resource-grp-2
Take resource groups to the online state:
# scswitch -o -g resource-grp-1,resource-grp-2
Switch over device-group-1 to be mastered by node2:
# scswitch -z -h node2 -D device-group-1
Put device-group-1 into maintenance mode:
# scswitch -m -D device-group-1
Move all resource groups and disk device groups persistently off of a node:
# scswitch -S -h iloveuamaya -K 120
This situation arises when resource groups attempt to switch back automatically when strong negative
affinities have been configured (with RG_affinities).
http://syslog.eu/50-sun-cluster-3-1-command-line-cheat-sheet-html

5/10

25/9/2014

Sun Cluster 3.1 Command Line Cheat Sheet | Syslog.eu

scstat
Monitor the status of Sun Cluster
Action
-D (shows status for all disk groups)
-g

Options

(shows status for all resource groups)

(shows status for all IPMP groups and public


network adapters)
-n (shows status for all nodes)
-h host (shows status for the specified node)
-p (shows status for all components in the cluster)
-q (shows status for all device quorums and node
quorums)
-W (shows status for cluster transport path)

(show status of all components related to


specified host)
-h host

-i

-v[v]

verbose output

Examples
Show status of all resource groups followed by the status of all components related to node1:
# scstat -g -h node1
or:
# scstat -g
and
# scstat -h node1

scdpm
Available starting in Sun Cluster 3.1 update 3.
Disk-path monitoring administration command
Action

What
[node]

(monitor the new disk path that is specified by node:disk path. All is default
option)
-m

[node:all]
[node:/dev/dis/rdsk/d]
[node]

(unmonitor a disk path. The daemon on each node stops monitoring the specified [node:all]
path. All is default option)
[node:/dev/dis/rdsk/d]
-u

-p [-F]

(print current status of a specified disk path from all the nodes that are

http://syslog.eu/50-sun-cluster-3-1-command-line-cheat-sheet-html

[node]

[node:all]
6/10

25/9/2014

Sun Cluster 3.1 Command Line Cheat Sheet | Syslog.eu

attached to the storage. All is default option. The -F option prints only faulty disk
paths)
-f filename

[node:/dev/dis/rdsk/d]

(read the list of disk paths to monitor or unmonitor for a specified file

name.)

Examples
Force daemon to monitor all disk paths in the cluster infrastructure:
# scdpm -m all
Monitor a new path on all nodes where path is valid:
# scdpm -m /dev/did/dsk/d3
Monitor new paths on just node1:
# scdpm -m node1:d4 -m node1:d5
Print all disk paths in the cluster and their status:
# scdpm -p all:all
Print all failed disk paths:
# scdpm -p -F all
Print the status of all disk paths from node1:
# scdpm -p node1:all

The Best VPS, Period


softlayer.com/vps
No Secrets or Surprises. Cloud w/ Nothing to Hide. Chat for Info!

Related Posts
XSCF console commands
Solaris Volume Manager mirror disk
Solaris: cannot find ELF

Leave a Reply
Your email address will not be published. Required fields are marked *
http://syslog.eu/50-sun-cluster-3-1-command-line-cheat-sheet-html

7/10

25/9/2014

Sun Cluster 3.1 Command Line Cheat Sheet | Syslog.eu

Name *
Email *
Website

Comment
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title="">
<b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Comment
Sony BRAVIA KLV-28R412B 28 Inches

Snapdeal

Save with Snapdeal


Rs.24,045

Recent Posts
What to use for a home NAS?
Stale NFS file handle SPARC and ZFS (x86 update)
Setting NFS server version on Solaris 11
Sun Cluster 3.1 Command Line Cheat Sheet
XSCF console commands

Tags
/proc boot CLOSE_WAIT

compilation dhcp Dostl Eurotel filesystem GfK Google gprs gzip hacking IPv4 IPv6 kernel lilo Linux lsof Median

NFS panic performance monitor ppp Slackware Solaris spam SuperStar swap
sysctl syslog tcp/ip ultrazvuk VGA Vladimr Mlyn vpn vxfs WEPCrack wifi ZFS
Mediaprojekt Michal Zelenka nat ndd NetStumbler

Categories
http://syslog.eu/50-sun-cluster-3-1-command-line-cheat-sheet-html

8/10

25/9/2014

Sun Cluster 3.1 Command Line Cheat Sheet | Syslog.eu

HP-UX
Linux
Mdia
Obecn
lendrin
Solaris
Technika
Unix
Web

Archives
April 2013
November 2012
March 2010
February 2010
October 2008
September 2008
January 2008
December 2007
July 2007
June 2007
October 2006
September 2006
July 2006
June 2006
May 2006
April 2005
November 2004
October 2004
August 2004
June 2004
March 2004
January 2004
December 2003

Recent Posts
What to use for a home NAS?
A few weeks ago I started to think about to merge my old home server and my NAS (old ICYBOX IBNAS4220 dont you want one?) into one piece of hardware. I was facing decisions what hardware
and what OS should I choose for this new server. Even Linus Torvalds was solving a similar issue []
Read more

Twitter Feed
Links
Algosystems
http://syslog.eu/50-sun-cluster-3-1-command-line-cheat-sheet-html

9/10

25/9/2014

Sun Cluster 3.1 Command Line Cheat Sheet | Syslog.eu

Fast Office
NSMon.com
2014 Syslog.eu

http://syslog.eu/50-sun-cluster-3-1-command-line-cheat-sheet-html

10/10

Anda mungkin juga menyukai