Showing posts with label EMC. Show all posts
Showing posts with label EMC. Show all posts

Tuesday, September 27, 2011

Verify key registration for Veritas disks

Sometime there are disks SCSI3-PR compliance or vxfentsthdw script failure for vxfencing. Excute below to verify the keys on all disks.

Command to check all the keys and SCSI-3 PR compliance disks for VCS
vxdisk list|grep emc0 |awk '{print "/dev/vx/rdmp/"$1}' > /tmp/disks
vxdisk list|grep emc0 |awk '{print "/dev/vx/dmp/"$1}' > /tmp/disks - (Try with dmp path only if rdmp fails)
vxfenadm -a -k 1 -f /tmp/disks - register key 1 to the all the disks
vxfenadm -g all -f /tmp/disks - list the key register
vxfenadm -s all -f /tmp/disks - clear the key

Eg. Command to query registeration keys in coordinator diskgroup

host85-root>vxdisk -o alldgs list |grep vxfencoorddg |awk '{print "/dev/vx/rdmp/"$1}' > /tmp/disks
host85-root>vxfenadm -s all -f /tmp/disks
Device Name: /dev/vx/rdmp/pp_emc0_4
Total Number Of Keys: 3
key[0]:
[Numeric Format]: 86,70,68,67,55,65,48,48
[Character Format]: VFDC7A00
* [Node Format]: Cluster ID: 56442 Node ID: 0 Node Name: host85
key[1]:
[Numeric Format]: 86,70,68,67,55,65,48,49
[Character Format]: VFDC7A01
* [Node Format]: Cluster ID: 56442 Node ID: 1 Node Name: host83
key[2]:
[Numeric Format]: 86,70,68,67,55,65,48,50
[Character Format]: VFDC7A02
* [Node Format]: Cluster ID: 56442 Node ID: 2 Node Name: host81
Device Name: /dev/vx/rdmp/pp_emc0_6
Total Number Of Keys: 3
key[0]:
[Numeric Format]: 86,70,68,67,55,65,48,48
[Character Format]: VFDC7A00
* [Node Format]: Cluster ID: 56442 Node ID: 0 Node Name: host85
key[1]:
[Numeric Format]: 86,70,68,67,55,65,48,49
[Character Format]: VFDC7A01
* [Node Format]: Cluster ID: 56442 Node ID: 1 Node Name: host83
key[2]:
[Numeric Format]: 86,70,68,67,55,65,48,50
[Character Format]: VFDC7A02
* [Node Format]: Cluster ID: 56442 Node ID: 2 Node Name: host81
Device Name: /dev/vx/rdmp/pp_emc0_5
Total Number Of Keys: 3
key[0]:
[Numeric Format]: 86,70,68,67,55,65,48,48
[Character Format]: VFDC7A00
* [Node Format]: Cluster ID: 56442 Node ID: 0 Node Name: host85
key[1]:
[Numeric Format]: 86,70,68,67,55,65,48,49
[Character Format]: VFDC7A01
* [Node Format]: Cluster ID: 56442 Node ID: 1 Node Name: host83
key[2]:
[Numeric Format]: 86,70,68,67,55,65,48,50
[Character Format]: VFDC7A02
* [Node Format]: Cluster ID: 56442 Node ID: 2 Node Name: host81

Monday, September 12, 2011

Remove PowerPath failure with VxVM on AIX

If PowerPath devices are used by LVM/VxVM/VCS on AIX,  it will fail to uninstall or upgrade PowerPath. Follow this workaround http://www.symantec.com/business/support/index?page=content&id=TECH68947 to resolve the problem.

Remove PowerPath failure with VxVM on Linux

PowerPath removal will fail when the underneath PowerPath devices are used by Veritas Volume Manager. Therefore, it is necessary to remove PowerPath devices from VxVM before removing the PowerPath package.

