Sun Cluster's scconf

Using scconf you can view some useful information about Sun Cluster configuration such as information about cluster transport, disksets, etc.
Using multiple v’s you can increase output verbosity. It’s pretty useful especially if you inherited the cluster.
I added this command to my previous list, as well.

root@node1 # scconf -p -v
Cluster name: cluster
Cluster ID: 0x4538908A
Cluster install mode: disabled
Cluster private net: 172.16.0.0
Cluster private netmask: 255.255.0.0
Cluster new node authentication: unix
Cluster new node list: <. - Exclude all nodes>
Cluster transport heart beat timeout: 10000
Cluster transport heart beat quantum: 1000
Cluster nodes: node1 node2

Cluster node name: node1
(node1) Node ID: 1
(node1) Node enabled: yes
(node1) Node private hostname: clusternode1-priv
(node1) Node quorum vote count: 1
(node1) Node reservation key: 0x4538908A00000001
(node1) Node transport adapters: ce2 ce0

(node1) Node transport adapter: ce2
(node1:ce2) Adapter enabled: yes
(node1:ce2) Adapter transport type: dlpi
(node1:ce2) Adapter property: device_name=ce
(node1:ce2) Adapter property: device_instance=2
(node1:ce2) Adapter property: lazy_free=1
(node1:ce2) Adapter property: dlpi_heartbeat_timeout=10000
(node1:ce2) Adapter property: dlpi_heartbeat_quantum=1000
(node1:ce2) Adapter property: nw_bandwidth=80
(node1:ce2) Adapter property: bandwidth=70
(node1:ce2) Adapter property: netmask=255.255.255.128
(node1:ce2) Adapter property: ip_address=172.16.0.129
(node1:ce2) Adapter port names: 0

(node1:ce2) Adapter port: 0
(node1:ce2@0) Port enabled: yes

(node1) Node transport adapter: ce0
(node1:ce0) Adapter enabled: yes
(node1:ce0) Adapter transport type: dlpi
(node1:ce0) Adapter property: device_name=ce
(node1:ce0) Adapter property: device_instance=0
(node1:ce0) Adapter property: lazy_free=1
(node1:ce0) Adapter property: dlpi_heartbeat_timeout=10000
(node1:ce0) Adapter property: dlpi_heartbeat_quantum=1000
(node1:ce0) Adapter property: nw_bandwidth=80
(node1:ce0) Adapter property: bandwidth=70
(node1:ce0) Adapter property: netmask=255.255.255.128
(node1:ce0) Adapter property: ip_address=172.16.1.1
(node1:ce0) Adapter port names: 0

(node1:ce0) Adapter port: 0
(node1:ce0@0) Port enabled: yes

Cluster node name: node2
(node2) Node ID: 2
(node2) Node enabled: yes
(node2) Node private hostname: clusternode2-priv
(node2) Node quorum vote count: 1
(node2) Node reservation key: 0x4538908A00000002
(node2) Node transport adapters: ce2 ce0

(node2) Node transport adapter: ce2
(node2:ce2) Adapter enabled: yes
(node2:ce2) Adapter transport type: dlpi
(node2:ce2) Adapter property: device_name=ce
(node2:ce2) Adapter property: device_instance=2
(node2:ce2) Adapter property: lazy_free=1
(node2:ce2) Adapter property: dlpi_heartbeat_timeout=10000
(node2:ce2) Adapter property: dlpi_heartbeat_quantum=1000
(node2:ce2) Adapter property: nw_bandwidth=80
(node2:ce2) Adapter property: bandwidth=70
(node2:ce2) Adapter property: netmask=255.255.255.128
(node2:ce2) Adapter property: ip_address=172.16.0.130
(node2:ce2) Adapter port names: 0

(node2:ce2) Adapter port: 0
(node2:ce2@0) Port enabled: yes

(node2) Node transport adapter: ce0
(node2:ce0) Adapter enabled: yes
(node2:ce0) Adapter transport type: dlpi
(node2:ce0) Adapter property: device_name=ce
(node2:ce0) Adapter property: device_instance=0
(node2:ce0) Adapter property: lazy_free=1
(node2:ce0) Adapter property: dlpi_heartbeat_timeout=10000
(node2:ce0) Adapter property: dlpi_heartbeat_quantum=1000
(node2:ce0) Adapter property: nw_bandwidth=80
(node2:ce0) Adapter property: bandwidth=70
(node2:ce0) Adapter property: netmask=255.255.255.128
(node2:ce0) Adapter property: ip_address=172.16.1.2
(node2:ce0) Adapter port names: 0

(node2:ce0) Adapter port: 0
(node2:ce0@0) Port enabled: yes

Cluster transport junctions: switch1 switch2

Cluster transport junction: switch1
(switch1) Junction enabled: yes
(switch1) Junction type: switch
(switch1) Junction port names: 1 2

(switch1) Junction port: 1
(switch1@1) Port enabled: yes

