disk path status check (130 Views)
Reply
Super Advisor
rajesh73
Posts: 431
Registered: ‎03-17-2009
Message 1 of 5 (130 Views)

disk path status check

We need to createthe scirpt for disk path status check

 

 

/usr/bin/sudo /usr/sbin/ioscan -m dsf

 

below command show lot of disk path details

 

/dev/rdisk/disk29        /dev/rdsk/c6t0d7

                         /dev/rdsk/c8t0d7

                         /dev/rdsk/c12t0d7

                         /dev/rdsk/c10t0d7

 

i need to check the lun path status .

 

/usr/sbin/scsimgr -p lun_map -D /dev/rdisk/disk29

lunpath:10:32/0/2/0/0/0/0/4/0/0/0.0x00060e8005bf3333.0x5007000000000000:fibre_channel:ACTIVE:ACTIVE

lunpath:19:32/0/2/0/0/0/0/4/0/0/0.0x00060e8005bffb01.0x5007000000000000:fibre_channel:ACTIVE:ACTIVE

lunpath:38:33/0/2/0/0/0/0/4/0/0/0.0x00060e8005bffb14.0x5007000000000000:fibre_channel:ACTIVE:ACTIVE

lunpath:37:33/0/2/0/0/0/0/4/0/0/0.0x00060e8005bffb11.0x5007000000000000:fibre_channel:ACTIVE:ACTIVE

 

from the below output if any lunpath show like that (fibre_channel:NOT ACTIVE), we need to filter the two lunpath with raw disk name

 

/usr/sbin/scsimgr -p lun_map -D /dev/rdisk/disk29

lunpath:10:32/0/2/0/0/0/0/4/0/0/0.0x00060e8005bf3333.0x5007000000000000:fibre_channel:ACTIVE:ACTIVE

lunpath:19:32/0/2/0/0/0/0/4/0/0/0.0x00060e8005bffb01.0x5007000000000000:fibre_channel:ACTIVE:ACTIVE

lunpath:38:33/0/2/0/0/0/0/4/0/0/0.0x00060e8005bffb14.0x5007000000000000:fibre_channel:NOT ACTIVE

lunpath:37:33/0/2/0/0/0/0/4/0/0/0.0x00060e8005bffb11.0x5007000000000000:fibre_channel:NOT ACTIVE

 

 

please provide script

 

 

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,700
Registered: ‎03-06-2006
Message 2 of 5 (111 Views)

Re: disk path status check

>we need to filter the two lunpath with raw disk name

 

Please indicate the exact output you want, given your example.

Please use plain text.
Super Advisor
rajesh73
Posts: 431
Registered: ‎03-17-2009
Message 3 of 5 (102 Views)

Re: disk path status check

 need to check the lun path status .

 

 

from the below output if any lunpath show like that (fibre_channel:NOT ACTIVE), we need that disk name separtely

 

/usr/sbin/scsimgr -p lun_map -D /dev/rdisk/disk29

lunpath:10:32/0/2/0/0/0/0/4/0/0/0.0x00060e8005bf3333.0x5007000000000000:fibre_channel:ACTIVE:ACTIVE

lunpath:19:32/0/2/0/0/0/0/4/0/0/0.0x00060e8005bffb01.0x5007000000000000:fibre_channel:ACTIVE:ACTIVE

lunpath:38:33/0/2/0/0/0/0/4/0/0/0.0x00060e8005bffb14.0x5007000000000000:fibre_channel:NOT ACTIVE

lunpath:37:33/0/2/0/0/0/0/4/0/0/0.0x00060e8005bffb11.0x5007000000000000:fibre_channel:NOT ACTIVE

 

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,700
Registered: ‎03-06-2006
Message 4 of 5 (99 Views)

Re: disk path status check

>we need that disk name separately

 

What's a "disk name"?

Due to your lack of specifications of the OUTPUT, I assume you just want these whole lines?

lunpath:38:33/0/2/0/0/0/0/4/0/0/0.0x00060e8005bffb14.0x5007000000000000:fibre_channel:NOT ACTIVE

lunpath:37:33/0/2/0/0/0/0/4/0/0/0.0x00060e8005bffb11.0x5007000000000000:fibre_channel:NOT ACTIVE

 

So you can just do:

/usr/sbin/scsimgr -p lun_map -D /dev/rdisk/disk29 | grep "NOT ACTIVE"

 

 

 

Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,103
Registered: ‎10-02-2001
Message 5 of 5 (98 Views)

Re: disk path status check

IMHO the following commands may help you:

# ioscan -P health -C disk

# ioscan -P health -C lunpath


If you see "limited" or "offline" you have a problem.
"online" or "standby" is OK.

Hope this helps!
Regards
Torsten.

__________________________________________________

There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! star in the left column!   
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation