DISCLAIMER : Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility.If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.


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

PowerPath Powermt Commands - EMC

Below are  the 10 major commands to check the POWER PATH config on unix servers.
Please follow the below commands

1.powermt display ====>Display High Level HBA I/O Paths
2.powermt display dev=emcpowera ===>Display for specific LUN
3.powermt display dev=all ====> Display All Attached LUNs
4.powermt check_registration ===> Display PowerPath Registration Key / Status
5.powermt display options ===> Display EMC PowerPath Options
6.powermt display hba_mode ====> Display PowerPath HBA Mode
7.powermt display paths – Display available I/O Paths.
8.powermt displays port_mode ===>Display Port Status
9.powermt version ====> Display EMC PowerPath Version
10.powermt check ===>Check the I/O Paths


1. #powermt display ===>Display High Level HBA I/O Paths

Example output:

Symmetrix logical device count=212
CLARiiON logical device count=0
Hitachi logical device count=0
Invista logical device count=0
HP xp logical device count=0
Ess logical device count=0
HP HSx logical device count=0
==============================================================================
----- Host Bus Adapters ---------  ------ I/O Paths -----  ------ Stats ------
###  HW Path                       Summary   Total   Dead  IO/Sec Q-IOs Errors
==============================================================================
   3 0/4/0/0/0/1                   optimal     424      0       -     0    848
   5 0/5/0/0/0/1                   optimal     424      0       -     0    848

2. #powermt display dev=emcpowera ===>Display specific LUN

When there are multiple LUNs connected to a server, you might want to view information about a specific LUN by providing the logical name of the LUN as shown below.

3.#powermt display dev=all ====> Display All Attached LUNs

Mostly we used to run this command powermt, which will display all the attached logical devices to the server.

Pseudo name=disk915
Symmetrix ID=000290103691
Logical device ID=06B8
state=alive; policy=SymmOpt; priority=0; queued-IOs=0;
==============================================================================
--------------- Host ---------------   - Stor -   -- I/O Path --  -- Stats ---
###  HW Path               I/O Paths    Interf.   Mode    State   Q-IOs Errors
==============================================================================
   3 0/4/0/0/0/1.0x5006048c52a862e7.0x40a6000000000000 c14t4d6   FA  8cB   active  alive       0      2
   3 0/4/0/0/0/1.0x5006048c52a862f7.0x40a6000000000000 c15t4d6   FA  8dB   active  alive       0      2
   5 0/5/0/0/0/1.0x5006048c52a862e8.0x40a6000000000000 c16t4d6   FA  9cB   active  alive       0      2
   5 0/5/0/0/0/1.0x5006048c52a862f8.0x40a6000000000000 c17t4d6   FA  9dB   active  alive       0      2

Pseudo name=disk988
Symmetrix ID=000290103691
Logical device ID=074B
state=alive; policy=SymmOpt; priority=0; queued-IOs=0;
==============================================================================
--------------- Host ---------------   - Stor -   -- I/O Path --  -- Stats ---
###  HW Path               I/O Paths    Interf.   Mode    State   Q-IOs Errors
==============================================================================
   5 0/5/0/0/0/1.0x5006048c52a862e8.0x40dc000000000000 c16t11d4  FA  9cB   active  alive       0      2
   3 0/4/0/0/0/1.0x5006048c52a862e7.0x40dc000000000000 c14t11d4  FA  8cB   active  alive       0      2
   3 0/4/0/0/0/1.0x5006048c52a862f7.0x40ce000000000000 c15t9d6   FA  8dB   active  alive       0      2
   5 0/5/0/0/0/1.0x5006048c52a862f8.0x40ce000000000000 c17t9d6   FA  9dB   active  alive       0      2

Details:

a. Pseudo name=emcpowera – The device name that can be used by the server. For example,
/dev/emcpowera.
b. CLARiiON ID=AAA00000000000 [dev-server] - EMC CLARiiON CX3 serial number and
the server name.
c. Logical device ID=11111111 [LUN 1] – LUN number. For example, LUN 1.
d. state=alive; policy=CLAROpt; – This displays that this particular LUN is valid and using
the CLAROpt policy.
e. Owner: default=SP B, current=SP B – This indicates that the default (and current) owner for
this LUN is storage processor SP B.


