Operating System - HP-UX
1834535 Members
3437 Online
110069 Solutions
New Discussion

HP-UX command to identify pvlink.

 
SOLVED
Go to solution
Senthil Kumar .A_1
Honored Contributor

HP-UX command to identify pvlink.

Hi all,

I was wondering, is there any command that could list out pvlink's for a disk device.

This command should be able to reveal the pvlink, irrespective of whether the disk is part of LVM or not.

Thanx in advance.
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
5 REPLIES 5
harry d brown jr
Honored Contributor

Re: HP-UX command to identify pvlink.

HUH?

Do you mean something like pvdisplay ?

If a disk is part of a database and not using a filesystem or LVM then there's no hope.

I guess you could look at disk utilization, but that's only good if the system that the disk is attached to is the only system that can "see" or use the disk!

live free or die
harry d brown jr
Live Free or Die
Doug O'Leary
Honored Contributor
Solution

Re: HP-UX command to identify pvlink.

Hey;

If the disk is truly not part of LVM, then there is little to be done. That being said, I've supported most of the major databases and each and every one of them has used logical volumes that have been carved out of disks that are part of LVM. If you have a dabase that really does use the actual disk directly, then it's encumbant upon you to understand the architecture of your system.

All that being said, I've just finished a script that identifies which disks are used, which aren't, and which should be part of vgs but aren't. The script is attached. The output of the script looks like:

/dev/dsk/c33t3d5 vgsapdataE1P synced
/dev/dsk/c33t3d6 vgsapdataE1P synced
/dev/dsk/c33t3d7 Unassigned
/dev/dsk/c33t4d0 Unassigned
/dev/dsk/c33t4d1 Unassigned
/dev/dsk/c33t4d2 Unassigned
/dev/dsk/c33t4d3 Unassigned
/dev/dsk/c33t4d4 Unassigned
/dev/dsk/c34t8d0 Unassigned
/dev/dsk/c34t8d1 Unassigned
/dev/dsk/c34t8d2 Unassigned
/dev/dsk/c34t8d3 Unassigned
/dev/dsk/c36t0d0 vgsapE1P Alt link not assigned to vg!
/dev/dsk/c36t0d1 vgsapE1P Alt link not assigned to vg!
/dev/dsk/c36t0d2 vgsapE1P Alt link not assigned to vg!
/dev/dsk/c36t0d3 vgsapE1P Alt link not assigned to vg!
/dev/dsk/c36t0d4 vgsapdataE1P Alt link not assigned to vg!
/dev/dsk/c36t0d5 vgsapdataE1P Alt link not assigned to vg!

The script requires root privileges to run. No warranty implied expressed, or honored...

HTH

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Senthil Kumar .A_1
Honored Contributor

Re: HP-UX command to identify pvlink.

Hi Doug,


Thanx a million,.. the script you used was the exact stuff i was looking for. Though it might take some time to decipher your script.. nevertheless i will assign the point to the fullest once I test it.

I was in need of the commands that could read the disk raw.. and read for the VGID string , that way i could compare and come to a conclusion. I definitely thought there should be a method, for very reason that a LVM command "vgcreate" could identify a path as a "pvlink".. and not as a new LUN/storage disk.

There could be lot of device belonging to same VG , so need a way to map the paths with definitivity..(probably parsing the disk in RAW format for unique device id)..

Meanwhile my fullest gratitude to Doug, Will leave this thread open for some more responses..
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Senthil Kumar .A_1
Honored Contributor

Re: HP-UX command to identify pvlink.

One more point to be added...

If a command like "vgcreate" can figure out a path to be "pvlink" and not a fresh disk..i'm sure then there should be a offbeat method for us to figure out the same right....
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Suraj Singh_1
Trusted Contributor

Re: HP-UX command to identify pvlink.

Hi,

If you have VxVM, then you may issue:
# for i in `vxdisk list|awk '{print $1}'`
> do
> if [ $i != "DEVICE" ]
> then
> vxdmpadm getdmpnode nodename=$i
> fi
> done

and look for PATHS column.

Regards,
Suraj
What we cannot speak about we must pass over in silence.