[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Advice on raid/lvm



On Thu, Apr 09, 2009 at 09:32:47AM -0400, Douglas A. Tutty (dtutty@vianet.ca) wrote:

> > Yes, leaving / out of LVM does give you a more complete
> > environment to work with when system crashes in a way that LVM
> > (the volume group containing /) is inaccessible.
> > It doesn't help much though unless you also leave /usr out,

> What is in /usr that you'd need (ok, other than man pages)?

Besides man pages (which are useful if you don't have access
to the Internet), there's some useful stuff in /usr/bin and
/usr/sbin, like grub, mkinitramfs, ssh, find ...
Nothing essential, but as I said, everything essential is
on the initramdisk anyway.

> You don't have whatever notes you've left yourself in /root

You could keep your notes in /boot.

> > On the other hand, having / in LVM means:
> > * you can enlarge / when necessary;
> 
> You should never have to enlarge a 500 MB /

Probably not, if you have separate /usr, /var, /tmp and /home,
as you generally should.
But it "never" is a long time. I've had to increase / at
least twice when it was too small for OS upgrade
(last in a system where it was just 50MB - which had been
plenty when the box was first installed, but not anymore).

> > * you can encrypt / if desired;
> 
> Why would you need / encrypted (if swap, /tmp, /home, and parts of /var
> are encrypted)?

To protect the notes you left in /root, of course. :-)

Seriously, there is a lot of potentially sensitive information
in there, like /etc/passwd, /etc/shadow, ssh keys, root's
shell history, &c.

> > * you can use other RAID configurations besides RAID1 with /;
> 
> True, but for 500 MB is that helpful?  If you have more than 2 disks,
> just put a 500 MB partition on each and have more than 2 components to
> the raid1 array.

Last I tried, booting off 3+ -way raid1 wasn't supported
and didn't work (it's been a while though). So, you might want
to use raid6 for reliability (or raid10 for speed,
not that I can think why speed could matter in /).

Of course, this point is moot if you have both /boot and /
as separate, non-lvm partitions.
Come to think of it, that'd allow encrypting / as well,
although I can't see why that kind of non-standard setup
would be better than having / in lvm.

> > * it's the standard configuration, offered as automatic default
> >   installation option, and many people are using it so finding
> >   someone to help when needed shouldn't be hard.
> 
> I've never used the automatic default; It always wastes resources on my
> boxes.

To tell the truth, neither have I, but the point was that
it is a well-known, well-supported setup.

> Figure out what all documentation, man pages (in text format), notes,
> etc that you would want

Figuring that out in advance may not be that easy.

> and put them in /root/doc.  Any scripts that you
> find helpful for rebuilding arrays you could put in /root/bin.

You could just as well use /boot/doc and /boot/bin.

But, yeah: the issue is debatable, there's no really overwhelming
reason to go either way in every case.
There are situations where the advantages of lvm are not important
and its complexity may be a reason to avoid it. I think they're rare,
but my view may be biased by the fact I've used lvm for so long that
I no longer remember it ever being difficult. :-)

-- 
Tapani Tarvainen


Reply to: