Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm planning on picking up 2 SSD cards for my file server and installing Ubuntu on them using softRAID-1. I will not be keeping a hot spare, so I want to make sure that, if one drive fails, I can still boot the system using the remaining working drive until my replacement drive arrives.

Is that possible? Are there setup considerations I need to take into account?

share|improve this question

1 Answer 1

When using soft-RAID, you need to "load THE software" to control the RAID, before booting form the RAID disk. THE soft can be one of either grub2 or linux kernel.

  1. GRUB: Grub2 is still a bit limited and you cannot stack multiple software layers, like RAID + CRYPT + LVM. Two layers like that are possible, AFAIR, one layer is definitely supported. On the contrast, it will boot without touching in case you have a degraded RAID (some drives failed).

  2. Linux kernel: since I'm using all 3 mentioned layers in my environment, I'm used to have additional HDD/SSD/SDCard, which has just a single partition and is mounted as /boot in the system. Therefore it includes Grub modules + linux kernel + initial ramdisk image. System half-boots from that place and loads the RAID + LVM + CRYPT kernel modules from the ramdisk. After that it can mount rootfs, where the rest of the system resides from the crypted LVM RAID disk and finish the boot process. This will boot also without touching in case you have a degraded RAID, only the /boot disk has to survive. If it fails too, it won't be a problem to recreate it.

    You can also get rid of this additional drive by creating a small (500 MB is enough) boot partition on one (or all, because the space won't be used anyway) drives. In the rest of the drive there will be the soft RAID partition with ID=fd (Linux raid autodetect).

share|improve this answer

Your Answer

 
discard

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.