1833989 Members
2136 Online
110063 Solutions
New Discussion

Re: vgimport

 
Bruce Vanderford_2
Occasional Contributor

vgimport

What am I doing wrong? Last weekend I replaced the root disk in a server
running HP-UX 10.20 with an external disk array. I ran vgcfgbackup on all of my
volumes, vgchange -a n (volumes), and vgexport -v m (mapfiles). Then I replaced
the operating disk and ran a complete new install.
Once that was completed I brought back my mapfiles.
Then
# mkdir /dev/(volume)
# mknod /dev/(volume) group c 64 0x0#0000
# vgcfgrestore -n /dev/(volume) /dev/rdsk/(disk #)
# vgimport -v -m (mapfile) /dev/(voloume) /dev/dsk/(disk #)
then I ran into a snag. System told me that I could not import, disk info was
not in lvmtab. So then I ran vgscan and this would not add info to lvmtab.
System told me that the logical volumes were active. When I triend to run
vgchange -a n system said volume does not exists in lvmtab? When I would run
vgscan it would see my disk units but told me I needed to run vgimport.
Needless to say I rebuilt volumes and restore data from tape. This server
was'nt to bad only 75 Gig's of data but I need to do another server this
weekend and this server has about 3 times the data.

What did I do wrong??
3 REPLIES 3
Neil Gast_1
Frequent Advisor

Re: vgimport

Did you edit your vgexport map file with the new hardware paths for the
receiving end? When vgexporting to a different server or to a different SCSI
controller, you need to edit the map file to reflect the new home (hw path) of
the volume group.

MrNeil
Paul Heffels_1
Frequent Advisor

Re: vgimport

Hi Bruce,

I'm very sorry to hear that it didn't work out the way it was supposed to. I'm
not at work right now and I don't have my machine at hand to check something
out, but could you post or mail the exact syntax of the commands you've
entered? Don't worry, we'll find out before you're doing the "big one".
Paul Heffels_1
Frequent Advisor

Re: vgimport

Hi Bruce, I think it all went wrong when you did the vgcfgrestore. By doing
that, you denied vgimport the change to add the disks to the lvmtab. Please
check the tips you received on your previous question again.

In short:
- umount
- vgchange -a n .....
- vgexport .......
....
replacement actions
....
- insf -e
- vgscan -v
- create vg-dir and group file
- vgimport .......
- vgchange -a y ......

Good luck!