Steps to remove PowerPath with VxVM on Linux
1. for i in `vxdisk list | grep emcpower |awk '{print $1}'`;do vxdisk rm $i;done
3. #/etc/init.d/PowerPath stop
2. rpm -e EMCpower.LINUX-5.1.0-194

Refer to http://www.symantec.com/business/support/index?page=content&id=TECH70180 for more detail.

Tuesday, September 6, 2011

Create EMC Symmetrix thin devices

This post shows the step how to create thin pool, add and remove components from the pool and how to delete thin pool. TDAT and TDEV devices must be removed from the pool before it can be deleted. Thin reclamation on storage level is also shown here.

Create Symmetrix thin devices
symcfg -sid 1234 list -datadev : list all TDAT devices
symcfg -sid 1234 list -tdev       : list all TDEV devices
symdev list -datadev -nonpooled -sid 1234 : Check which TDAT devices not in any thin pool
symconfigure -sid 1234 -cmd "create pool test type=thin;" commit -nop : create a thin pool
symconfigure -sid 1234 -cmd "add dev f3d::f43 to pool test type=thin, member_state=ENABLE;" commit  -nop : add TDAT to a thin pool
symcfg -sid 1234 list -pools -thin -mb : list all the thin pools
symcfg -sid 1234 show -pool test -thin -mb -detail -all  : show detail of "test" thin pool
symconfigure -sid 1234 -cmd "bind tdev f25:f28 to pool test;" commit -nop : bind TDEV to "test" thin pool
symmask -sid 1234 -dir 4a -p 0 -wwn $a add devs f25:f28 : present TDEV to DMX masking
symaccess -sid 1234 -name testing_sg -type storage add devs f25:f28 : present TDEV to VMAX storage group

Remove TDAT device in pool
symconfigure -sid 1234 -cmd "disable dev f3d:f3e in pool test, type=thin;" commit : disable TDAT
symconfigure -sid 1234 -cmd "remove dev f3d:f3e from pool test, type=thin;" commit -nop : remove TDAT

Unbind TDEV device in pool
symdev -sid 1234 not_ready -range f25:f28 : set TDEV device not ready
symconfigure -sid 1234 -cmd "unbind tdev f25:f28 from pool test;" commit -nop : remove TDEV from "test" pool

Rename thin pool
symconfigure -sid 1234 -cmd "rename pool test to test123 type = thin;" commit -nop; : rename thin pool

Delete thin pool
symconfigure -sid 1234 -cmd "delete pool test type=thin;" commit -nop : delete "test" thin pool

Thin Reclamation on Array level
symconfigure -sid 1234 -cmd "start free on tdev 68B:68E start_cyl=0 end_cyl=last_cyl type=reclaim;" commit -nop (to start reclaim)
symconfigure -sid 1234 -cmd "stop free on tdev 68B:68E type=reclaim;" commit -nop (to stop reclaim)

Monday, September 5, 2011

EMC Symmetrix SYMCLI Cheat sheet

This is some basic EMC Solution Enable commands to perform task on Symmetrix. Take note that symmask is used for DMX whereas symaccess is used for VMAX for device masking. Credit to http://www.sanduel.com/SAN-Storage-Commands/EMC-Symmetrix-SYMCLI-Cheat-sheet.html for this post.


symcfg
symcfg list : A brief description of the all connected Symmetrix boxes.
symcfg -sid 1234 list -lockn all : Lists all the external locks held in Symmetrix array 1234.
symcfg -sid 1234 -lockn 15 release -force : Release the lock 15 held on array 1234 .
symcfg -sid 1234 list -v : Displays detailed information about the Symmetrix Array 1234.
symcfg -sid 1234 -dir 4a -p 0 list -addr -avail : Lists the LUN information / availability of lun ids on port 4a:0 in array 1234 .
symcfg -sid 1234 list -rdfg all : List details about all the rdf groups in array.
symcfg -sid 1234 list -rdfg 3 : List details about rdf group 3 .
symcfg -sid 1234 list -rdfg all -dynamic : List details about all the dynamic rdf groups in array .
symcfg -sid 1234 list -rdfg all -static : List details about all the static rdf groups in array .
symcfg -sid 1234 list -ra all : List all RA ports with details like rdfg number , remote array sid and online status.
symcfg -sid 1234 list -connection : List all connections
symcfg -sid 1234 -application  list : List all application
symcfg discover : Scans all the devices in hosts looking for new symmetrix devices and rebuilds the symmetrix configuration database.

