Wednesday, 18 June 2014

SYMCLI CHEAT SHEET

SYMMASKDB
=========

Initializing the VCMDB
# symmaskdb -sid 5678 init -f vcmdb.db

Backing up the VCMDB – backs up the VCMDB database to a file
# symmaskdb -sid 5678 -file <backup_filename> backup

Restoring the VCMDB – restores a database file
# symmaskdb -sid 5678 -file <restore_filename> restore

Refresh the database (Not always needed)
# symmask -sid 5678 refresh

Check devices masking to hosts
# symmaskdb -sid 5678 -dev 7D5,03A4:03A7 list assignment (DMX)
# symaccess -sid 5678 -dev 7D5,03A4:03A7 list assignment (VMAX)

Listing devices which are masked to given host
# symmaskdb –sid 5678 list database
# symmaskdb -sid 5678 list capacity -host hostA (DMX)
# symmaskdb -sid 5678 list capacity -host hostA -dir 07a -p 1 (DMX)
# symmaskdb -sid 5678 list database -wwn 10000000c868bd8e
# symmaskdb -sid 5678 list database -wwn 10000000c9598f73 -dir 07a -p 1
# symmaskdb -sid 5678 list devs -wwn 10000000c9598f7

Check which devices are masked to given FA port
# symmaskdb -sid 5678 list database -dir 07A -p 0

=====================================================================================
SYMDEV
======

Listing all devices within the array
# symdev list
# symdev -v list (will take a long time to run because of the sheer amount of output)

Checking Device details
# symdev -sid 5678 show 0200

Checking device mapping to any ports (Please See: ???:? indicates device is not mapped to any port; ***:* indicates it is mapped to more than one port)
# symdev -sid 5678 show 214 (single device)
# symdev -sid 5678 -range 6F1:6F5 list (multiple devices)
# symdev -sid 5678 -range 6F1:6F5 list -multiport (multiple devices mapped to multiple ports – works with range only – could specify same device twice in the range if needed for a single device – for example 513:513)

List which devices are mapped to FA ports
# symdev -sid 5678 list -sa 08c -p 0

Listing devices (hypers/metas) which are not mapped to any ports
# symdev -sid 5678 -noport list

How to write disable several devices

# cat devs
0205
0206
# symdev -sid 5678 write_disable -file devs -SA 9c -p 0
# symdev -sid 5678 write_disable -file devs

(This will disable devs on all ports)

How to write disable only a single device

# symdev -sid 5678 write_disable 0123 -SA all
# symdev -sid 5678 write_disable 0123 -SA 14A -p 0

How to change the status of device to “not_ready”

# cat devs
0205
0206


# symdev -sid 5678 not_ready -file devs -SA 9c -p 0
# symdev -sid 5678 not_ready -file devs (This will disable devs on all ports)
# symdev -sid 5678 not_ready 0325 -SA all (This will disable devs on all ports)
# symdev -sid 5678 not_ready 0325 -SA 14A -p 0 (This will disable devs on 3a:0 ports)

================================================================================
SYMDISK
=======
Display the summary information about diskgroups on given array

# symdisk -sid 5678 list -dskgrp_summary -disk_group all
# symdisk -sid 5678 list -dskgrp_summary -disk_group 1
# symdisk -sid 5678 list -dskgrp_summary

Display details about disks in array separated by disk groups
# symdisk -sid 5678 list -by_diskgroup

Display details about disks in given diskgroup
# symdisk -sid 5678 list -disk_group 1

Display the list of disks configured as hotspares in the array
# symdisk -sid 5678 list -hotspare

Display the details of all hotspares in the array
# symdisk -sid 5678 list -v -spare_info

Display the list of failed drives in the array
# symdisk -sid 5678 list -failed

Display list of all disks installed in the array

# symdisk -sid 5678 list
Ident  Symb Int TID Vendor     Type       Hypr   Total       Free      Actual
------ ---- --- --- ---------- ---------- ---- ---------- ---------- ----------
DF-5A  05A    C   0 SATAHGST   C02THJK      24     953870      32940    1823565


Disk ID would be 5A:C0

Display the detailed information such as speed/make/model/diskgroup/hypers on disk
# symdisk -sid 5678 show 5A:C0

Display the gaps (available space) on given disk
# symdisk -sid 5678 show 5A:C0 -gaps

Display only the gaps (available space) on given disk
# symdisk -sid 5678 show 5A:C0 -gaps_only

