LVM2 on Sarge - HD failure in the volume group container /root
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
LVM2 on Sarge - HD failure in the volume group containing /
I have three hard drives:
/dev/hda connected to the onboard primary IDE.
/dev/hde connected to PCI IDE card primary channel
/dev/hdg connected to PCI IDE card secondary channel
/boot is located on /dev/hda1
/dev/hda2 and the other 2 drives are in an LVM2 volume group.
The problem:
/dev/hdg is pretty much dead (nice chorus of clicks and whirs coming from it).
The problem is that / was on the volume group (initrd supports this). So when trying to boot, it is unable to find /, obviously because the volume group is not there since /dev/hdg is dead (I'm 100% sure of this, the boot log complains about not finding a device with UUID xxxxxxxxxxxxxxxxxxx which corresponds to /dev/hdg).
At this point I need to get into the system, salvage what I can (my home dir is already backed up whew), and rework the partitions (let's just say I'll never put / on lvm again...). I think booting the system as is will be impossible. What options do I have to boot with some sort of bootdisc/live linux cd, and try to rework things as far as lvm goes, such that I can boot the machine again? Is there bootdisk that would allow me to fix the volume group using lvm commands?
Any help with this would really be appreciated.
Gol
Someone suggested using the sarge install cd to troubleshoot. I booted up and loaded the lvm-cfg package. This gave me access to all the LVM2 tools. The command I am trying to run is:
vgreduce --removemissing vg-root
The problems occurs because dev-mapper is not available to the kernel, so LVM2 can't interact with it. Anyone know of a workaround to get dev-mapper working on the sarge netinst kernel? I can enable the network through the install menu and possibly ssh files?
Using the sarge netinst cd, proceeding to the LVM portion of the install (which I guess loads the appropriate device-mapper related files for the kernel), and then running:
vgreduce --removemissing vg-root
Machine then booted, everything fine.
However, after trying to do this:
lvextend -L +5G /dev/vg-root/lv-home
To extend the logical volume my home dirs resides on by 5 GB, it returned the error of not being able to find device with UUID xxxxxxxxxxxxxxxxxxxxxxxxx, which corresponds to the other 60 GB drive. Could this be mere coincidence (I did hear that hard drive clicks twice yesterday), or could an lvextend command screw things up like this?
Any input appreciated, I feel like my system is dying one drive at a time. On the plus side, everything important is now backed up.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.