Operating System - HP-UX
1830935 Members
2520 Online
110017 Solutions
New Discussion

updating lvm configuration

 
radi_1
Frequent Advisor

updating lvm configuration

Hi,
A hard disk has gone bad and one v.g was defined for it.this v.g is not important and i need to physicaly remove the hard disk which is still connected to the system .The ioscan does not see it after reboot.so i need to update the lvmtab file;i intend to do the following;
1-# mv /etc/lvmtab /etc/lvmtab.old
2-#vgscan -av
and check if the H.D is removed from lvmtab
3-halt the system
4-remove the faulty h.d
5-reboot
Please confirm or advice for additional steps.
Regards
never take simple maters for granted
6 REPLIES 6
Mauro Gatti
Valued Contributor

Re: updating lvm configuration

Did you try first to eliminate disk from volume group using vgreduce -f option?
Bye
Ubi maior, minor cessat!
radi_1
Frequent Advisor

Re: updating lvm configuration

The volume group has disapeared,the bdf does not show it ,even sam could not see it,so i can not run vgreduce on non-existant v.g.
thanks for the quick response.
never take simple maters for granted
Pete Randall
Outstanding Contributor

Re: updating lvm configuration

Does the device (/dev/vgNN)file still exist? You should make sure that gets removed as well. I would normally use vgexport to get rid of the VG, but since you seem to think it's already gone, just update your /etc/lvmtab with vgscan as you proposed.


Pete

Pete
Enrico P.
Honored Contributor

Re: updating lvm configuration

Hi,
vgscan searches each physical volume connected to the system, looking for logical volumes ...
... it could go in error on the bad disk.

Yours step would have to be corrected

Remember to remove the entry of the bad vg in the /etc/lvmtab

You can try with

1.vgexport /dev/vg_name

and check the lvmtab.

If this work fine:

2.halt the system
3.remove the faulty h.d
4.reboot

If vgexport not work fine:

Remove the entry of the vg in the /etc/lvmtab

1.halt the system
2.remove the faulty h.d
3.reboot
4.mv /etc/lvmtab /etc/lvmtab.old
5.vgscan -av

Enrico
vinod_25
Valued Contributor

Re: updating lvm configuration

Hi

I assume that you need to remove the PV from a VG and VG from the /etc/lvmtab:

vgremove removes from the system the last physical volume of the volume group and the definition of the volume group or groups specified by volume_group_name.

All logical volumes residing on the last physical volume must be removed by executing lvremove before executing vgremove

Before removing a volume group, two steps are necessary:

1. Remove all but one of the logical volumes belonging to the group by using lvremove command

lvremove -f /dev/vgXX/lvolx


2. Remove the physical volumes belonging to the volume group by using vgreduce

vgreduce /dev/vgXX /dev/dsk/cXdXsX



then remove the vg from the volume group

vgremove /dev/vgXX

down the server... remove the faulty HDD and power up the server

Hope if this was your requirement ... if any steps missed out ...others pls guide...

Regards,

Vinod


Sarjerao
Frequent Advisor

Re: updating lvm configuration

If ioscan not detecting that disk, then vg associated to disk only need to logically remove.
I think #vgreduce will do all these stuff....updaing lvmtab, removing lvs