How to find out datadevs in degraded status
# symdev -sid 5678 -datadev -service_state notnormal list

================================================================================
SYMCFG
======

List of FA ports/WWN on given array
# symcfg -sid 5678 -FA all list
# symcfg -sid 5678 -FA 8C list

List detailed information on a FA port
# symcfg –sid 5678 -FA 11E list -v

Find out the failed director (front end FA and disk DA)
# symcfg -sid 5678 list -dir all => get the FA or DA number from here
# symcfg -sid 5678 list -fa 5g -v | egrep "Negotiated Speed (GB/Second)" => speed should be a number
# symcfg -sid 5678 list -da 5d -v | egrep "Director Status"

Display details about array
# symcfg –sid 5678 list -v

List LUN addresses available on a given FA (and also to check which luns are mapped to which devices)
# symcfg –sid 5678 list -address -available -fa 7e –p 0

To find out which lun number is used to map a device for given host
On VMAX # symaccess -sid 5678 show view hostname_vwa (Column “Host Lun” under Storage group name)
On DMX # symmasksdb -sid 5678 list devs -wwn 50005678567890 (Column “HOST” under LUN)

List which applications (symcfg/stpdaemon etc) are running the commands against given array
# symcfg –sid 5678 -application list

Display details (OS/IP/Hardware/hostname) about hosts that are accessing given array
# symcfg –sid 5678 -connections list

Check the consumed capacity of TDEV (space consumed by a TDEV)
# symcfg -sid 5678 list -pool poolname -tdev -detail -gb | grep 1C4B
# symcfg -sid 5678 list -pool poolname -tdev -range 1A11:1A1B -detail -gb

================================================================================

SYMMASK
=======

Set or clear the FC ID lockdown
# symmask set lockdown

Set or clear visibility in masking database so that host should find all devices, even if they are noncontiguous LUNs
# symmask set visibility

Set or clear LUN base/offset skip for noncontiguous LUNs
# symmask set lunoffset

Set the record in the database to hold information on the host type that may differ than the current setting on the corresponding FA
# symmask set heterogeneous

Discover the WWN or iSCSI names of the HBAs on the host and writes the ASCII names to the login history table, if empty
# symmask discover hba

Display list of devices seen by WWN of given HBA for given host

# symmask list hba
# symmask list hba -v

Display WWNs logged into given FA port (displays the login history table contents)
# symmask -sid 5678 list logins (for the whole array)
# symmask -sid 5678 list logins -dir 3a -p 0 (on given port)
# symaccess –sid 5678 list logins –dirport 5e:0 (on VMAX)

How to mask the devices to given WWN (Add a device to the list of devices that a WWN can access – only for DMX)
# symmask -sid 5678 -dir 8a -p 0 -wwn 100000056785678 add devs 200,200:205
# symmask -sid 5678 -dir 9d -p 1 -wwn 100000056785679 add devs 46a:479,4b8 -dynamic_lun (in case dynamic_lun is in use)
# symaccess –sid 5678 –name hostname_sga –type storage add devs 200,200:205 –lun 2c (on VMAX – to map from lun number 2c onwards)

How to unmask the devices from given WWN (Remove a device from the list of devices that a WWN can access)
# symmask -sid 5678 -dir 8a -p 0 -wwn 100000056785678 remove devs 20c,201:203
# symaccess –sid 5678 –name hostname_sga –type storage remove devs 200,200:205 –unmap (on VMAX – removing and unmapping)

Delete the login entries for a host on FA port
# symmask -sid 5678 -wwn 100000056785678 delete -dir 8a -p 0 -login

How to assign an alias name to a wwn logged into a FA port
# symmask -sid 5678 -dir 8a -p 0 -wwn 10000005678567 rename hostname/hba1 (DMX)
# symaccess -sid 5678 rename -wwn 10000005678567 -alias hostname/hba1 (VMAX)

How to refresh masking database after masking the new luns to a WWN or removing the luns from a WWN (refresh WWN related memory tables with the contents of VCMDB)
# symmask -sid 5678 refresh

Turn on the flag for different OSs (D for Solaris; C,SC3,OS2007,SPC2 for Windows/VMWare, SPC2 for linux)

On DMX
# symmask -sid 5678 set hba_flags on D –enable -wwn 10000005678567 -dir 8C -p 1 (DMX)
# symmask –sid 5678 refresh

