Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] LVM for data drives but not the OS
Date: Thu, 07 Apr 2011 17:51:26
Message-Id: 319ad2ea44eec3e9f8794ef5c49ae633.squirrel@www.antarean.org
In Reply to: Re: [gentoo-user] LVM for data drives but not the OS by BRM
1 On Thu, April 7, 2011 7:31 pm, BRM wrote:
2 > ----- Original Message ----
3 >
4 >> From: Joost Roeleveld <joost@××××××××.org>
5 >> On Thursday 07 April 2011 06:52:26 BRM wrote:
6 >> > ----- Original Message ----
7 >> >
8 >> > > From: Joost Roeleveld <joost@××××××××.org>
9 >> > >
10 >> > > On Thursday 07 April 2011 06:20:55 BRM wrote:
11 >> > > > ----- Original Message ----
12 >> > > >
13 >> > > > > From: Neil Bothwick <neil@××××××××××.uk>
14 >> > > > >
15 >> > > > > On Thu, 07 Apr 2011 05:22:41 -0500, Dale wrote:
16 >> > > > > > I want to do it this way because I don't trust LVM enough
17 >> > > > > > to put my
18 >> > > > > >
19 >> > > > > > OS
20 >> > > > > > on. Just my personal opinion on LVM.
21 >> > > > >
22 >> > > > > This doesn't make sense. Your OS can be reinstalled in an
23 >> hour
24 >> > > > > or two, your photos etc. are irreplaceable.
25 >> > > >
26 >> > > > Makes perfect sense to me as well.
27 >> > > >
28 >> > > > Having installed LVM - and then removed it due to issues; namely,
29 >> > > > the fact that one of the hard drives died taking out the whole
30 >> LVM
31 >> > > > group, leaving the OS unbootable, and not easily fixable. There
32 >> > > > was a thread on that (started by me) a while back (over a
33 >> year).
34 >> > > >
35 >> > > > So, perhaps if I had a RAID to underly so I could mirror drives
36 >> > > > under LVM
37 >> > > >
38 >> > > > for recovery I'd move to it again. But otherwise it is just a
39 >> PITA
40 >> > > > waiting
41 >> > > >
42 >> > > > to happen.
43 >> > > >
44 >> > > > Ben
45 >> > >
46 >> > > Unfortunately, any method that spreads a filesystem over multiple
47 >> disks
48 >> > > can be
49 >> > >
50 >> > > affected if one of those disks dies unless there is some mechanism
51 >> in
52 >> > > place that can handle the loss of a disk.
53 >> > > For that, RAID (with the exception of striping, eg. RAID-0)
54 >> provides
55 >> > > that.
56 >> > >
57 >> > > Just out of curiousity, as I never had the need to look into this,
58 >> I
59 >> > > think that, in theory, it should be possible to recover data from
60 >> LVs
61 >> > > that were not
62 >> > >
63 >> > > using the failed drive. Is this assumption correct or wrong?
64 >> >
65 >> > If you have the LV configuration information, then yes. Since I
66 >> managed to
67 >> > find the configuration information, I was able to remove the affected
68 >> PVs
69 >> > from the VG, and get it back up.
70 >> > I might still have it running, but I'll back it out on the next
71 >> rebuild -
72 > or
73 >> > if I have a drive large enough to do so with in the future. I was
74 >> wanting
75 >> > to use LVM as a bit of a software RAID, but never quite got
76 >> > that far in the configuration before it failed. It does do a good job
77 >> at
78 >> > what it's designed for, but I would not trust the OS to it either
79 >> since the
80 >> > LVM configuration is very important to keep around.
81 >> >
82 >> > If not, good luck as far as I can tell.
83 >> >
84 >> > Ben
85 >>
86 >> LVM isn't actually RAID. Not in the sense that one gets redundancy. If
87 >> you
88 >> consider it to be a flexible partitioning method, that can span
89 >> multiple
90 >>disks,
91 >>
92 >> then yes.
93 >> But when spanning multiple disks, it will simply act like JBOD or
94 >> RAID0.
95 >> Neither protects someone from a single disk failure.
96 >>
97 >> On critical systems, I tend to use:
98 >> DISK <-> RAID <-> LVM <-> Filesystem
99 >>
100 >> The disks are as reliable as Google says they are. They fail or they
101 >> don't.
102 >> RAID protects against single disk-failure
103 >> LVM makes the partitioning flexible
104 >> Filesystems are picked depending on what I use the partition for
105 >>
106 >
107 > The attraction to LVM for me was that from what I could tell it supported
108 > and
109 > implemented a software-RAID
110 > so that I could help protect from disk-failure. I never got around to
111 > configuring that side of it, but that was my goal.
112 > Or are you saying I was misunderstanding and LVM _does not_ contain
113 > software-RAID support?
114
115 Unless I am mistaken, LVM does not provide redundancy. It provides
116 disk-spanning (JBOD) and basic striping (RAID-0).
117
118 For redundancy, I would use a proper RAID (either hardware or software).
119 On top of this, you can then decide to have a single filesystem, LVM or
120 even partition this.
121
122 I think the confusion might have come from the fact that both LVM and
123 Linux Software Raid use the "Device Mapper" interface in the kernel config
124 and they are in the same part.
125
126 Also, part of the problem is that striping is also called RAID-0. That, to
127 people who don't fully understand it yet, makes it sound like it is a
128 RAID.
129 It actually isn't as it doesn't provide any redundancy.
130
131 I do hope you didn't loose too much important data when you had this issue.
132
133 --
134 Joost

Replies

Subject Author
Re: [gentoo-user] LVM for data drives but not the OS BRM <bm_witness@×××××.com>