Operating System - HP-UX
1753808 Members
8047 Online
108805 Solutions
New Discussion юеВ

How to find a disk from ioscan hdwe path

 
SOLVED
Go to solution
Michael D. Zorn
Regular Advisor

How to find a disk from ioscan hdwe path

My K200 server has 8 2GB disks, some of which are going very bad.

How can I trace the filesystem (/usr, for example) through the ioscan list (10/8.5.0, for ex) to the actual drive? (I suppose the SCSI address is on the disk somewhere.)

I have a vgdisplay printout that shows

/dev/vgfam/lvol21 /usr
640MB,0,0,0

(Everybody asks "why is /usr not on vg00?". I don't know - I inherited it.)

From 'strings /etc/lvmtab' I have 8 lines

/dev/dsk/c9t0d0
the others are t1, t3, t4, t5, t6, t14, t15

The ioscan list is

10/8.0.0, 10/8.1.0, 10/8.3.0, 10/8.4.0, 10/8.5.0, 10/8.6.0, 10/8,14.0, 10/8.15.0

So the ioscan numbers match the lvmtab numbers, but when I did 'vgdisplay', all that showed up at the end of the /dev list was

"Physical vols
/dev/dsk/c0t6d0
Total PE 250 Free PE 44"

for vg00 and a similar set of 3 lines for vgfam (/dev/dsk/c9t0d0).

But there doesn't seem to be a connection between /lvol21 and any of those.
4 REPLIES 4
Steven E. Protter
Exalted Contributor
Solution

Re: How to find a disk from ioscan hdwe path

The disk in question might not be in /etc/lvmtab . That is a separate problem.

lvdisplay -v /dev/vgfam/lvol21

That will definitively tell you what disk if any lvol21 is on.

The way I create logical volumes it might not be there at all.

First I lvcreate

I do not lvcreate and allocate space in the same command line. For some reason I can't keep the syntax straight in my head.

then I lvextend

then I newfs the filesystem.

If I get interuppted while doing lvm work (the help desk I think looks for the process with a ps command) I forget I did lvcreate and move on leaving behind an orphan logical volume. It has no extents and eventually I notice the discrepency and fix the issue.

That is one possible explanation for the condition of your system. I suggest you try the lvdisplay command and see what the scoop is.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Con O'Kelly
Honored Contributor

Re: How to find a disk from ioscan hdwe path

Hi Michael

Hopefully I'm not misintrepting what you are after and stating the obvious.

You can see which disks an LV is using with the lvdisplay -v command:
# lvdisplay -v /dev/vgfam/lvol21

You can compare this with ioscan output using:
# ioscan -fnC disk
(The '-n' option lists device files as well as H/W path)

Cheers
Con


Matti_Kurkela
Honored Contributor

Re: How to find a disk from ioscan hdwe path

A trace like that is a multi-step process:

From filesystem mount point (/usr) to volume group & logical volume name (/dev/vg*/lvol*): type "mount" and check the output, or read /etc/fstab.

From logical volume name to physical volume name (/dev/dsk/*): type "vgdisplay -v ". All the logical volumes in that volume group must be on the listed physical volumes. Then, "pvdisplay -v " tells you what logical volumes exist on any physical volume.

From physical volume name to hardware path: see "ioscan -fnCdisk" listing.

From hardware path to actual physical hardware: go to inspect the hardware. On many HP-UX systems the hardware paths of internal hard disks are marked on the covers.

If you're using an external device (a SCSI-connected disk box or something else), find out the SCSI controller slot from ioscan listing to find the right cable. Then follow that cable and find out the SCSI ID from the physical volume path (the "t" number from the /dev/dsk/c*t*d* triplet). Use it to find the correct drive.

If you're using a large FibreChannel SAN storage system, the "disk" seen by HP-UX might actually be a virtual thing created by the storage system. Then you have to use the storage system's own tools to find the real disk.
MK
Michael D. Zorn
Regular Advisor

Re: How to find a disk from ioscan hdwe path

Thanks, everybody.

"lvdisplay" is one of the few things I didn't make a printout of.

I think what you've given me is enough to solve my problem.