Over the years I collected a number of useful CLI commands to control the DMX / VMAX machines I worked with. Even though nowadays Unisphere for VMAX is a useful tool, nothing really beats the command line!
CLI forever!
Why? It provides the output you need when running the commands you type. There’s no need to search for the right pull down menu, since you directly type whatever you need.
Create devices
Size | Number | Script (type this in a txt file and run a symconfigure command with -f file.txt) |
22GB | 6 | create dev count=6, size=24000 CYL, emulation=FBA, config=TDEV, binding to pool=FC, preallocate size=24000 CYL; |
44GB | 12 | create dev count=12, size=48000 CYL, emulation=FBA, config=TDEV, binding to pool=FC, preallocate size=48000 CYL; |
55GB | 200 | create dev count=200, size=60000 CYL, emulation=FBA, config=TDEV; binding to pool=FC, preallocate size=600000 CYL; |
77GB | 6 | create dev count=6, size=84000 CYL, emulation=FBA, config=TDEV, binding to pool=FC, preallocate size=84000 CYL; |
If you don’t want to preallocate the space, simply leave that part out.
Symdev show
Every little detail on symdevs can be viewed using the infamous “symdev show” command. Suppose you want to see the naa-number which you can also see in VMware VCenter, run the following command (mind the number of spaces before the colon):
symdev -sid 1234 show 567 | find “Device WWN :” | Device WWN : 60000960000305701165533144353499 |
Symdev change
If you need to enlarge a tdev you don’t need to add meta members anymore on VMAX3 or VMAX All Flash. Simply change its size and you’re done!
symdev -sid 123 modify AA -tdev -cap 3072 -captype gb |
This will change TDEV AA size to 3072 GB
Naming symdevs
symconfigure -sid 1234 -cmd “set dev 567 device_name=’Cluster1_VMFS_017′ ;” commit
SymCFG
symcfg list | Information on all managed VMAX arrays |
symcfg -sid 1234 disco | Discover all available information about VMAX with serial ending with 1234 |
symcfg –sid 1234 list –ra all –switched | Show all SRDF ports |
Symaccess
symaccess -sid 1234 list view | List masking views Created for Array 1234 with related groups details |
symaccess -sid 1234 list assignment -dev 9A0:9AF | Shows the masking details of devices from ports 9A0 to 9AF |
symaccess -sid 1234 list no_assignments -dirport 12f:1 | Shows the devices are mapped to 12f:1 but not masked |
symaccess -sid 1234 list -name MyGroup | List all groups named MyGroup |
symaccess -sid 1234 list -name MyGroup –v | List all groups named MyGroup and also shows the related Masking Views |
symaccess -sid 1234 list devinfo -ig MyInitiator | List the details of devices assigned to the initiator group MyInitiator |
symaccess -sid 1234 -f MyBackup.txt backup | Creates a binary file MyBackup.txt containing all masking data of this array |
symaccess -sid 1234 -f MyBackup.txt restore | Restores all masking information from the specified backup file to the array |
symaccess -sid 1234 create -name Windows_IG -type initiator | Create initiator group Windows_IG |
symaccess -sid 1234 -type initiator –name Host1 create -wwn 1000000000000001 | Creates an initiator group called Host1 by adding the specified wwn |
symaccess -sid 1234 -type initiator –name Host1 add –wwn 1000000000000002 | Add the specified wwn in to the existing initiator group Host1 |
symaccess -sid 1234 -type port –name 3E0_4E0_13E0_14E0 –dirport 3e:0,4e:0,13e:0,14e:0 create | Create the portgroup 3E0_4E0_13E0_14E0 with specified ports |
symaccess -sid 1234 -type storage –name Host1 create devs AAA:AAB | Create the storage group Host1 with specified range of devices |
symaccess -sid 1234 -type storage –name Host1 add devs AAA:AAB | Add the specified range of devices to the existing storage group Host1 |
symaccess -sid 1234 create view –name Host1_Allocation -sg Host1 -pg 3E0_4E0_13E0_14E0 -ig Host1 | Create a masking Host1_Allocation view combined with specified groups (SG, PG and IG) |
symaccess -sid 1234 rename -wwn 500110a00016f0be -alias ADCN70/vsan20 | Rename wwn to alias |
symaccess –sid 1234 list logins | Show all logged in initiators |
symaccess -sid 1234 create -name Windows_SG -type storage devs 1AAA,1AAB,1AAC | Create a storage group containing these devices |
symaccess -sid 1234 create view -name Windows_MV -sg Windows_SG -pg PG_5+6_EA -ig Windows_IG -lun 001 | Create Masking View (Starting at LUN number 001) |
symaccess -sid 1234 list -type storage|port|initiator (-name some-name -detail -v) | List groups |
symaccess -sid 1234 show view masking-view-name | List masking view |
Port flags
symaccess -sid 1234 -name VMware_IG -type initiator set ig_flags on C,SC3,SPC2 -enable | Set the port flags for the VMware initiator group |
symaccess -sid 1234 -name Windows_IG -type initiator set ig_flags on C,SC3,SPC2,OS2007 –enable | Set the port flags for the Windows initiator group |
symaccess -sid 1234 -name Linux_IG -type initiator set ig_flags on C,D,SC3,SPC2,OS2007 –enable | Set the port flags for the Linux initiator group |
symaccess -sid 1234 -name Solaris_IG -type initiator set ig_flags on C,D,SC3,SPC2,OS2007 -enable | Set the port flags for the Solaris initiator group |
symaccess -sid 1234 -name HP-UX_IG -type initiator set ig_flags on C,V,SC3,SPC2,OS2007 -enable | Set the port flags for the HP-UX initiator group |
symaccess -sid 1234 -name AIX_IG -type initiator set ig_flags on SC3,SPC2,OS2007 -enable | Set the port flags for the IBM AIX initiator group |
SRDF
symdg create DGName type r1/r2 | Create a device group of type r1 or r2 |
symrdf –g DGName suspend | Suspend replication of this device group |
symrdf –g DGName query | Query the rdf status of this device group |
symrdf -sid 1165 -rdfg 1 que -f rdf.txt -i 5 | Query the rdf status of tdevs in this file every 5 seconds |
symrdf –g DGName resume/establish | Resume/start replication of this device group |
symdg delete DGName -force | Delete this device group |
0 Comments.