Using fully mirrored system disks on Linux

March 24, 2009

I'm on record as building systems that use mirrored system disks with plain /boot and swap partitions (that is, non mirrored, just duplicated), mostly through ancient caution.

You know what? I was wrong. Totally wrong. I've now built a system with a fully mirrored system disk and not only does it work, it works better than my old way. I will henceforth now mirror /boot and swap, in addition to all of the regular filesystems, on all future systems that I build with mirrored system disks.

With /boot, mirroring keeps things in sync automatically, and it means that the system will come up without manual intervention when there's only one disk. With a /boot and a /boot2, not only do you have to keep them in sync by hand (in practice we don't), but if a disk fails the system will pause in boot because one of your filesystems isn't there and you have to fix it by hand.

With swap, you probably don't need that much swap, it works, and while init scripts seem to be much more tolerant of missing swap areas than missing filesystems I don't see any reason to take chances if I don't have to. And 'mirror everything' is a very simple rule to keep straight.

(I don't have any idea of the performance tradeoffs of mirrored swap versus non-mirrored swap, but my view these days is that if you are worried about the performance characteristics of your swap space, something horrible has gone wrong to start with.)


Comments on this page:

From 24.99.225.240 at 2009-03-26 16:26:08:

Why create a separate /boot at all?

By cks at 2009-03-26 16:44:03:

My impression (possibly outdated) is that GRUB still doesn't really play well with things like LVM. Apart from that, the honest answer is 'habit'.

By cks at 2009-03-27 02:00:21:

Also, in general there's SeparateBootAdvantage.

From 209.71.241.13 at 2009-03-30 12:26:16:

Well, another reason for the separate /boot is for people that have different distributions/versions (etch/lenny) on the same machine. Handled with care, this gives you more freedom with respect to what happens in the various root partitions. Always handy in case of upgrade/curiosity/etc.

From 207.96.159.2 at 2009-04-02 08:41:09:

I run SuSE Linux Enterprise on numerous servers, using software mirrors for every partition. Here is a tip if you are running grub, make sure you install the bootloader on to both disks (SLES doesn't do this). This way you don't end up with two mirror disks but only one that's truly bootable.

Written on 24 March 2009.
« How not to improve your CD player application
The git version control system as a creation of the modern age »

Page tools: View Source, View Normal, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Tue Mar 24 23:48:40 2009
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.