Tuesday, June 2, 2009

SC and SMS command may useful.... Just a notes

Following list of SC and SMS command may useful during field intervention:

1. Reset CHS with SMS
# showchs -v -c sb10
# setchs -s OK -r "Now its Okay" -c sb10/P0


2. Shutdown domain gracefully (init 0) from SC (tested on SF15K platform)
# setkeyswitch -y -d Domain_name standby

3. .postrc file owner and permission

/etc/opt/SUNWSMS/SMS.x.x.x/config/Domain_Name/.postrc ==> [rw-r--r--] root/sms

4. .postrc ==> "allow_us3_cpus"
allowing old CPU model into domain (mixed cpu type)

5. Allowing hpost without IO board (useful during SB test/diagnostic)
# cat .postrc
--snip--
no_ioadapt_ok
no_obp_handoff
verbose 40
err_print 64
level 32

--snip--

(to be continue...)

Monday, June 1, 2009

Veritas Volume Manager frequent use command.... vxdiskadm, etc

1. vxdiskadm
The vxdiskadm utility is a text menu driven (script menu). Most of disk administration can be done through this menu. Its including disk initialization, add, encapsulate, mirror volume, import and deport disk group, and even for disk maintenance such as disk removal or replacement and many more. This script is intended primarily for users who wish to use a simple method for doing common operations, and for users who understand only a limited set of concepts.
root@sun1: # vxdiskadm
Volume Manager Support Operations
Menu: VolumeManager/Disk

1 Add or initialize one or more disks
2 Encapsulate one or more disks
3 Remove a disk
4 Remove a disk for replacement
5 Replace a failed or removed disk
6 Mirror volumes on a disk
7 Move volumes from a disk
8 Enable access to (import) a disk group
9 Remove access to (deport) a disk group
10 Enable (online) a disk device
11 Disable (offline) a disk device
12 Mark a disk as a spare for a disk group
13 Turn off the spare flag on a disk
14 Unrelocate subdisks back to a disk
15 Exclude a disk from hot-relocation use
16 Make a disk available for hot-relocation use
17 Prevent multipathing/Suppress devices from VxVM's view
18 Allow multipathing/Unsuppress devices from VxVM's view
19 List currently suppressed/non-multipathed devices
20 Change the disk naming scheme
21 Get the newly connected/zoned disks in VxVM view
list List disk information

? Display help about menu
?? Display help about the menuing system
q Exit from menus

Select an operation to perform:


2. vxdctl
The vxdctl utility manages some aspects of the state of the volume configuration daemon (vxconfigd).
root@sun1: # vxdctl enable
This operations request that vxconfigd enter enabled mode, import all disk groups, and rebuild the volume and plex device node directories. This operation can be used even if vxconfigd is already in enabled mode. The primary purpose for using this operation when in enabled mode is to rebuild the volume and plex device nodes. This operation will also cause vxconfigd to scan for any disks that were newly added since vxconfigd was last started. In this manner, disks can be dynamically configured to the system and then recognized by the Volume Manager. This command should be executed during disk reconfiguration (disk add).

3. vxdg
The vxdg utility performs basic administrative operations on disk groups. Operations include list of diskgroup, creation of disk groups, the addition of disks to a disk group, disk group imports and deports, etc
root@sun1: # vxdg list
NAME STATE ID
rootdg enabled 1058172952.1025.sun1
datadg enabled 1058249627.1162.sun1

root@sun1: # vxdg list datadg
Group: datadg
dgid: 1058249627.1162.sun1
import-id: 0.1536
flags:
version: 90
detach-policy: global
copies: nconfig=default nlog=default
config: seqno=0.1132 permlen=47591 free=47578 templen=9 loglen=7210
config disk c3t40d0s2 copy 1 len=47591 state=clean online
log disk c3t40d0s2 copy 1 len=7210


4. vxdisk
The vxdisk utility performs basic administrative operations on disks such as list information, initializing, replacing disks, etc.
root@sun1: # vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 sliced rootdisk rootdg online
c1t1d0s2 sliced rootdg00 rootdg online
c3t40d0s2 sliced disk_ext datadg online
root@sun1: # vxdisk -o alldgs list (usefull in cluster environment)
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 sliced rootdisk rootdg online
c1t1d0s2 sliced rootdg00 rootdg online
c3t40d0s2 sliced disk_ext datadg online

root@sun1: # vxdisk list c3t40d0
Device: c3t40d0s2
devicetag: c3t40d0
type: sliced
hostid: sun1
disk: name=disk_ext id=1058249625.1159.INdev1
group: name=datadg id=1058249627.1162.sun1
flags: online ready private autoconfig autoimport imported
pubpaths: block=/dev/vx/dmp/c3t40d0s4 char=/dev/vx/rdmp/c3t40d0s4
privpaths: block=/dev/vx/dmp/c3t40d0s3 char=/dev/vx/rdmp/c3t40d0s3
version: 2.2
iosize: min=512 (bytes) max=2048 (blocks)
public: slice=4 offset=0 len=1428340425
private: slice=3 offset=1 len=64513
update: time=1240375737 seqno=0.31
headers: 0 248
configs: count=1 len=47591
logs: count=1 len=7210
Defined regions:
config priv 000017-000247[000231]: copy=01 offset=000000 enabled
config priv 000249-047608[047360]: copy=01 offset=000231 enabled
log priv 047609-054818[007210]: copy=01 offset=000000 enabled
Multipathing information:
numpaths: 1
c3t40d0s2 state=enabled


