Operating System - HP-UX
1834941 Members
2134 Online
110071 Solutions
New Discussion

Re: /etc/lvmtab troubleshooting

 
Sergei Kazakov
Advisor

/etc/lvmtab troubleshooting

Some days ago I has hard disk mechanical failure, but I still can't remove Volume Group. The reason is that the hard disks without responce but links to those are still available. Need your help, please.
5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: /etc/lvmtab troubleshooting

Have you replaced the disk that failed? If so do a 'vgcfgrestore -n vgname /dev/rdsk/c#t#d0' This will restore the VG configuration to that disk. Then you can remove it if you want.
Rob Mallard
Valued Contributor

Re: /etc/lvmtab troubleshooting

If you want to remove the volume group (make sure that is what you really want to do) try vgexport vgxx. That should update the /etc/lvmtab file and the LVM subsystem along with removing the device files.

If you are trying to recover from a failed disk you probably want to replace the disk and recover the LVM structures with vgcfgrestore
thinphony
Advisor

Re: /etc/lvmtab troubleshooting

Hi!
Try this:

# vgchange -a n vg##
# vgexport /dev/vg##

Then you can use the freed disks to make PVs.


rajsri
Frequent Advisor

Re: /etc/lvmtab troubleshooting

i guess best would be

vgchange -a n vgname
vgexport vgname
which will remove entries from lvmtab ,
or you can try moving lvmtab and doing vgsvan -v , which will scan all the disks available and update lvmtab , but for this u have to make sure you have LVM cumulative patches
Cheryl Griffin
Honored Contributor

Re: /etc/lvmtab troubleshooting

When you lose a disk and the volume group still references the disk, you can also use vgreduce to have LVM remove the physical disk from the volume group. (This is different from vgexport which removes the volume group.)

# vgreduce -f /dev/vg01

From the man page:
"The vgreduce command with -f option removes all missing physical volume from the volume group."

After you have used vgreduce, recreate the /etc/lvmtab:
# mv /etc/lvmtab /tmp/lvmtab.old
# vgscan -v
"Downtime is a Crime."