[Gllug] To partition or not to partition

Nix nix at esperi.org.uk
Wed Oct 13 07:16:55 UTC 2010


On 13 Oct 2010, Bruce Richardson told this:

> On Wed, Oct 13, 2010 at 12:44:18AM +0100, Nix wrote:
>> 
>> >               I don't mind sacrificing a few gig to the first partition
>> > for one less layer of VFS on the most crucial partition.
>> 
>> Pretty irrelevant, really, as LVM only interposes *anything* in the
>> block I/O path, and that only happens if you're hitting the disk, which
>> is much slower than a tiny bit of extra computation could ever be. The
>> stuff which is heavily used (e.g /lib and /bin) is in the page cache all
>> the time anyway, and page cache accesses don't go through LVM at all
>> (well, reads don't: writes obviously do when they get flushed, because
>> that hits the block I/O path again).
>
> It's not performance I'm concerned with but robustness.  I'm happier
> with fewer things to have to get working before getting to / and using

Ah, yes, I use that on some systems where getting an initramfs linked to
the kernel image is too hard. (I hate separated initramfses and initrds:
their contents tend to skew in lethal ways until you can't boot anymore,
especially if they contain kernel modules.)

> LVM for everything imporant means the fixed size of the / partition
> really doesn't matter.  Can even spin /tmp off if need be.

In general, if you allow anyone other than root to write to the /
filesystem, you may be risking a DoS attack from attackers or buggy
programs dumping huge files in (in this case) /tmp. Of course, if /tmp
is not a tmpfs you are taking a huge performance hit (and yes, it is
huge) for no gain whatsoever...

>                                                             Have been
> bitten on a couple of occasions by the wrong combination of layers on /

I've been bitten on a couple of occasions by people running / out of
space, /var was on / as well, and oops now nobody can log in.

>> somewhere the distro installer won't smash; swap because, well, there's
>> not such a good reason for that because configuring more swap is easy
>> and it doesn't matter (within reason) how many swap partitions you've
>> got.
>
> But without LVM, how do you achieve the luxury of having as many swap
> partitions as you want, whenever you want them?

You don't need that. Swap files are exactly as fast (unless you are
severely fragmented) and more convenient for ad-hoc addition.

> I used to work with a blithely unthinking clown who would set up LVM on
> every server he configured - and then allocate *all* the space on the
> VG, right from the start.  Point <-----  ----->>>> Him.

Well, I actually do something like that on most of the systems I go near
(one VG per cluster of disks that can fail as a unit is my general rule,
so I'll never get one failing because some of its PVs have died while
others work, then LVM across them).
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list