Friday, October 3, 2014

EMC PowerPath Commands - Scan and configure new LUN


“Before we begin system administrator should take backup of current configuration on all nodes”

Commands are highlighted in bold letters.

powermt display dev=all > before_scan.txt  (Backup file)

powermt display  - Display high level Host Bus Adapter (HBA) I/O paths

Scan and configure new LUN

ls /sys/class/scsi_host/ - Command to find scsi_host value  (host0 host1 host2)

echo "- - -" > /sys/class/scsi_host/host0/scan - Command to rescan the bus
Note : "- - -"  indicates all controllers, all channels and all luns should be scanned and should be executed on all nodes.

powermt config - This command checks for available EMC SAN logical devices and add those to PowerPath configuration list.

powermt display  

powermt display dev=all > after_scan.txt  (Backup file)

Run diff -c before_scan.txt after_scan.txt - will display new devices repeat the same on all nodes to make sure the new paths match each other on all nodes.

powermt save - Save a custom PowerPath configuration.

If you have many nodes you can export mappings on master node and  import the same on other nodes (easy way you can place mapping file on nfs share with is shared across all nodes).

emcpadm export_mappings -f  /tmp/r1-mappings (-f option used for file location) Master node.

emcpadm import_mappings  - f /tmp/r1-mappings (-f option used for file location)  other nodes.

Once mapping files are imported on other nodes repeat below commands in sequence on all nodes apart from master node.

powermt display  

ls /sys/class/scsi_host/

echo "- - -" > /sys/class/scsi_host/host0/scan 

powermt display  

powermt config

powermt save

powermt display dev=all | egrep -i 'logical|pseudo'

No comments:

Post a Comment