Gentoo Archives: gentoo-user

From: BRM <bm_witness@×××××.com>
To: Users Gentoo <gentoo-user@l.g.o>
Subject: [gentoo-user] LVM Recovery....
Date: Sat, 18 Oct 2008 16:42:10
Message-Id: 865538.41532.qm@web65409.mail.ac4.yahoo.com
1 Okay, so I have a desktop running Gentoo 2008.0 (pre-2008.0 release) that has been a little problematic for a while. The power supply died last May/early June - or rather the system wouldn't boot with that power supply - and it hasn't really been booted since early june at the latest. I just got a new power supply for it, got everything connected and it started up without any issues.
2
3 So I decided to sync portage and update (emerge --sync && emerge world -vuDN). After a little bit of playing around with package masks (since I had a few packages unmasked and it was being a problem) I got it straightened away, and let is sit for the night last night to continue on its merry way of updating.
4
5 Well..I checked up on it a little while ago, and there was a kernel panic in the middle of a build - reporting a hardware error and recommending looking at mcelog --ascii. Okay. So I restart the system and hear a bit of clicking - and the system won't go past POST. Argh.
6
7 Well, I turns out my SATA drive was making the clicking sounds; so I disconnected the power and it booted, only it can't find all the Volumes for the Volume Group configuration since one of the three hard drives is disconnected. This is a first for me - I only started using LVM this last spring, and only on this system.
8
9 So now I need to get the system backup and running, and start assessing if I need to do any data recovery. I think the two kind of go hand-in-hand at this step since I need to know the mapping to get the system up and running, and I will also need to know that to assess the situation for data recovery...
10
11 I looked at the files in /etc/lvm/backup and /etc/lvm/archive to get an idea of what volumes in the group were on that drive.
12 Question #1: Is there any where else I should look as well?
13
14 From the files there I can see I only had data 4 volumes on the drive in question - and they were all only assigned to two single logical partitions - /opt and /usr/local. I have only installed stuff via emerge; and a search through the root partition using "ls -lR | grep ^l" revealed only symlinks for a few things - netscape plugins, blackdown jdk, sun jdk, eselect linux java, and skye - being on /opt. So...
15
16 Question #2: How do I easily recover the installation so that when I replace /opt and /usr/local with a new mapping they will be replenished with whatever was installed?
17
18 (I am assuming any important settings were stored to either /etc or the user's home directory. So I am not worried about recovery on at least /opt; and I doubt I should be worried about /usr/local too.)
19
20
21 Question #3: What do I need to do to get the LVM backup so I run the system again?
22 I found an article on line [1] but am not sure if that is the wisest manner - partly due to that I have physical volume<->logical volumes spreading disks. I am also not 100% sure if the backup is accurate.
23
24 Question #4: Is there a way to get the mapping that LVM is searching for? I try running "lvm vgcfgbackup", however, it fails b/c it can't find all the physical volumes in the volume group.
25
26 Note: I think the only thing I changed in /etc/lvm.conf was the filter so it would find the hard drives appropriately. Otherwise, I believe it is the base on from the initial emerge of LVM2; however, it's been quite a while since I last touched anything with LVM.
27
28 This is a first for me. Right now, I'm more concerned with getting the system back up and running - I can worry about data recovery later.
29
30 TIA,
31
32 Ben
33
34
35 [1]http://www.linuxjournal.com/article/8874

Replies

Subject Author
Re: [gentoo-user] LVM Recovery.... Albert Hopkins <marduk@×××××××××××.org>