On VMAX
# symaccess –sid 5678 –type init show hostname_ig -detail
# symaccess -sid 5678 set hba_flags on C,SC3,OS2007,SPC2 -enable –wwn 100000000567856
# symaccess -sid 5678 set hba_flags on C,SC3,OS2007,SPC2 -enable –name hostname_ig –type init

Globally on FA port
set port 1d:0 SCSI_3=enable,SPC2_Protocol_Version=enable,SCSI_Support1=enable;

================================================================================
SYMCONFIGURE
============

Verify that the changes can be made to the array
# symconfigure -sid <sid> -f <filename> verify

Confirm that the syntax is correct
# symconfigure -sid <sid> -f <filename> preview

Confirm that the change is correct
# symconfigure -sid <sid> -f <filename> prepare

Commit the changes to the database
# symconfigure -sid <sid> -f <filename> commit

Create IO Fencing devices for cluster
# symconfigure -sid 5678 -cmd "create dev count=24, size=2184 cyl, emulation=FBA, config=2-Way-Mir disk_group=3;" prepare

Create gatekeepers
# symconfigure -sid 5678 -cmd "create dev count=24, size=6 cyl, emulation=FBA, config=2-Way-Mir disk_group=3;" prepare

Create raid5 (7+1) thick device (when emulation mode is disabled number of cylinders should be halved to achieve the same size)

# symconfigure -sid 5678 -cmd "create dev count=64, size=49604 cyl,
emulation=FBA, data_member_count=7, config=raid-5 disk_group=3;" prepare
# symconfigure -sid 5678 -cmd "create dev count=64, size=24802 cyl,
emulation=FBA, data_member_count=7, config=raid-5 disk_group=3;" prepare

Create new replicated tdevs on local and remote arrays, bind them to pool, srdf pairing relationship between them
# symconfigure -sid 5678 -cmd "create dev count=64, size=24802, emulation=FBA, config=RDF1+TDEV, dynamic_capability=dyn_rdf, remote_config=RDF2+TDEV, ra_group=1, binding to pool=source_rep_pool, remote_pool=target_rep_pool;" prepare

Modify FA Port settings
# symconfigure -sid 5678 –cmd ‘set port1C:1 volume_set_addressing=enabled;’ prepare (this is a setting for HP systems)

How to create metas from hypers
# symconfigure -sid 5678 –cmd ‘form meta from dev 001 config=striped, stripe_size=1920; add dev 002:004 to meta 001;’ prepare

How to dissolve hypers from meta
# symconfigure -sid 5678 –cmd ‘dissolve meta dev 04BE;‘ prepare

How to map the devices to FA port (if devices are not contiguous, then you would need a new line for each device – you can’t use commas to separate them)

# cat map_devs
map dev 0200:0202 to dir 08b:0, starting lun=06e;
map dev 0200:0202 to dir 09b:1, starting lun=06e;

OR

map dev 0200 to dir 08b:0, lun=06e;
map dev 0200 to dir 09b:1, lun=06e;
map dev 0201 to dir 08b:0, lun=06f;
map dev 0201 to dir 09b:1, lun=06f;
# symconfigure -sid 5678 -file map_devs prepare

Rule of pair mapping (rule of 17):
On DMXs – Ports are [3,4,7,8,9,10,13,14][a-d]. a to d, b to c with rule of 17 and ports opposed. So 3a:0 will be partnered with 14d:1. 4b:1 will be paired with 13c:0.
On VMAXs – Ports are [5-12][e-h]. e to e, f to f, g to g, h to h with rule of 17. so 5f:0 will be 12f:0, 8g:0 will be 9g:0 and so on.

How to unmap devices from FA ports (if devices are not contiguous, then you would need a new line for each device – you can’t use commas to separate them)

# cat unmap_devs
unmap dev 0200:0204 from dir 07B:1;
unmap dev 0200:0204 from dir 04B:0;
unmap dev 0206 from dir all:all;
# symconfigure -sid 5678 -file unmap_devs prepare

How to set device attribute dyn_rdf on/off
# symconfigure -sid 5678 -cmd 'set dev 1001:1004 attribute=dyn_rdf;' prepare

How to set SCSI3-Persistent Reserve
# symconfigure -sid 5678 -cmd ‘set dev 2500:2502 attribute=SCSI3_persist_reserv;’ prepare

How to reclaim wasted space from a TDEV (Zero Space Reclaim)
# symconfigure -sid 5678 -cmd 'free tdev 1A1B start_cyl=0 end_cyl=last_cyl type=zero;' prepare