symconfigure
symconfigure -sid 1234 -f /tmp/map.txt commit : map LUNs to port 4a:0 in array 1234
symconfigure -sid 1234 -cmd "set dev 68B:68E attribute=SCSI3_persist_reserv;" commit -nop : enable SCSI-key
symconfigure -sid 1234 -cmd "set dev 68B:68E attribute=NO SCSI3_persist_reserv;" commit -nop : disable SCSI3-key
symconfigure -sid 1234 -cmd "set port 4a:0 SPC2_Protocol_Version=DISABLE;" commit -nop : disable SPC2 attribute

eg. /tmp/map.txt (map or unmap)
AIX/Linux/Solaris
============
map 041F:042E  to dir 4a:0 lun=128;
unmap 041F:042E  from dir 4a:0 lun=128;

HPUX
=====
map dev 087041F:042E  to dir 4a:0 vbus=A, target=01, lun=001;
unmap dev 041F:042E from dir 4a:0;

symdev
symdev -sid 1234 list : Lists all devices in symmetrix 1234.
symdev -sid 1234 list -noport : Lists the devices which are not mapped to any ports.
symdev -sid 1234 list -noport -meta : Lists all unmapped meta devices .
symdev -sid 1234 list -dynamic : Lists all devices whose dyn_rdf attribute set .
symdev -sid 1234 list -hotspare : Checks whether hotspare invoked in the array .
symdev -sid 1234 show ABC : show the detailed information about the devioce ABC.
symdev -sid 1234 write_disable ABC -SA all : Write disable the device ABC from through all directors.
symdev -sid 1234 not_ready ABC -SA all : Not ready the device ABC from through all directors.

symmaskdb
symmaskdb -sid 1234 -dev ABC list assign : List the masking details of the dev ABC .
symmaskdb -sid 1234 -wwn xxxxxxx list devs : List the devices masked to the given wwn number .

symmask
symmask list hba : List the HBA details of the host.
symmask -sid 1234 -dir 4a -p 0 list logins : List out wwn s logged through port 4a:0 .
symmask -sid 1234 refresh : Refresh the VCM Data Base after a masking and unmasking operation.
symmask -sid 1234 -wwn xxxx -dir 4a -p 0 add devs ABC,ABD : Mask the devices ABC and ABD to the given wwn in 1234 arrray .
symmask -sid 1234 -wwn xxxx -dir 4a -p 0 remove devs ABC,ABD : Unmask the devices ABC and ABD from the given wwn in 1234 arrray.

symdg
symdg -sid 1234 list : List the device groups which include the devices from array 1234.
symdg create mydg -type rdf1 : Create device group mydg of rdf1 type .
symdg show mydg : Shows the members/details of mydg.
symdg rename mydg yourdg : Renames the mydg to yourdg.
symdg delete mydg -force : Delete device group mydg.

symld
symld -g mydg -sid 1234 add dev ABC DEV006 : Add the RDF device ABC to device group mydg as DEV006
symld -g mydg remove DEV006 : Remove DEV006 form device group mydg.

