1848572 Members
7043 Online
104033 Solutions
New Discussion

recover the VGID

 
SOLVED
Go to solution
Rick Garland
Honored Contributor

recover the VGID

Working with HPUX 11.11 and SG 11.15
Multiple steps here so let me list them

We are swapping from XP to EMC disks. On system A I was able to activate a VG, vgexport it out with the -s option to retain the VGID, copy the map file over to system B nad vgimport. All was good for this initial VG.

On the next VG, I exported the VG out but forgot the -s option to get the VGID. Now I cannot vgimport the VG back into the original system. I am getting the foillowing error:

How to fix?

vgimport -m vgpkg1_new -p -v vgpkg1_new
Beginning the import process on Volume Group "vgpkg1_new".
vgimport: Unable to read the physical volume.root
12 REPLIES 12
Deoncia Grayson_1
Honored Contributor
Solution

Re: recover the VGID

Maybe this link should be of help:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=999129
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Steven E. Protter
Exalted Contributor

Re: recover the VGID

Shalom,

Suggestion:
Export it with the -m -p on the second node and then transfer the map file to the troublesome node and vgimport it.

Or have you already tried this?

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
Pete Randall
Outstanding Contributor

Re: recover the VGID

Rick,

Without the -s option, don't you have to give the physical path of the volumes? i.e.:

vgimport -v /dev/vg01 /dev/dsk/c0t1d0
/dev/dsk/c0t3d0


Pete

Pete
Jeff_Traigle
Honored Contributor

Re: recover the VGID

As long as you know one fo the device files that was used originally, you should be able to use this command (found on some other thread with a Google search - http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=110348&admit=-682735245+1154971046514+28353475) to see what the VGID was:

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

Once you have that, you should be able to add the:

VGID whatever

to the beginning of your map file just as if you'd used the -s option.
--
Jeff Traigle
Rick Garland
Honored Contributor

Re: recover the VGID

One cavaet, I no longer have the XP hooked up to the system.

I cannot vgexport from the other machine to get a map file from there. That VG is not in the lvmtab

I am vgscanning now to see if that will help by putting in the VG.

Marvin Strong
Honored Contributor

Re: recover the VGID

using the command above on one of the disks you know should be in the vg.

Or just loop through all of you disks. grab the unique VGIDS add them to the appropriate mapfiles with your favorite editor and vgimport with the map file.



Sandman!
Honored Contributor

Re: recover the VGID

If you have a conf file in the /etc/lvmconf dir "vgpkg1_new.conf" then you can insert the VGID on the top of the map file using any one of the PVs that are listed:

1. Obtain list of PVs in this VG
vgcfgrestore -l -n vgpkg1_new

2. Use one of the PVs (say /dev/dsk/c3t6d0) listed above, obtain its VGID
echo '0x2010?2X'|adb /dev/dsk/c3t6d0|tr -d ' '|awk -F: '{print "VGID "tolower($2)}'

3. Insert the output of line 2 to the top of the mapfile and re-import vgpkg1_new.

~hope it helps

john korterman
Honored Contributor

Re: recover the VGID

Hi Rick,

have you checked doc id: 3100632244
in the Tech base?

regards,
John K.
it would be nice if you always got a second chance
IT_2007
Honored Contributor

Re: recover the VGID

Hi Rick,

It is very painful to identify and recover them.

Try out this way:

1. If you remember LUN serial number or identifier then find out what are new device names on EMC array.
2. Once you identify them then put them all in one file (one device name per line)
3. Run following script.

for i in `cat devices.txt`
do
vgimport -m vgname.map -s -v $i
done

This script will check them and may complain that it doesn't have a valid CPU identifier but which is ok.

Hope this one help.
James R. Ferguson
Acclaimed Contributor

Re: recover the VGID

Hi Rick:

A mapfile is only for associated non-standard logical volume names with logical volume numbers, so its absence is not a "big deal". It is truly optional.

You can create a mapfile from scratch like:

1 lvol1
2 mylvol2
3 mylvol3
...

At at later time you can change the logical volume (name) associations if you wish by renaming the '/dev/vgNN/*' files associated with each logical volume and editing '/etc/fstab' appropriately.

As for the missing VGID for your 'vgimport' you can always use:

# vgscan -pv

...to *preview* what would be the creation of your '/etc/lvmtab' but *not* really update it. Doing this will examine the VGID of every disk on the system, and collect in the output the physical volumes comprising each volume group. From that output, you can build a *file* that specifies the physical members of your volume group. Then do:

# vgimport -m mapfile -f infile vg_name

...where the mapfile has been created (or omitted) as noted above; and the 'infile' is the list of physical devices deduced from the 'vgscan'.

Regards!

...JRF...
Rick Garland
Honored Contributor

Re: recover the VGID

It appears I am on my way. Lots of stuff (devices, names, VGIDs, etc) to elimate and a hook up of the XP. I also did a restore of the information I need.I have isolated a VGID that is not paired with any other VG. I have imported the VG using that VGID and works fine.

I thank all who responded! Each post was a valuble suggestion is assisting me to get back.

Rick Garland
Honored Contributor

Re: recover the VGID

Again, many thanks to all.