================================================================================
SYMDG/SYMLD
===========

Create a device group
# symdg create testdg

Delete a device group
# symdg delete testdg -force (if it has members, use -force)

Display the list of device groups
# symdg list <-sid 5678>

Show the details of a particular device group
# symdg show testdg

Display all the devices in a device group
# symld -g testdg list

Add the devices to a device group
# symld -sid 5678 addall -range 0200:0205 -g testdg (bulk)
# symld -sid 5678 add dev 0200 -g testdg(individual)

Remove the devices from a device group
# symld -sid 5678 rmall -range 0200:0205 -g testdg (bulk)
# symld remove dev DEV001 -g testdg (individual – must be logical name)

How to write_disable disks in a device group
# symld -sid 5678 -g testdg -sa ALL write_disable (disables devices in DG on all FAs)
# symld -sid 5678 -g testdg -sa 9c -p 0 write_disable DEV001 (device number must be DEVXXX and can be obtained by symld -g testdg list)

================================================================================
VMAX
====

Bind TDEV to pool with preallocated storage
# symconfigure -sid 5678 -cmd 'bind tdev 1001 to pool fast_pool preallocate size = 24802 CYL;' prepare
# symconfigure -sid 5678 -cmd 'start allocate on tdev 1001 start_cyl=0 end_cyl=<last_cyl>;' prepare (in case above command fails or to allocate the storage later)

Set the maximum subscription of a pool
# symconfigure -sid 5678 -cmd "set pool fast_pool, type=thin, max_subs_percent=100;" prepare

How to list the views created on the array
# symaccess -sid 5678 list view [–v]

How to display details of a view created
# symaccess -sid 5678 show view hostname_vwa -detail

How to list the groups created on the array
# symaccess -sid 5678 list -type storage|port|initiator

How to display the details of a group created
# symaccess –sid 5678 show hostname_sga -type storage
# symaccess –sid 5678 show hostname_iga -type initiator
# symaccess –sid 5678 show arrayname_5e0_pga -type port

How to create initiator group
# symaccess -sid 5678 create -name hostname_iga -type initiator (just create)
# symaccess -sid 5678 create -name hostname_iga -type initiator -wwn 100000000000001

How to add (or remove) a WWN from a Initiator group
# symaccess -sid 5678 add -name hostname_iga -type initiator -wwn 100000000000001
# symaccess -sid 5678 remove -name hostname_iga -type initiator -wwn 100000000000001

How to create Storage Group and add devs at the same time
# symaccess -sid 5678 create -name hostname_sga -type storage (just create)
# symaccess -sid 5678 create -name hostname_sga -type storage devs 1001:1005

How to add (or remove) devices to storage group
# symaccess -sid 5678 add -name hostname_sga -type storage dev 1001
# symaccess -sid 5678 remove -name hostname_sga -type storage dev 1001 -unmap

How to create a port group
# symaccess -sid 5678 create -name arrayname_5e0_pga -type port (just create)
# symaccess -sid 5678 create -name arrayname_5e0_pga -type port -dirport 5E:0

How to add (or remove) director ports to a port group
# symaccess -sid 5678 add -name arrayname_5e0_pga -type port -dirport 5E:0
# symaccess -sid 5678 remove -name arrayname_5e0_pga -type port -dirport 5E:0

How to create a view
# symaccess -sid 5678 create view -name hostname_vwa -sg hostname_sga –ig hostname_iga -pg arrayname_5e0_pga

How to rename a group
# symaccess -sid 5678 rename -name hostname_sga -type storage -new_name newhost_sga

How to rename a view
# symaccess -sid 5678 rename view -name hostname_vwa -new_name newviewname_vwa

How to delete a view (unmapping the devs at the same time)
# symaccess -sid 5678 delete view -name hostname_vwa -unmap

How to delete a initiator group
# symaccess -sid 5678 delete -name hostname_iga -type initiator
Error: Cannot perform the requested operation because the group is not empty
# symaccess -sid 5678 delete -name hostname_iga -type initiator -nop -force

How to delete a storage group

# symaccess -sid 5678 delete -name hostname_sga -type storage
Error: Cannot perform the requested operation because the group is not empty
# symaccess -sid 5678 delete -name hostname_sga -type storage -nop -force

How to replace a wwn in a initiator group
# symaccess -sid 5678 replace -wwn 100000000000001 -new_wwn 2000000000000002

