1 |
On Sunday 07 October 2007, Philip Webb wrote: |
2 |
> Does anyone have advice based on experience using LVM ? |
3 |
|
4 |
The majority of folks around here will have used LVM :-) |
5 |
|
6 |
> I sb partitioning a new 320 GB hard drive soon for a simple desktop |
7 |
> box. That is 8 times the size of the HDD in my present machine, |
8 |
> which I haven't exhausted by any means. LVM seems more professional |
9 |
> & allows flexibility for unforeseen storage needs, |
10 |
|
11 |
this is it's main benefit on desktop class machines - the ability to |
12 |
resize volumes when you realize that you guessed wrong. There are |
13 |
others too :-) |
14 |
|
15 |
> but it adds a layer of complexity & potential problems arising |
16 |
> therefrom. |
17 |
|
18 |
A total non-issue in my experience. I've never had an LVM problem yet, |
19 |
but maybe I'm just lucky. The one thing you do need to be aware of it |
20 |
that you require LVM support at boot time or shortly thereafter. So |
21 |
either compile it into the kernel, or make sure it's in the initrd. |
22 |
|
23 |
For a gentoo system using roll-your-own kernels, the consensus seems to |
24 |
be a regular / volume of 500M-1G is plenty and everything else is on |
25 |
LVM. That way you avoid the issues of not having the required support |
26 |
to be able to mount /. We don't build distro kernels that must boot on |
27 |
everything out there, we have the luxury of customizing everything |
28 |
|
29 |
> I wonder whether LVM slows down disk access |
30 |
|
31 |
No. See my other mail. |
32 |
|
33 |
> & whether there's a disaster lurking unseen if anything goes wrong |
34 |
> with LVM: a bad package update, a damaged config file or file storing |
35 |
> LVM's layout would seem to risk losing everything on the HDD & |
36 |
> require re-installation. |
37 |
|
38 |
Not true. You *already* have many layers of software between user space |
39 |
and disk, any one of which can go wrong at any time. LVM metadata is |
40 |
stored in text files and it maintains many historical copies of |
41 |
previous configs and it's easy to fix if it ever goes wrong. I've never |
42 |
seen a *real* LVM error, but I have matched myself do some really dumb |
43 |
things and I could fix them every time. |
44 |
|
45 |
Seriously, the problem LVM solves has been known about for decades and |
46 |
the method used was worked out about the same time. It's a mature |
47 |
technology that is *very* well understood, completely the opposite of |
48 |
drivers to support some latest new-fangled chipset. I would be much |
49 |
more worried about that code trashing your disk than LVM. Just to put |
50 |
it all into perspective... |
51 |
|
52 |
Extra benefits of LVM: You won't need this right now for your simple |
53 |
desktop with one drive, but it's good to know what else LVM can do: |
54 |
|
55 |
Snapshots. You can "freeze" the state of a filesystem at any time and |
56 |
LVM will track the changes since then until you release the snapshot. |
57 |
This is a lifesaver if your job is to perform backups of 4TB databases |
58 |
that can never be taken down for backups. |
59 |
|
60 |
Huge volumes: LVM is the only way on Linux to be able to get local |
61 |
volumes bigger than any single disk. Again, on servers, 2TB+ databases |
62 |
are becoming commonplace. |
63 |
|
64 |
If you need any more convincing, IBM mainframes and HP machines running |
65 |
HP-UX have required you to use LVM for years now - you can't get to the |
66 |
disks without using LVM. If it was risky, do you think those hardware |
67 |
vendors would have gone down that route? |
68 |
|
69 |
alan |
70 |
|
71 |
|
72 |
|
73 |
|
74 |
-- |
75 |
Optimists say the glass is half full, |
76 |
Pessimists say the glass is half empty, |
77 |
Developers say wtf is the glass twice as big as it needs to be? |
78 |
|
79 |
Alan McKinnon |
80 |
alan at linuxholdings dot co dot za |
81 |
+27 82, double three seven, one nine three five |
82 |
-- |
83 |
gentoo-user@g.o mailing list |