2014-02-28

Moving from Lilo to GRUB, using LVM as default, etc throughout the last years it was time to evaluate how well LVM works without a separate boot partition, possibly also on top of Software RAID. Big disks are asking for partitioning with GPT, just UEFI isn’t my default yet, so I’m still defaulting to Legacy BIOS for Debian/wheezy (I expect this to change for Debian/jessie and according hardware approaching at my customers).

So what we have and want in this demonstration setup:

Debian 7 AKA wheezy

4 hard-disks with Software RAID (on 8GB RAM), using GPT partitioning + GRUB2

using state-of-the-art features without too much workarounds like separate /boot partition outside of LVM or mdadm with 0.9 metadata, just no (U)EFI yet

LVM on top of SW-RAID (RAID5) for /boot partition [SW-RAID->LVM]

Cryptsetup-LUKS on top of LVM on top of SW-RAID (RAID5) for data [SW-RAID->LVM->Crypto] (this gives us more flexibility about crypto yes/no and different cryptsetup options for the LVs compared to using it below RAID/LVM)

Rescue-system intregration via grml-rescueboot (not limited to Grml, but Grml should work out-of-the-box)

System used for installation:

Partition setup:

Clone partition layout from sda to all the other disks:

Make sure each disk has its unique UUID:

SW-RAID setup:

SW-RAID speedup (system dependent, YMMV):

LVM setup:

Check partition setup + alignment:

Cryptsetup:

Filesystems:

Install Debian/wheezy:

Enable grml-rescueboot (to have easy access to rescue ISO via GRUB):

[NOTE: We're installing a daily ISO for grml-rescueboot here because the 2013.09 Grml release doesn't work for this LVM/SW-RAID setup while newer ISOs are working fine already. The upcoming Grml stable release is supposed to work just fine, so you will be able to choose http://download.grml.org/grml64-full_2014.XX.iso by then. :)]

Install GRUB on all disks and adjust crypttab, fstab + initramfs:

Clean unmounted/removal for reboot:

NOTE: On a previous hardware installation I had to install GRUB 2.00-22 from Debian/unstable to get GRUB working.

Some metadata from different mdadm and LVM experiments seems to have been left and confused GRUB 1.99-27+deb7u2 from Debian/wheezy (I wasn’t able to reproduce this issue in my VM demo/test setup).

Just in cause you might experience the following error message, try GRUB >=2.00-22:

Show more