Operating System - HP-UX
1834780 Members
2646 Online
110070 Solutions
New Discussion

Re: How to see VGID of any disk

 
SOLVED
Go to solution
Juha Eklund
Occasional Advisor

How to see VGID of any disk

Howdy,
do anybody know a command which gives out a
VGID of disk without any connections to which
VG the physical disk now belongs .. I have a situation where I have disks which are now not in any volume group but I had to know if they were previously in a VG ( Yes, I know that those disks have been "pvcreated" but that is not enough ...

-- Juha --
-- hopefully lost in kernel-space --
8 REPLIES 8
Stefan Farrelly
Honored Contributor

Re: How to see VGID of any disk


Do the following command;

echo 2000?8c+8x|adb /dev/dsk/cXXXXX

and if it returns info such as LVMRECxxxx then you know this disk was indeed in a VG before. If not then its new and never been pvcreated and included in a VG. Eg. did this command on a new blank disk and got;

2000: 0 0 0 0 0 0 0 0

Did it on an existing disk and got;

2000: LVMREC0177C7 0xEE0D 38F5 7F64 77C7


Im from Palmerston North, New Zealand, but somehow ended up in London...
Juha Eklund
Occasional Advisor

Re: How to see VGID of any disk

Thanx for the info !!! Is the VGID reported in that HEX-output that the command gives out ?!

-- Juha --
-- hopefully lost in kernel-space --
Stefan Farrelly
Honored Contributor

Re: How to see VGID of any disk

The VGID could well be in the hex output given. You may need to do some comparisons on disks in different VG's to compare the results, or it may be possible that when you remove a disk from a VG using vgreduce the info on what VG the disk used to be in isnt there anymore.
Im from Palmerston North, New Zealand, but somehow ended up in London...
James R. Ferguson
Acclaimed Contributor
Solution

Re: How to see VGID of any disk

Hi Juha:

To get the VGID, do the following:

# echo 0x2010?2X|adb /dev/dsk/cXtYdZ|expand|tr -d " "|sed "s/2010:/VGID /"

You will see something like:

VGID 11823E9D33FB2ABF

...JRF...

Juha Eklund
Occasional Advisor

Re: How to see VGID of any disk

As usual real Gurus share a light in dark ... This solves the problem and as usual also can be base upon which many scripts can be built ..

-- Juha --
-- hopefully lost in kernel-space --
Santosh Nair_1
Honored Contributor

Re: How to see VGID of any disk

I'm just curious...couldn't you just do a:
vgexport -s -p -m
on the VG. This would produce a mapfile with the VGID
in it(?)
Life is what's happening while you're busy making other plans
Santosh Nair_1
Honored Contributor

Re: How to see VGID of any disk

Oops, forget my previous posting...didn't realize you
wanted VGID from the disk and not from the VG itself.
Life is what's happening while you're busy making other plans
Juha Eklund
Occasional Advisor

Re: How to see VGID of any disk

Yeah,
I think that it is annoying if there are only
commands that rely the disk being in the VG if You want to have information about them .. There should be a "documented way" ( aka . command ) to produce the information ex. VGID .. "natural way" would be the pvdisplay-command ( enhancement request ?! )

-- Juha --
-- hopefully lost in kernel-space --