4. powermt check_registration – Display PowerPath Registration Key / Status


If you’ve lost the PowerPath registration key that you’ve used during the EMC PowerPath installation, you can retrieve it using the following command.

# powermt check_registration
Key AAAA-BBBB-CCCC-DDDD-EEEE-FFFF
  Product: PowerPath
  Capabilities: All


5. #powermt display options ===> Display EMC PowerPath Options


Displays the high level EMC SAN array options.


6.#powermt display hba_mode ====> Display PowerPath HBA Mode


This is similar to #1, but displays whether hba is enabled or not, as shown in the last column of the output.

Examble output:

Symmetrix logical device count=212
CLARiiON logical device count=0
Hitachi logical device count=0
Invista logical device count=0
HP xp logical device count=0
Ess logical device count=0
HP HSx logical device count=0
==============================================================================
----- Host Bus Adapters ---------  ------ I/O Paths -----  Stats
###  HW Path                       Summary   Total   Dead  Q-IOs Mode
==============================================================================
   3 0/4/0/0/0/1                   optimal     424      0     0 Enabled
   5 0/5/0/0/0/1                   optimal     424      0     0 Enabled

7.powermt display paths ===> Display available I/O Paths.


This displays all available path for your SAN device.

8.powermt displays port_mode ===>Display Port Status


Displays the status of the individual ports on the HBA. i.e Whether the port is enabled or not.

9.powermt version ====> Display EMC PowerPath Version


How to identify the version number of EMC PowerPath software?

10.powermt check ===>Check the I/O Paths


If we made changes to the HBA’s, or I/O paths, then run the powermt check, to take appropriate action. For example,
if you manually removed an I/O path, check command will detect a dead path and remove it from the EMC path list.

EMC ODM definations cleanup

Before making any changes, collect host logs to document the current configuration. At a minimum, save the following: inq, lsdev -Cc disk, lsdev -Cc adapter, lspv, and lsvg
Shutdown the application(s), unmount the file system(s), and varyoff all volume groups except for rootvg. Do not export the volume groups.

# varyoffvg

Check with lsvg -o (confirm that only rootvg is varied on)

If no PowerPath, skip all steps with power names.

For CLARiiON configuration, if Navisphere Agent is running, stop it:
# /etc/rc.agent stop

Remove paths from Powerpath configuration:
# powermt remove hba=all

Delete all hdiskpower devices:
# lsdev -Cc disk -Fname grep power xargs -n1 rmdev -dl

Remove the PowerPath driver instance:
# rmdev -dl powerpath0

Delete all hdisk devices:For Symmetrix devices, use this command:
# lsdev -CtSYMM* -Fname xargs -n1 rmdev -dl

For CLARiiON devices, use this command:
# lsdev -CtCLAR* -Fname xargs -n1 rmdev -dl

Confirm with lsdev -Cc disk that there are no EMC hdisks or hdiskpowers.
Remove all Fiber driver instances:
# rmdev -Rdl fscsiX(X being driver instance number, i.e. 0,1,2, etc.)

Verify through lsdev -Cc driver that there are no more fiber driver instances (fscsi).
Change the adapter instances in Defined state
# rmdev -l fcsX(X being adapter instance number, i.e. 0,1,2, etc.)

Create the hdisk entries for all EMC devices:
# emc_cfgmgror
# cfgmgr -vl fcsx(x being each adapter instance which was rebuilt).

Skip this part if no PowerPath.
Configure all EMC devices into PowerPath:
# powermt config

Check the system to see if it now displays correctly:
# powermt display
# powermt display dev=all
# lsdev -Cc disk
# /etc/rc.agent start


Recovering emc dead path

# powermt display dev=all
And you notice that there are "dead" paths, then these are the commands to run in order to set these paths back to "alive" again, of course, AFTER ensuring that any SAN related issues are resolved.

To have PowerPath scan all devices and mark any dead devices as alive, if it finds that a device is in fact capable of doing I/O commands, run:

# powermt restore To delete any dead paths, and to reconfigure them again:
# powermt reset
# powermt config

Or you could run:
# powermt check