How to rename (alias) for a given WWN
# symaccess -sid 5678 rename -wwn 100000000000001 -alias hostname/hba_a (this can be done from local symcli server only)

How to check which storage group a device belongs to
# symaccess –sid 5678 list -type storage –dev 1001

How to check which initiator group a wwn belongs to
# symaccess –sid 5678 list -type initiator -wwn 100000000000001

How to check which port group a FA port belongs to
# symaccess –sid 5678 list -type port -dirport 7f:1

How to list all tdevs defined on the array
# symdev -sid 5678 -tdev list

How to check the consumed capacity of a given tdev

# symcfg -sid 5678 list -pool poolname -tdev -detail -gb | grep 1C4B
# symcfg -sid 5678 list -pool poolname -tdev -range 1A11:1A1B -detail -gb

How to list all datadevs defined on the array
# symdev –sid 5678 –datadev list

How to list all tdevs not bound to any pool
# symdev -sid 5678 -tdev list -unbound

How to list all tdevs bound to given pool
# symcfg -sid 5678 -tdev -pool testpool

How to list all tdevs not assigned to any host

# symdev -sid 5678 -tdev list -noport -unbound
# symdev -sid 5678 -tdev list -noport -bound

How to check details of a pool (or list all tdevs bound to a pool or list all datadevs constituting the pool)
# symcfg -sid 5678 show -pool fast_pool -thin -detail

How to unbind a tdev from pool
# symconfigure -sid 5678 -cmd 'unbind tdev 1001 from pool fast_pool;' prepare
# symconfigure -sid 5678 -cmd 'unbind tdev 1001:1004 from pool fast_pool;’ prepare

How to check the status of device being unbound
# symcfg -sid 5678 show -pool fast_pool -thin -detail | grep Unbind

How to create TDEVs
# symconfigure -sid 5678 -cmd "create dev count=1000, size=32GB, config=TDEV, emulation=fba, dynamic_capability=dyn_rdf, binding to pool=poolname;" prepare

How to create VDEVs
# symconfigure -sid 5678 -cmd "create dev count=24, size=24802, emulation=FBA, config=VDEV;" prepare

How to create metas from TDEVs (TDEVS should not have been bound to any pool)
# symconfigure -sid 5678 -cmd 'form meta from dev 1000, config=STRIPED, stripe_size=1920; add dev 1001:100F to meta 1000;' prepare

How to list the pools created on the array
# symcfg -sid 5678 list -pool -thin -GB

How to rebalance the pool after adding extra datadevs
# symconfigure -sid 5678 -cmd "start balancing on pool fast_pool type=thin;" prepare
# symconfigure -sid 5678 -cmd "stop balancing on pool fast_pool type=thin;" prepare

=====================================================================================
SYMLMF
========

Display the array based license
# symlmf –sid 5678 list -type emclm

Display the host based license
# symlmf list –type host

Display host based and array based licenses that apply to Symm array
# symlmf –sid 5678 list –type sym

Display the state and usage number for all activated licenses on Symm 5678
# symlmf –sid 5678 query –type emclm

Install the array based license
# symlmf –sid 5678 add –type emclm –file <filename> -v

Install the host based license
# symlmf add –type se –license LicenseNumber

Delete the license
# symlmf delete –type se –license <licensename> where <licensename> is FAST, SRDF, SRDf/Async etc

=====================================================================================
SYMINQ & SYMPD
==============
to check the status of all paths
# syminq -fibre hba

List the devs that the host can access from an array (to be run on the target host)
# sympd list
# sympd list

List device ids and symmetrix serial number of devices server can see
# sympinq -pdevfile

=====================================================================================
SYMSTAT
=======
To get the stats for disks
# symstat -sid 5678 -type disk -disk all -i 5 -c 1

To get the stats for FAs – IOPS and KBPS
# symstat -sid 5678 -type port -dir all -i 5 -c 1
# symstat -sid 5678 -type port -dir 5f -i 5 -c 1
=====================================================================================
STORDAEMON
==========
to check the status of daemons
# stordaemon list -all

To show details of a daemon
# stordaemon show <name_of_daemon>

To start a daemon
# stordaemon start <name_of_daemon>

To stop a daemon
# stordaemon shutdown <name_of_daemon>
=====================================================================================

1 comment:

  1. No person shall permit any structures or material to be placed or to remain Boresi Glass Pool Fencing

    ReplyDelete