Operating System - HP-UX
1832978 Members
2775 Online
110048 Solutions
New Discussion

vgimport: Forgot to make map files

 
SOLVED
Go to solution
EDB IT Drift_2
Occasional Contributor

vgimport: Forgot to make map files

Hi all

 

I just made a big mistake.

I was upgrading a server from 11i v2 (pre 2008) to 11i v3. As you know this is a complete reinstall.

I forgot to make map files for my volume groups, and now I can't recreate them.

 

Running vgimport I get:

vgimport: Unable to read the physical volume

 

Trying vgscan -v -a I got this for every volume group:

Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c1t0d2
/dev/dsk/c3t0d2
/dev/dsk/c1t0d3
/dev/dsk/c3t0d3

 

 

Is there any way to recover from this ?

 

Would be extremely thankful for any help.

 

Regards,

Tommy

3 REPLIES 3
Bill Hassell
Honored Contributor
Solution

Re: vgimport: Forgot to make map files

The mapfile's purpose is name the lvols and optionally save the serial number so vgimport will very easy.

So in the future, always run vgexport with -s -m and -p on every VG when you make any changes. Or better yet, place the commands in cron once a week.

 

However, the vgscan has given you the disks to use for vgimport. So create the /dev/vgname directory, a unique group special file and then run vgimport like this:

 

vgimport vgname /dev/dsk/c1t0d2 /dev/dsk/c3t0d2 /dev/dsk/c1t0d3 /dev/dsk/c3t0d3

or with the shell's help: vgimport vgname /dev/dsk/c[13]t0d[23]

If you used the default names for your lvols (lvol1, lvol2, lvol3...) then the import is complete.

If not, you'll need to manually create a mapfile with the correct names in the correct order, like this:

 

1 mylvol1
2 lvolextra2
3 lvol3
4 bigdata
5 lastlv

 Then use vgexport with the -m option to specify the new mapfile. As always, check the man page for details.



Bill Hassell, sysadmin
EDB IT Drift_2
Occasional Contributor

Re: vgimport: Forgot to make map files

Thank you for the reply.

The problem was that vgscan did not map which disks belonged to which vg, but I could probably tried one after the other.

 

I finally managed to boot host on the old OS image, and make map files from there.

Problem solved !

singh sanjeev
Trusted Contributor

Re: vgimport: Forgot to make map files

If needed, you can recover the system vgmapfile  from it's image file: (old ignite has taken)

On ignite server:

# cd /var/opt/ignite/recovery/archives/mymachine

   # ls

   2010-12-12,15:02  -- Name of the archive we extract from.


   # gzcat ./2010-12-12,15:02 | pax -r -f - etc/passwd

 

 

http://unixpedia.blogspot.in/2013/08/hpux-how-to-recover-file-from-ignite.html

Sanjeev Singh