Operating System - HP-UX
1753774 Members
6255 Online
108799 Solutions
New Discussion юеВ

vgexport error for the lvmtab_p from a foreign server..

 
whiz_kid911
Frequent Advisor

vgexport error for the lvmtab_p from a foreign server..

the volume group is in lvm2.1
OS is hpux 11.31

i hv reinstalled a server without collecting the map files for the volume groups. however i hv a backup of lvmtab_p files, am not able to collect the map files (vgexport -p -s -m vg01.map vg01) with the below error.

# vgexport -p -s -m vg01.map vg01
vgexport: "/dev/vg01/group": not a character device.
vgexport: Couldn't export volume group "vg01".
#

we hv been able to do so in lvm1...any inputs in terms how it works in lvm2?


vgdisplay: "/dev/vg01/group": not a character device.
vgdisplay: Cannot display volume group "/dev/vg01".
vgdisplay: "/dev/vg02/group": not a character device.
vgdisplay: Cannot display volume group "/dev/vg02".
vgdisplay: "/dev/vg03/group": not a character device.
vgdisplay: Cannot display volume group "/dev/vg03".
vgdisplay: "/dev/vg04/group": not a character device.
vgdisplay: Cannot display volume group "/dev/vg04".
vgdisplay: "/dev/vg05/group": not a character device.
vgdisplay: Cannot display volume group "/dev/vg05".
vgdisplay: "/dev/vg06/group": not a character device.
vgdisplay: Cannot display volume group "/dev/vg06".
vgdisplay: "/dev/vglock/group": not a character device.
vgdisplay: Cannot display volume group "/dev/vglock".

4 REPLIES 4
Bijeesh
Respected Contributor

Re: vgexport error for the lvmtab_p from a foreign server..

Hi,
>>am not able to collect the map files<<
Are you trying this command on reinstalled server?
If so how vg01 exist on this server?That may be the issue.Ckeck
#ll /dev/*/group

I think you need to import vg01.Can yo clear the question?
>>vgexport error for the lvmtab_p from a foreign server<<
foreign server????

I think after reinstallation you copied the previous lvmtab_p file.So it is giving error.

Refer man pages for vgimport and vgexport.

chris huys_4
Honored Contributor

Re: vgexport error for the lvmtab_p from a foreign server..

Hi,

If the mapfiles were not backed up before the reinstall happened, the information about the 'volume naming' is 'lost'.

Restoring the /etc/lvmtab_p file will not gain anything, worse, the errormessages shown above show that the restore of the /etc/lvmtab_p file only gives more problems.

So instead.

1. move the restored /etc/lvmtab_p file out of the way

# mv /etc/lvmtab_p /etc/lvmtab_p_recovered

2. check the lvmtab_p_recovered file to see, which vg's had which diskdevicefiles associated with it.

# strings /etc/lvmtab_p_recovered

3. import LVM 2.X volumegroups with the information found in the lvmtab_p_recovered file (but without a mapfile)

for every volumegroup

# vgimport -v /dev/vgX /dev/disk/ /dev/disk/ ...

4. If the volumenames are recorded somewhere, do a rename of the respective blocka and raw volumedevice files

# cd /dev/vgX
# mv /dev/vgX/lvol1 /dev/vgX/
# mv /dev/vgX/rlvol1 /dev/vgX/r

5. activate the volumegroups

# vgchange -a y /dev/vgX

Greetz,
Chris
whiz_kid911
Frequent Advisor

Re: vgexport error for the lvmtab_p from a foreign server..

hi chris,
the server came up with a different device paths after the reinstallation, and there is no way i can map the old device paths with the new ones.

if i remember correctly, In lvm1 version, if i hv an lvmtab backup, i could still create map files out of it and import the vgs with -s option.

i managed to boot the server from mirror disk and collect the map files.

thanks for the inputs.
whiz_kid911
Frequent Advisor

Re: vgexport error for the lvmtab_p from a foreign server..

booted the server frm the mirror disks and collected the required files..