HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

vgcfgrestore a vg with a new LUN

 
dennischen
Advisor

vgcfgrestore a vg with a new LUN

Hi Everyone,

Just have a lab test, and I have a question about the vgcfgrestore.

 

I have a vg02 with one PV. Badly I deleted the backend LUN in the storage.... 

shrx36a[/]#vgcfgrestore -n /dev/vg02 -l
Volume Group Configuration information in "/etc/lvmconf/vg02.conf"
VG Name /dev/vg02
---- Physical volumes : 1 ----
/dev/rdisk/disk43 (Non-bootable)                                          #accidently deleted from the backend storage

 

So when I re-create a new LUN, it has a new device name of /dev/disk/disk50. Can I use the vgcfgrestore to restore the vg02 in the new PV?  Seems like the vgcfgrestore needs the same device name..

shrx36a[/etc/lvmconf]#vgcfgrestore -n /dev/vg02 /dev/rdisk/disk50
Configuration info for Physical Volume "/dev/rdisk/disk50" not found
in "/etc/lvmconf/vg02.conf" :
Character-special file for PV not supplied on command line, OR
PV did not belong to Volume Group /dev/vg02 when configuration file was created.

3 REPLIES
Torsten.
Acclaimed Contributor

Re: vgcfgrestore a vg with a new LUN

"vgcfgrestore ... -o ..." should help you in this case, see the man page.


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
dennischen
Advisor

Re: vgcfgrestore a vg with a new LUN

Thanks, add the -o option with the old pv path. And vgcfgrestore suceed. But when I vgchange -a y, it still query the old pv.

 

shrx36a[/]#vgcfgrestore -n vg02 -l
Volume Group Configuration information in "/etc/lvmconf/vg02.conf"
VG Name /dev/vg02
---- Physical volumes : 2 ----
/dev/rdsk/c84t0d3 (Non-bootable)
/dev/rdsk/c85t0d3 (Non-bootable)

 

shrx36a[/]#vgcfgrestore -n vg02 -o /dev/rdsk/c85t0d3 /dev/rdsk/c85t0d2
Volume Group configuration has been restored to /dev/rdsk/c85t0d2

shrx36a[/]#vgchange -a y vg02
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c84t0d3":
The HP-UX kernel running on this system does not provide this feature.
Install the appropriate kernel patch to enable it.

vgchange: The HP-UX kernel running on this system does not provide this feature.
Install the appropriate kernel patch to enable it.

vgchange: Couldn't activate volume group "vg02":
Quorum not present, or some physical volume(s) are missing.

vgchange: Warning: couldn't query physical volume "/dev/dsk/c84t0d3":
Invalid argument
vgchange: Warning: couldn't query physical volume "/dev/dsk/c85t0d3":
Invalid argument
vgchange: Warning: couldn't query all of the physical volumes.

Patrick Wallek
Honored Contributor

Re: vgcfgrestore a vg with a new LUN

You need to use 'vgreduce -f' to remove the missing PV from the VG.

 

# vgreduce -f vg02