Operating System - HP-UX
1826900 Members
3299 Online
109705 Solutions
New Discussion

Re: How to recover vg01 after reinstalling hpux 11i

 
Michelle Hutchinson
Occasional Advisor

How to recover vg01 after reinstalling hpux 11i

Hi

I've recently re-installed hpux 11i on vg00 due to turning on trusted hosts, which locked all logins (silly me!) I want to get vg01 disk back with all it's data on - I belive I can use vgexport, but don't know what else I need to do first.

Please help
9 REPLIES 9
Luk Vandenbussche
Honored Contributor

Re: How to recover vg01 after reinstalling hpux 11i

Hi

mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgimport vg01 /dev/dsk/cxtydz (specify al devices file in volumegroup)
vgchange -a y vg01
vgcfgbackup vg01

mount /dev/vg01/lvolx /fsx
Doug O'Leary
Honored Contributor

Re: How to recover vg01 after reinstalling hpux 11i

Hey;

>>I've recently re-installed hpux 11i on vg00 due to turning on trusted hosts, which locked all logins (silly me!)

Wow; that's alot like killing a fly with a small thermonuclear device - maybe not so small.. Why didn't you simply unlock the accounts?

You'll need to know what disk(s) comprised vg01 prevoiusly. If you have a vg map of the volume group, you'll be a lot more successful. Assuming you have that information:

mkdir /dev/vg01
mkdnod /dev/vg01/group c 64 0x010000
vgimport -m ${map} vg01 ${disks[*]}

If you don't have the volume group map file, all lv names will be reset to the default (lvol01/lvol02..., etc).

HTH;

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Pete Randall
Outstanding Contributor

Re: How to recover vg01 after reinstalling hpux 11i

Actually, you would use vgimport:

mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgimport -m /tmp/vg01map /dev/vg01 /dev/dsk/cXtYdZ /dev/dsk/cXtYdZ
vgchange -a y /dev/vg01

The map file is not necessary if your logical volumes followed standard naming conventions (lvol1, lvol2, etc.).

That should do it.


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: How to recover vg01 after reinstalling hpux 11i

Hi Michelle:

All you need to do to is to 'vgimport' vg01.

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

If you did a 'vgexport' first and have mapfiles that name your logical volumes, specify that mapfile in your 'vgimport'. If you didn't do that step, don't worry. Standard logical volume names will be assigned as 'lvol1', 'lvol2', etc.

Be sure to specify all the 'pv_paths' which apply. As always, see the manpages for more information.

Regards!

...JRF...
Doug O'Leary
Honored Contributor

Re: How to recover vg01 after reinstalling hpux 11i

yep; forgot the vgchange -a y vg01...

That's a wee bit important...

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Michelle Hutchinson
Occasional Advisor

Re: How to recover vg01 after reinstalling hpux 11i

thanks for all your reply's - worked a treat, but get the following error message when mounting the lv


# mount /dev/vg01/lvol3 /opt/coinsqa10
vxfs mount: /dev/vg01/lvol3 is corrupted. needs checking

I do now have lvol3 on vg01 and vg00 - would this make a difference?

Is there anything I can do to get the lv back?

(Doug - would have loved to unlock the accounts, but logged out all session before I realised what I done - yes I am blonde!!)

Thanks

Michelle
Patrick Wallek
Honored Contributor

Re: How to recover vg01 after reinstalling hpux 11i

fsck -F vxfs -o full /dev/vg01/lvol3

should fix the filesystem.

Also, you could have just booted into single-user mode to unlock all the accounts after trusting the system. '/usr/lbin/modprpw -V' is what you want if/when you trust the system again. 'man modprpw' for more info.
Anil C. Sedha
Trusted Contributor

Re: How to recover vg01 after reinstalling hpux 11i

Michelle,

Do remember to run fsck with "-o full" option otherwise you may continue to get that error.
If you need to learn, now is the best opportunity
Michelle Hutchinson
Occasional Advisor

Re: How to recover vg01 after reinstalling hpux 11i

Thanks to you all - I now have all my data back on vg01 - All your expert knowledge has saved my day.

Thanks again

Michelle