Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have inherited a machine which has 2 physical disks and uses Linux SW RAID(1). Both disks are partitioned and are are all individual arrays (/dev/md0, /dev/md6, etc.). Those arrays are then mounted (/boot, /home, etc. even /tmp).

As RAID is designed to mitigate physical failures, is there any reason why one would use this technique over whole-disk arrays that are then partitioned (perhaps using LVM)? This seems prone to more potential issues, but may have some special properties that I haven't been able to glean.

I'm planning on moving this setup to: disks→SWRAID(1)→LVM as I'll be making multiple VMs out of the one machine, but wanted to make sure I knew what I was doing when I got rid of the old setup.

share|improve this question
up vote 4 down vote accepted

Unless I have some requirements involving putting different data on different spindles (which you can't really do anyway with two drives in RAID-1), I prefer to use a large partition to allow the most flexibility with LVM. It is certainly much easier to resize logical volumes than it is software raid volumes.

Just remember to install grub on both drives.

share|improve this answer
Nice point about grub on both drives, thanks. As much as I want to have my dom0 and VM disks be different, my 1U can't fit any more drives. – Steve Pomeroy Mar 13 '11 at 19:17

Setting up separate raid devices for each filesystem is needlessly complex. Your idea of one big raid device with lvm on top of that is definitely the way to go.

share|improve this answer
Thanks, I'll definitely be going this way now. – Steve Pomeroy Mar 14 '11 at 17:48

I configure each disk to have one partition, put a RAID in these partition, LVM on top.

You can put /boot and swap in LVM as well, in fact i don't even use a separate /boot, but have it in the / partition.

Make sure to leave like 2MB free before and after your RAID-partition though. Otherwise grub2 could complain, due to some combination of factors and bugs.

share|improve this answer

You'll need a separate, non-LVM partition for /boot and swap, which I usually make md0 and md1; then it's off to the races with a single partition that consumes the rest of the disk as md2, on which you create an LVM PV and proceed as normal adding filesystems as LVs.

share|improve this answer
Why would you put swap on RAID? – Steve Pomeroy Mar 13 '11 at 22:31
Why do you think swap would not work on LVM? The default LVM option of Debian/Ubuntu puts swap on LVM and it seems to work just fine. – Zoredache Mar 14 '11 at 1:06
I think we do it more for drive symmetry than any other reason, but there's no particular reason not to. – Jeff Albert Mar 14 '11 at 1:40
That makes sense. I suppose if you're actually swapping and got a disk error, it'd be nice to know that your system may be able to recover. – Steve Pomeroy Mar 14 '11 at 12:58
RAID is used for availability not backup usually (or so we preach and sometimes even practice ;). An OS losing a swap hard might decide to become unavailable when trying to page something important back in. Swap failure is almost as bad as memory failure. – rackandboneman May 17 '12 at 14:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.