5. vxedit
The vxedit utility sets and changes various attributes for Volume Manager configuration records that do not depend upon volume usage types.
root@sun1: # vxedit -g datadg set failing=off disk_ext
This operation will clear the failing flag when a vxdisk list status shows "online failing"
Before executing the command:
root@sun1: # vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 sliced rootdisk rootdg online
c1t1d0s2 sliced rootdg00 rootdg online
c3t40d0s2 sliced disk_ext datadg online failing

After executing the command:
root@sun1: # vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 sliced rootdisk rootdg online
c1t1d0s2 sliced rootdg00 rootdg online
c3t40d0s2 sliced disk_ext datadg online


vxedit set nohotuse=(on/off) [disk_name]
This operation will set/reset the nohotuse flag (hot spare/hot relocation) for particular disk.

6. vxassist
The vxassist utility is an interface to the VERITAS Volume Manager that finds space for and creates volumes, adds mirrors and logs to existing volumes, extends and shrinks existing volumes, provides for the migration of data from a specified set of disks, and provides facilities for the on-line backup of existing volumes.
root@sun1 # vxassist -g datadg maxsize
Maximum volume size: 186730496 (91177Mb)
root@sun1 # vxassist -g datadg make datavol10 500m disk_ext
This operation is creating volume datavol10 with size equal 500m on disk disk_ext (c3t40d0)

7. vxprint
The vxprint utility displays complete or partial information from records in Volume Manager disk group configurations.
root@sun1 # vxprint -ht
Disk group: rootdg

DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO

dg rootdg default default 0 1058172952.1025.INdev1

dm rootdg00 c1t1d0s2 sliced 20095 143318784 -
dm rootdisk c1t0d0s2 sliced 10175 143339136 -

v opt - ENABLED ACTIVE 8395200 ROUND - fsgen
pl opt-01 opt ENABLED ACTIVE 8395200 CONCAT - RW
sd rootdisk-07 opt-01 rootdisk 8395200 8395200 0 c1t0d0 ENA
pl opt-02 opt ENABLED ACTIVE 8395200 CONCAT - RW
sd rootdg00-03 opt-02 rootdg00 50350848 8395200 0 c1t1d0 ENA

v rootvol - ENABLED ACTIVE 25175424 ROUND - root
pl rootvol-01 rootvol ENABLED ACTIVE 25175424 CONCAT - RW
sd rootdisk-09 rootvol-01 rootdisk 33570624 25175424 0 c1t0d0 ENA
pl rootvol-02 rootvol ENABLED ACTIVE 25175424 CONCAT - RW
sd rootdg00-01 rootvol-02 rootdg00 0 25175424 0 c1t1d0 ENA

v swapvol - ENABLED ACTIVE 25175424 ROUND - swap
pl swapvol-01 swapvol ENABLED ACTIVE 25175424 CONCAT - RW
sd rootdisk-10 swapvol-01 rootdisk 58746048 25175424 0 c1t0d0 ENA
pl swapvol-02 swapvol ENABLED ACTIVE 25175424 CONCAT - RW
sd rootdg00-02 swapvol-02 rootdg00 25175424 25175424 0 c1t1d0 ENA

Disk group: datadg

DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO

dg datadg default default 6000 1058249627.1162.INdev1

dm disk_ext c3t40d0s2 sliced 64513 1428340425 -

v datavol10 - ENABLED ACTIVE 1024000 SELECT - fsgen
pl datavol10-01 datavol10 ENABLED ACTIVE 1036320 CONCAT - RW
sd disk_ext-08 datavol10-01 disk_ext 1241608515 1036320 0 c3t40d0 ENA

v dbdata - ENABLED ACTIVE 104857600 SELECT - fsgen
pl dbdata-01 dbdata ENABLED ACTIVE 104862630 CONCAT - RW
sd disk_ext-04 dbdata-01 disk_ext 62956440 104862630 0 c3t40d0 ENA


8. vxrecover
The vxrecover utility perform volume recovery operations.
root@sun1: # vxrecover -g datadg -sb
This will perform all volume recovery in datadg diskgroup and running in background mode.

Sunday, May 31, 2009

Sun Storedge 6130 Disk bad block information.... badBlocksData.txt

When encountered disk bad block problem (as logged in /var/adm/messages), the physical disk contribute the error list in file badBlocksData.txt as follows:

supportdtata-STORAGE.zip

root@sun1: # cat badBlocksData.txt
Volume Date/Time Volume LBA Tray,Slot Drive LBA Failure Type
------------ ---------------------------- ------ ----- ------- --------
ldabdb_vol16 Tue May 20 02:06:06 WIT 2008 249630 60,12 5367582 PHYSICAL
ldabdb_vol16 Tue May 20 02:06:32 WIT 2008 249631 60,12 5367583 PHYSICAL
ldabdb_vol16 Tue May 20 02:06:47 WIT 2008 249632 60,12 5367584 PHYSICAL
ldabdb_vol16 Tue May 20 02:07:01 WIT 2008 249633 60,12 5367585 PHYSICAL
ldabdb_vol16 Tue May 20 02:07:18 WIT 2008 249634 60,12 5367586 PHYSICAL
ldabdb_vol16 Tue May 20 02:07:23 WIT 2008 249636 60,12 5367588 PHYSICAL