Operating System - HP-UX
1833041 Members
2360 Online
110049 Solutions
New Discussion

vgextend required, but can't activate VG!

 
SOLVED
Go to solution
Andrew_4
Honored Contributor

vgextend required, but can't activate VG!

Hi guys,

I've had a controller fail on a VA7400 today... and everything is okay except for one volume group... where the alternate links were not setup.

Based on system records, this is how the volume groups looks:

VG Name /dev/vgappstatic
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 2
Open LV 2
Max PV 16
Cur PV 2
Act PV 2
....yada yada yada...

--- Physical volumes ---
PV Name /dev/dsk/c6t6d4
PV Status available
Total PE 1279
Free PE 511
Autoswitch On

PV Name /dev/dsk/c4t6d5
PV Status available
Total PE 1279
Free PE 511
Autoswitch On



Now... I know that my c6 path is down... and will stay down for a little while longer.

Therefore, I can't activate this VG, cause it's missing the first disk. But I know that the c4 path to this disk will have all the data there... it's just not defined in the VG.

I'd like to vgextend the path in... but I can't until I can activate the VG.

So... catch 22.

How can I get the VG to use the path that I forgot to define?

Can I just change /etc/lvmtab, and deal with the VGRA headed be out of sync with the lvmtab?

Thanks heaps !

Andrew

The Unix Programmer's Manual, 2nd Edition, June, 1972: "The number of Unix installations has grown to 10, with more expected."
2 REPLIES 2
Solution

Re: vgextend required, but can't activate VG!

Don't try and manually edit the lvmtab!

NO, to fix this you need to remove and re-create the VG.

1. Make a note of the VGs group file device minor number:

ll /dev/vgappstatic/group

(write down the 0xNN0000 number)

2. Remove the existing VG defintion:

vgexport -m /tmp/vgappstatic.map /dev/vgappstatic


3. Re-create the VG using the same minor number you wrote down before:

mkdir /dev/vgappstatic
mknod /dev/vgappstatic/group c 64 0xNN0000
vgimport -m /tmp/vgappstatic.map /dev/vgappstatic /dev/dsk/c4t6d4 /dev/dsk/c4t6d5

4. Activate & Mount
vgchange -a y /dev/vgappstatic
mount -a

Don't forget to put your alt links back in when the controller is fixed.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Andrew_4
Honored Contributor

Re: vgextend required, but can't activate VG!

Excellent.. thanks sooo much for saving me from that slip up!

I've successfully vgexport / recreated / vgimported... as per your instructions. And it worked a treat.

Silly me, thinking to edit lvmtab! as if that would work! Derr, I should know better! :)

Thanks heaps.
The Unix Programmer's Manual, 2nd Edition, June, 1972: "The number of Unix installations has grown to 10, with more expected."