Operating System - HP-UX
1826038 Members
2839 Online
109690 Solutions
New Discussion

Re: Missing Volume Group and logical volume after reboot

 
qamar_2
Occasional Contributor

Missing Volume Group and logical volume after reboot

Hello there,

I have got hp-ux 11.00 with 4 Volume group
(vg00,vg01,vg02,vg03) on 4 diff HD. Today I rebooted my pc with "shutdown -r now". After system got started,
It could mount only vg00,All logical volumes in vg01,vg02,vg03
got disappeared.ie #"ls -l /dev/vg01 /dev/vg02 /dev/vg03" shows no logical
volumes.using SAM if I check all DEVICES,"volume group" column
shows "unused" for each VG except vg00.

If I try to run fsck, It gives the arror :"can not stat /dev/vg01",/dev/vg02
/dev/vg03.....

but ioscan -funC disk shows all the HD.

Can anybody help me out???

Thnks in Advance..

Qamar
Qamar Jamal
11 REPLIES 11
Rainer von Bongartz
Honored Contributor

Re: Missing Volume Group and logical volume after reboot

Seems to me that your volume groups vg01 .. vg03 are not activated at boot time.
Edit /etc/lvmrc to activate theese at boot.

Regards

rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
A. Clay Stephenson
Acclaimed Contributor

Re: Missing Volume Group and logical volume after reboot

HI,

It is possible that you do not have the AUTO_VG_ACTIVATE var in /etc/lmmrc so that nothing except vg00 is activarted.

Do a vgdisplay -v /dev/vg01, it it fails do a vgchange -a y
/dev/vg01 and then try your vgdisplay again. If that works do a vgchange -a y on the remaining volume groups.

If this fails, you will need to recreate /etc/lvmtab using vgscan. First copy /etc/lvmtab to /etc/lvmtab.safe. Man vgscan for details before running this command.

Clay
If it ain't broke, I can fix that.
Bill McNAMARA_1
Honored Contributor

Re: Missing Volume Group and logical volume after reboot

You can try to activate them:

vgchange -a y vg03
vgchange -a y vg02

mount -a

and look at your errors if any!
Otherwise /etc/lvmrc

Later,
Bill
It works for me (tm)
JACQUET
Frequent Advisor

Re: Missing Volume Group and logical volume after reboot

It seems you've lost the definition of LVM for vg01, vg02, and vg03.
Check first /etc/lvmtab :
# strings /etc/lvmtab
Do you see something like vg01, vg02, vg03 ? If you don't see anything, and you didn't touch the structure of the disks, then try to reimport vg if you saved it before by a vgexport command (vgexport -p -v -m /tmp/vg01.map /dev/vg01)
To reimport vg01 for example :
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgimport -m -v /tmp/vg01.map /dev/vg01 /dev/dsk/cXtYdZ

Hope it helps...

PJA
PJA
Bill McNAMARA_1
Honored Contributor

Re: Missing Volume Group and logical volume after reboot

You probably need to look into vgscan and/or vgimport since you've lost /dev/vg structures somehow...

This is going to get messy I'd imagine. You should call support to do it, especially if you've got important data on those disks....
you can really make it worse easily..

Later,
Bill
It works for me (tm)
qamar_2
Occasional Contributor

Re: Missing Volume Group and logical volume after reboot

Hello All

Thanks for your help.PJA's suggession was quite good.it helped me to some extent.
Now the problem is that:
size of my vg01 is 8680MB. B'coz of the problem that I faced, I removed my vg01 and recreated it.
now when I want to add a Logical volume it shows that out of 8680mB just 680MB is available.and it shows 4 Logical Volumes are alreay using this vg01.but I can not see any logical volumes.due this I am unable to cretate a logical volume of 8680MB.(b'coz vg01
is already in use by some logical volumes which I coudn't see anywhere.)where these LV's
have come from....

Best Regards,

Qamar
Qamar Jamal
Sachin Patel
Honored Contributor

Re: Missing Volume Group and logical volume after reboot

Hi Qamar,
How do you know that only 680MB is available?
run command pvdisplay
#pvdisplay pvname this will shows you any free PE (Physical Extents) or total PE and allocated PE.
When you did vgimport are you sure that you uses all disk?
The best way to do all this is into single user mode.
umount all mount points. and try one more time.
Save your previous vg01.map file.

# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
#vgimport vg01 disk1 disk2 disk3
#vgchange -a y vg01
#vgcvgbackup vg01 (this will saves your new activation in to /etc/lvmtab file)
All logical volume's special file(lvol1,lvol2 etc.. will be created automatically)

Sachin
Is photography a hobby or another way to spend $
qamar_2
Occasional Contributor

Re: Missing Volume Group and logical volume after reboot

Hi Sachin,

Thanks a lot for your help.
Now problem is when I do vgimport it gives
an error: "volume group /dev/cg01 already exist in /etc/lvmtab.

It seems problem is in lvmtab file itself.

So how can I create a new lvmtab file.
probably using vgscan? but I don't know how?

pls reply.......

Best Regards,
Qamar
Qamar Jamal
Joseph C. Denman
Honored Contributor

Re: Missing Volume Group and logical volume after reboot

I still think your problem is inactive vg.

If they are still in your lvmtab and all you did was reboot.

What error do you receive when you attempt to activate???

vgchange -a y vg01
vgchange -a y vg02
vgchange -a y vg03

mount -a

What are your errors???

We can help if you will tell us what responses you are geting from the system.

...jcd...

If I had only read the instructions first??
Sachin Patel
Honored Contributor

Re: Missing Volume Group and logical volume after reboot

Hi Qamar,
just move lvmtab file.
#mv /etc/lvmtab /etc/lvmtab.old

vgimport the vg01 02 and so on

#vgcfgbackup vg00 and so on to write back in to lvmtab.

Sachin
Is photography a hobby or another way to spend $
Sachin Patel
Honored Contributor

Re: Missing Volume Group and logical volume after reboot

Hi Qamar,
I am sorry about vgcfgbackup. I am wrong there.
it will not write to the lvmtab file. it will saves the configuration into the /etc/lvmconf directory.

Sachin
Is photography a hobby or another way to spend $