darxus: (June 2012)
darxus ([personal profile] darxus) wrote2013-04-23 05:02 pm
Entry tags:

[geek] Root on software raid with Debian and Ubuntu

Didn't work with Debian, or with Ubuntu's Desktop image. I did get it to work with Ubuntu's Server image.

I guess a few years ago (August 2009?) I installed a couple machines with everything but /boot on a single software raid0. Identical machines, so I got my redundancy elsewhere, and I need the disk I/O throughput.

I just tried repeating that. With debian-live-6.0.7-amd64-gnome-desktop.iso, booting the live option and running the gui installer, it failed with: "GRUB installation failed
The 'grub-pc' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot."

With the text install, grub installed, but when I rebooted, it said /dev/md0 (the software raid) didn't exist.

So I used Ubuntu. ubuntu-12.04.2-desktop-amd64.iso said my previously created raid partitions ("physical volume for RAID") were "unknown", and wouldn't let me create that type of partition. So I tried ubuntu-12.04.2-server-amd64.iso, which finally worked.

I had 8 drives, 300gb each. On each drive, I created the first partition at the end of the drive with 299gb, as a RAID partition, and the second partition at the beginning of the drive. First drive's small partition was /boot, the rest were swap. Then I selected the option to configure software raid, created one, and added the 8 partitions. Then I created a partition on that raid designated to be mounted as root.

This seems to cover it well: https://help.ubuntu.com/12.04/serverguide/advanced-installation.html

One variable I didn't try was ext3 vs. ext4. All my failures were with ext4, and my success was with ext3. But I suspect that's unrelated.

I'm told root and /boot on lvm on software raid should work with more recent versions of grub than I was working with. Fancy.

Edit: /boot on software raid on Arch: http://travishegner.com/2012/02/boot-arch-linux-from-an-mdadm-array/


Edit: Part 2.

[identity profile] milktree.livejournal.com 2013-04-23 11:55 pm (UTC)(link)
I don't think I understand the problem. I've got a machine running software RAID for everything including /boot. I only have two partitions, /boot and an lvm partition for everything else. It's running debian.

[identity profile] darxus.livejournal.com 2013-04-24 12:10 am (UTC)(link)
My problems seemed to be mostly Debian installer bugs.

[identity profile] milktree.livejournal.com 2013-04-24 07:04 pm (UTC)(link)
Huh... I don't remember having any problems. However, I dislike the Debian installer because sometimes the options offered are not intuitive. Maybe I got lucky.