Working example of LVM + RAID?

Michał Dwużnik michal.dwuznik at gmail.com
Thu Jun 14 12:09:10 CEST 2012


On Thu, Jun 14, 2012 at 12:03 PM, Thomas Neumann
<blacky+fai at fluffbunny.de> wrote:
> For _GRUB1_ configurations my typical suggestion is:
>
> /dev/sda1: /boot (1)
> /dev/sda2: [swap1]
> /dev/sda3: MD-dev1
>
> /dev/sda1: /boot (2)
> /dev/sda2: [swap2]
> /dev/sda3: MD-dev2
>
> MD-dev1 and MD-dev2 are combined into a RAID1, this /dev/md0 is used as a
> physical volume for LVM. /root is a logical volume. System boots from (and
> mounts) one of the /boot volumes, the other one is unmounted.
>
> rationale:
> a) GRUB1 can't boot a LVM-volume, therefore a non-LV /boot (or root)
> volume is required
> b) it is unwise to put (all) swap into LVM-volumes because a deadlock can
> occur if memory gets really tight
>
> This setup is _not_ 100% automatic
> - someone has to copy the contents of the mounted /boot filesystem to the
> backup filesystem
> - the MBR must be copied to the backup disc
> - one of the discs may fail and cause loss of the swap space's content
>

This _can_ be made a bit more automatic ->

I use both(in yours)/four(in mine) /boot partitions configured to be
RAID1 on top level (booted OS), but GRUB only looks for, say, sda1

MBR still manual (but done once), but every update gets copied
to mounted /dev/mdX, hence to every /boot
(RAID1 members can be mounted RO completely safely as a single device
for booting)

Regards
Michal


More information about the linux-fai mailing list