Operating System - HP-UX
1824993 Members
2168 Online
109678 Solutions
New Discussion юеВ

Help with VGIMPORT problems

 
SOLVED
Go to solution
dictum9
Super Advisor

Help with VGIMPORT problems

I had to reinstall the entire OS (11.23) on this Itanium machine.
I have the VG data on Clariion. Anticipating the rebuilt, I did strings on the /etc/lvmtab and saved the output, which I used for the mapfile. Now when I try to vgimport the volume group, I am getting the following message, what could be wrong?


#:cat /tmp/mapfile
/dev/vgbackup_indexes
/dev/dsk/c11t0d0
/dev/dsk/c11t0d1
/dev/dsk/c13t0d0
/dev/dsk/c13t0d1

#:vgimport -p -v -f /tmp/mapfile /dev/vgbackup_indexes
Beginning the import process on Volume Group "/dev/vgbackup_indexes".
vgimport: Physical volume "/dev/vgbackup_indexes" is not a block special file.
9 REPLIES 9
James R. Ferguson
Acclaimed Contributor
Solution

Re: Help with VGIMPORT problems

Hi:

The error is self-explanatory. The '/dev/vgbackup_indexes' is the name of your volume group, *not* a physical volume path.

You did *not* create a mapfile. You are using the "infile" syntax of 'vgimport' where you specify your pv_paths in a file.

A mapfile is a file that relates the logical volume numbers to non-standard logical volume names.

Regards!

...JRF...
nanan
Trusted Contributor

Re: Help with VGIMPORT problems

Hi etc
you may confuse the option of vgimport

If you export the vg map info with -s option
you can import with "vgimport -v -s -m mapfile vgs

But you didn't use -s option on vgexport
you need to input the device name like this

vgimport -v -m mapfile /dev/dsk/cXtYdZ



Regards
nanan
Pete Randall
Outstanding Contributor

Re: Help with VGIMPORT problems

You need to make the device file:

mkdir /dev/vgbackup_indexes
mknod /dev/vgbackup_indexes/group c 64 0xNN0000

Make sure the minor number (NN) is unique.

then run your vgimport and vgchange -a y


Pete

Pete
melvyn burnard
Honored Contributor

Re: Help with VGIMPORT problems

did you create the group file in /dev/vgbackup_indexes directory?
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
dictum9
Super Advisor

Re: Help with VGIMPORT problems

> A mapfile is a file that relates the logical volume numbers to non-standard logical volume names.


James Ferguson,

Could you please post an example of a valid mapfile?

Pete Randall,

You are right. I forgot to say that I did create the device files with mknod. It still doesn't work, and I realized why. I am not seeing the right disks. The disks which were in the VG are not currently visible with ioscan, so I am working on that. Once I have them visible, what should my mapfile look like? Is what I have good, other than having the wrong disk names in it?
James R. Ferguson
Acclaimed Contributor

Re: Help with VGIMPORT problems

Hi (again):

A mapfile would look like:

1 lvol1
2 lvol2
3 mylvol

Actually, anytime you make an Ignite make_tape_recovery, you will find mapfiles for your volume groups in the '/etc/lvmconf' directory. For example:

/etc/lvmconf/vg00.mapfile

Regards!

...JRF...
dictum9
Super Advisor

Re: Help with VGIMPORT problems

So a map file does not include any physical volumes? Then how is VGimport will know which PVs to bring into the lvm configuration?


Patrick Wallek
Honored Contributor

Re: Help with VGIMPORT problems

No, a mapfile does not include physical volume.

There are 2 ways for vgimport to know which volumes to import.

The first) You supply the list of physical volumes on the command line, along with a mapfile name to vgimport knows how to map the LVs. It would be something like 'vgimport -m mapfile -v vg?? /dev/dsk/c?t?d? /dev/dsk/c?t?d? ...' where you list all disks that are part of the VG.

The second) When you do a vgexport to create the mapfile (which is how a mapfile SHOULD be created) you specify a '-s' option to vgexport. This will write a VGID string in the mapfile (for example 'vgexport -p -v -s -m mapfile vg00').

Then when you vgimport, you specify a '-s' and vgimport will look at ALL disks on the system and import those that have a matching VGID. This is nice because you don't have to explicitly name ALL devices on the vgimport line. A vgimport command with this option would look like: 'vgimport -v -s -m mapfile vg??'

Here is what a mapfile looks like that was created with:

# vgexport -p -v -s -m vg00.map vg00
# cat vg00.map
VGID 77ccbeb7418937e4
1 lvol1
2 lvol2
3 lvol3
4 lvol4
5 lvol5
6 lvol6
7 lvol7
8 lvol8

This is my preferred method of createing mapfiles for vg export and import.
dictum9
Super Advisor

Re: Help with VGIMPORT problems

That worked, thank you.