Operating System - HP-UX
1829700 Members
2002 Online
109992 Solutions
New Discussion

root disk re-built but how do i get the old volume groups back

 
Steve Bark
Occasional Contributor

root disk re-built but how do i get the old volume groups back

We have a system that has three hard disks each with a seperate volume group.

Unfortunatly we lost the root disk to which there was a cpio backup but that refuses to load (not in sync issue).

Is there a way I can recover the volume groups back to the rebuilt root disk?
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor

Re: root disk re-built but how do i get the old volume groups back

Hi Steve,

If you know the disks and their corresponding VGs, then you can manually import them. For ex., you had vg01 on /dev/dsk/c2t5d0, then do

#mkdir /dev/vg01
#mknod /dev/vg01/group c 64 0x010000
#vgimport vg01 /dev/dsk/c2t5d0
#vgchange -a y vg01

This will import logical volumes with the default names - lvol1, lvol2, lvol3 etc.,

Mount them to some temporary mount points and see what they were used for.

mkdir /check
mount /dev/vg01/lvol1 /check

You should be able to make out the old mount point names from the contents of it. Add it to /etc/fstab. Repeat the above for all the LVs. Follow the same for the other LVs/disks.

If you have previous backup for /etc/fstab /etc/lvmconf, it can save you sometime.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steve Bark
Occasional Contributor

Re: root disk re-built but how do i get the old volume groups back

So far so good we have traced the original lv names etc. However is there a way in which we can change the name from lvol1 to a specified name eg lvol_archive.

Many Thanks

Re: root disk re-built but how do i get the old volume groups back

Its actually as easy as:

mv /dev/vg01/lvol1 /dev/vg01/lv_archive
mv /dev/vg01/rlvol1 /dev/vg01/rlv_archive

Generally its better to do this with the filesystems unmounted and the volume group de-activated!

Remember to update /etc/fstab when your done.

HTH

Duncan

I am an HPE Employee
Accept or Kudo