symrdf
symrdf -sid 1234 -rdfg 3 -type rdf1 -file rdf.txt -g mydg createpair -establish : Establish the SRDF relation between the devices given in the file rdf.txt from array 1234(R1) and remote box according to the rdf group . This command start sync between R1 and R2, and also add these devices after creating the device group mydg.
symrdf -sid 1234 -rdfg 3 -file rdf.txt query : Query the Devices by using the device pair file.
symrdf -g mydg set mode acp_disk : Set syncing mode to Adaptive Copy.
symrdf -g mydg query : Query the device group.
symrdf -g mydg split : Split the dynamic srdf pair.
symrdf -sid 1234 -rdfg 3 -file rdf.txt deletepair.txt -force : Delete the srdf pairing between R1/R2 and return them to normal.

symdisk
symdisk -sid 1234 list -hotspare : Lists the Hotpsraes configured in the array.
symdisk -sid 1234 list -by_diskgroup : Dispalys all the disks in the array by grouping by disk groups.
symdisk -sid 1234 list -diskg_roup 1 : Dispalys all the disks in disk group 1.

symaccess
#### Creation / Deletion of SG
symaccess -sid 1234 -name test_sg -type storage create
symaccess -sid 1234 -name test_sg -type storage add devs XX,YY,AA:BB
symaccess -sid 1234 -name test_sg -type storage create dev XX,YY,AA:BB (create and add)
symaccess -sid 1234 -name test_sg -type storage delete -force

#### Creation / Deletion of PG
symaccess -sid 1234 -name test_pg -type port create
symaccess -sid 1234 -name test_pg -type port –dirport 8E:0,9E:0 add
symaccess -sid 1234 -name test_pg -type port create -dirport 8E:0,9E:0 (create and add)
symaccess -sid 1234 -name test_pg -type port delete -force

#### Creation / Deletion of IG
symaccess -sid 1234 -name test_ig -type initiator create
symaccess -sid 1234 -name test_ig -type initiator –wwn XXX add
symaccess -sid 1234 -name test_ig -type initiator –wwn YYY add
symaccess -sid 1234 -name test_ig -type initiator create -file IG_hpux_wwn.txt (create and add)
symaccess -sid 1234 -name test_ig -type initiator delete -force
symaccess -sid 1234 -name test_ig -type initiator set ig_flags on V -enable (set V bit for HP-UX)
eg. IG_hpux_wwn.txt
wwn:2101001b32300000

#### Creation / Deletion of Masking View
symaccess -sid 1234 create view –name test_view –storgrp test_sg –portgrp test_pg –initgrp test_ig
symaccess –sid 1234 delete view –name test_view

#### list devices/wwn in storage/initiator group
symaccess -sid 1234 list dev C8B -type storage
symaccess -sid 1234 list dev C8B:C9B -type storage
symaccess  -sid 1234 list -wwn 2101001b323f528d -type initiator

Wednesday, August 31, 2011

Veritas Thin Reclamation on EMC Storage

Here is some simple steps to do thin reclamation with Veritas Volume Manager. That's provided that all the necessary environments have been done such as host/storage/vxvm.

Refer to VxVM version and Array firmware requirements.

Step 1: Ensure the device TYPE is thinrclm
#vxdisk -o thin list
DEVICE          SIZE(mb)     PHYS_ALLOC(mb)  GROUP           TYPE     
emc_clariion0_63 102400       N/A             CX_thin     thinrclm 
emc0_1766       1031         N/A              VMAX_thin thinrclm
emc0_1767       1031         N/A              VMAX_thin thinrclm
emc0_1768       1031         N/A              VMAX_thin thinrclm
emc0_1760       1031         N/A              VMAX_thin thinrclm

Step 2: Enable the dmp write log to syslog (if you want to view the log)
#vxdmpadm settune dmp_log_level=3
write_same with offset and length

Step 3: Perform Thin Reclamation via:
#vxdisk reclaim CX_thin
Reclaiming thin storage on:
Disk emc_clariion0_63 : Done.

#vxdisk reclaim VMAX_thin
Reclaiming thin storage on:
Disk emc0_1768 : Done.
Disk emc0_1769 : Done.
Disk emc0_1766 : Done.
Disk emc0_1767 : Done.