(switch1) Junction port: 2
(switch1@2) Port enabled: yes

Cluster transport junction: switch2
(switch2) Junction enabled: yes
(switch2) Junction type: switch
(switch2) Junction port names: 1 2

(switch2) Junction port: 1
(switch2@1) Port enabled: yes

(switch2) Junction port: 2
(switch2@2) Port enabled: yes

Cluster transport cables

Endpoint Endpoint State
-------- -------- -----
Transport cable: node1:ce2@0 switch1@1 Enabled
Transport cable: node1:ce0@0 switch2@1 Enabled
Transport cable: node2:ce2@0 switch1@2 Enabled
Transport cable: node2:ce0@0 switch2@2 Enabled

Quorum devices: d9

Quorum device name: d9
(d9) Quorum device votes: 1
(d9) Quorum device enabled: yes
(d9) Quorum device name: /dev/did/rdsk/d9s2
(d9) Quorum device hosts (enabled): node1 node2
(d9) Quorum device hosts (disabled):
(d9) Quorum device access mode: scsi2

Device group name: dskset1-dg
(appset1-dg) Device group type: SVM
(appset1-dg) Device group failback enabled: no
(appset1-dg) Device group node list: node1, node2
(appset1-dg) Device group ordered node list: yes
(appset1-dg) Device group desired number of secondaries: 1
(appset1-dg) Device group diskset name: dskset1-dg
Continue Reading

Booting alternate device using reboot command

The other day after mirroring root disk I needed to test new devalias I made for backup root disk to see if the system would boot from it. Since my servers are headless and I was not “inclined” to console into it I wondered if it was somehow possible to reboot the system and have it boot from alternate boot device.

Knowing it’s possible to do reboot — -rv and such, I fired up the reboot man page. It turns out one can reboot system using:

root@ultra# reboot -- backup_root

This will cause the system too boot from backup_root device alias. Of course, the device alias had to be valid, which it was. Otherwise, I would end up forcing myself to console to the server.

You can also pass in the boot command some flags. For example to boot system from backup_root with -rv boot flags you would do:

root@ultra# reboot -- backup_root -rv Continue Reading

Using CVS with SMF

Most services in Solaris 10 are controlled by SMF. SMF uses xml files to define services it manages. I had a need to quickly create a service manifest for CVS. The inetconv command takes an input file with inetd.conf format and converts it into basic SMF manifest and imports it into the SMF repository. In the case of CVS I created cvs_inetd file with following content:

cvspserver stream tcp nowait root /export/apps/cvs -f --allow-root=/export/cvs_repos/primary --allow-root=/export/cvs_repos/secondary pserver

Then I converted and imported the file using the following:

root@ultra# inetconv -f -i ./cvs_inetd
cvspserver -> /var/svc/manifest/network/cvspserver-tcp.xml
Importing cvspserver-tcp.xml ...Done
root@ultra#

The resulting CVS manifest was saved in /var/svc/manifest/network. Later, if needed, you can view, modify, etc. the service manifest properties using svccfg and svcprop commands. The -f switch above causes CVS manifest in /var/svc/manifest/network be overwritten, if it exists.

Also, make sure cvspserver is defined in /etc/services. Continue Reading

Increasing number of NFS servers on Sun Cluster

By default Solaris 10 starts 16 NFS servers to handle NFS requests. You can tune this by editing /etc/default/nfs file.
<—————–SNIP—————->
# Maximum number of concurrent NFS requests.
# Equivalent to last numeric argument on nfsd command line.
NFSD_SERVERS=16

<—————–SNIP—————->
Changing above variables did not seem to have any effects on how many NFS server Sun Cluster started. Poking around I found nfs_start_daemons script which is part of SUNWscnfs package. In my case it was in /opt/SUNWscnfs/bin directory. It turns out that this script is looking at pre-Solaris 10 nfs.server init script to determine if more than 16 NFS servers are supposed to be started. In Solaris 10 NFS server as most of the services is handled by SMF. The /etc/init.d/nfs.server script is still present, probably due to legacy reasons, but it simply calls svcadm command to start NFS. Here is the relevant section of nfs_start_daemons script:
<—————–SNIP—————->
DEFAULT_NFSDCMD="/usr/lib/nfs/nfsd -a 16"
if [ -f /etc/init.d/nfs.server ]; then
NFSDCMD="`egrep '^[^#]*/usr/lib/nfs/nfsd' \
/etc/init.d/nfs.server \
2>/dev/null | head -1`"
fi

<—————–SNIP—————->
In order to increase number of NFS server that get started by Sun Cluster, you must change the number 16 above to something higher like 1024. Continue Reading

Moving LUN's between hosts using metarecover

Sometimes you might need to move a LUN between hosts X and Y on a SAN. Solaris has cool command, metarecover, that lets you do just that. First, you will need to stop all processes on X that might be using the given LUN. Then unmount the LUN and present it to the host Y. Now you can use metarecover to recover metadevice information from the LUN. Couple of things to remember:

