disk path status check (224 Views)
Reply
Super Advisor
rajesh73
Posts: 448
Registered: ‎03-17-2009
Message 1 of 5 (224 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

 

 

Acclaimed Contributor
Dennis Handly
Posts: 25,089
Registered: ‎03-06-2006
Message 2 of 5 (205 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.

Super Advisor
rajesh73
Posts: 448
Registered: ‎03-17-2009
Message 3 of 5 (196 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

 

Acclaimed Contributor
Dennis Handly
Posts: 25,089
Registered: ‎03-06-2006
Message 4 of 5 (193 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"

 

 

 

Acclaimed Contributor
Torsten.
Posts: 23,303
Registered: ‎10-02-2001
Message 5 of 5 (192 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! thumb below!   
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.