Gentoo Archives: gentoo-user

From: Florian Philipp <lists@×××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] rescuing lvm data
Date: Wed, 24 Oct 2012 20:25:18
Message-Id: 50884E43.8040609@binarywings.net
In Reply to: [gentoo-user] rescuing lvm data by "Stefan G. Weichinger"
1 Am 24.10.2012 22:08, schrieb Stefan G. Weichinger:
2 >
3 > greetings ...
4 >
5 > the server in my basement is driving me nuts ... and I start making
6 > mistakes ... sigh
7 >
8 > It had a LVM volume group ... consisting of two PVs ...
9 >
10 > The question in short:
11 >
12 > if I only have one PV at hand, which contains all the PEs of a given LV
13 > ... (how) am I able to extract/export/read the contents of that LV?
14
15 So you still have the volume group metadata, just not one of the PVs, right?
16
17 >
18 > background:
19 >
20 > when I searched for the reason of those crashes, I removed and swapped
21 > and cloned hard disks all around.
22 >
23 > Right now I am on a brand new machine and want to sort out harddisks etc.
24 >
25 > One PV wasn't detected correctly ("unknown device") even though it had
26 > the correct uuid. I did some "pvcreate -u" on it ... and now those LVs
27 > on it aren't accessible anymore (can't mount or even fsck).
28 >
29 > My luck (I hope!): I have a clone of that harddrive.
30 >
31 > But I don't want to simply plug it in because I fear to ruin things as I
32 > already messed up that VG further by trying stuff like vgcfgrestore etc.
33 >
34 > Yes, my fault.
35 >
36 > The clone contains all the blocks for an LV I would like to keep
37 > somehow. So I assume it should be possible to access them?
38 >
39
40 First things first: If you can, make a disk dump of every affected HDD
41 or at least back up the metadata with vgcfgbackup.
42
43 Have you tried activating the volume group with --partial (see `man
44 lvm`). Something along the lines of `lvchange --partial -a y`).
45
46 If that doesn't help, maybe `vgreduce --removemissing --force` will do
47 the job.
48
49 Hope this helps,
50 Florian Philipp

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] rescuing lvm data "Stefan G. Weichinger" <lists@×××××.at>