There is -n switch that will cause dry run, i.e. metarecover will output what it would do – it will not actually perform recovery operation. Also, be careful about metadevice names on host Y and the ones you are trying to recover. I have not tried it so I am not sure what would happen. It would probably bomb out. You could use metarename to rename Y’s existing metadevices and try to eliminate possible conflict before recovery.

root@ultra# metarecover -v c3t600508B400011C370000C00002970000d0s2 -p -d
Verifying on-disk structures on
c3t600508B400011C370000C00002970000d0s2.
The following extent headers were found on
c3t600508B400011C370000C00002970000d0s2.
Name Seq# Type Offset
Length
d100 0 ALLOC 205635593
25165825
d110 0 ALLOC 16384
32769
d120 0 ALLOC 49153
32769
d130 0 ALLOC 81922
32769
d140 0 ALLOC 114691
41943041
d150 0 ALLOC 42057732
146800641
d160 0 ALLOC 188858373
2097153
d170 0 ALLOC 190955526
6291457
d180 0 ALLOC 197246983
6291457
d190 0 ALLOC 203538440
2097153
NONE 0 END 251609087
1
NONE 0 FREE 230801418
20807669
Found 10 soft partition(s) on c3t600508B400011C370000C00002970000d0s2.
Checking sequence numbers.
mp->c.un_type: 5
mp->c.un_size: 136
mp->c.un_self_id: 100
mp->un_status: 5
mp->un_numexts: 1
mp->un_length: 25165824
mp->un_dev: 30933010
mp->un_key: 43
Ext# voff poff Len
0 0 205635594 25165824
mp->c.un_type: 5
mp->c.un_size: 136
mp->c.un_self_id: 110
mp->un_status: 5
mp->un_numexts: 1
mp->un_length: 32768
mp->un_dev: 30933010
mp->un_key: 43
Ext# voff poff Len
0 0 16385 32768
mp->c.un_type: 5
mp->c.un_size: 136
mp->c.un_self_id: 120
mp->un_status: 5
mp->un_numexts: 1
mp->un_length: 32768
mp->un_dev: 30933010
mp->un_key: 43
Ext# voff poff Len
0 0 49154 32768
mp->c.un_type: 5
mp->c.un_size: 136
mp->c.un_self_id: 130
mp->un_status: 5
mp->un_numexts: 1
mp->un_length: 32768
mp->un_dev: 30933010
mp->un_key: 43
Ext# voff poff Len
0 0 81923 32768
mp->c.un_type: 5
mp->c.un_size: 136
mp->c.un_self_id: 140
mp->un_status: 5
mp->un_numexts: 1
mp->un_length: 41943040
mp->un_dev: 30933010
mp->un_key: 43
Ext# voff poff Len
0 0 114692 41943040
mp->c.un_type: 5
mp->c.un_size: 136
mp->c.un_self_id: 150
mp->un_status: 5
mp->un_numexts: 1
mp->un_length: 146800640
mp->un_dev: 30933010
mp->un_key: 43
Ext# voff poff Len
0 0 42057733 146800640
mp->c.un_type: 5
mp->c.un_size: 136
mp->c.un_self_id: 160
mp->un_status: 5
mp->un_numexts: 1
mp->un_length: 2097152
mp->un_dev: 30933010
mp->un_key: 43
Ext# voff poff Len
0 0 188858374 2097152
mp->c.un_type: 5
mp->c.un_size: 136
mp->c.un_self_id: 170
mp->un_status: 5
mp->un_numexts: 1
mp->un_length: 6291456
mp->un_dev: 30933010
mp->un_key: 43
Ext# voff poff Len
0 0 190955527 6291456
mp->c.un_type: 5
mp->c.un_size: 136
mp->c.un_self_id: 180
mp->un_status: 5
mp->un_numexts: 1
mp->un_length: 6291456
mp->un_dev: 30933010
mp->un_key: 43
Ext# voff poff Len
0 0 197246984 6291456
mp->c.un_type: 5
mp->c.un_size: 136
mp->c.un_self_id: 190
mp->un_status: 5
mp->un_numexts: 1
mp->un_length: 2097152
mp->un_dev: 30933010
mp->un_key: 43
Ext# voff poff Len
0 0 203538441 2097152
The following soft partitions were found and will be added to
your metadevice configuration.
Name Size No. of Extents
d100 25165824 1
d110 32768 1
d120 32768 1
d130 32768 1
d140 41943040 1
d150 146800640 1
d160 2097152 1
d170 6291456 1
d180 6291456 1
d190 2097152 1
WARNING: You are about to add one or more soft partition
metadevices to your metadevice configuration. If there
appears to be an error in the soft partition(s) displayed
above, do NOT proceed with this recovery operation.
Are you sure you want to do this (yes/no)? yes
c3t600508B400011C370000C00002970000d0s2: Soft Partitions recovered
from device.
root@ultra#
Continue Reading

Page 7 of 9« First...56789