RAID0 and Fedora 16 / f16

Mark W. Jeanmougin markjx at gmail.com
Fri Nov 18 18:39:36 UTC 2011


Hey guys,

Long time user, first time caller. I've been using Fedora since it was
RH4. Many box sets later, I find myself with an issue I can't solve.
Even Google isn't helping me out much.

In previous (pre-F14) versions, I partition (msdos, not GPT) my
systems something like this:

# fdisk -l /dev/sda
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9e218bdf

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      530144      265041   fd  Linux raid autodetect
/dev/sda2          530145    84437639    41953747+  fd  Linux raid autodetect
/dev/sda4        84437640  3907024064  1911293212+   5  Extended
/dev/sda5        84437703  3907024064  1911293181   fd  Linux raid autodetect

sdb is setup identically. The idea is that sd[ab]1 is a RAID1
containing /boot. sd[ab]2 is another RAID1 containing an LVM VG which
contains the rest of the OS. Most of the time, the rest of the space
on the system is a final RAID1 for data. Sometimes, I'll have a RAID0
if performance is more important than uptime.

Here's the mdadm config:

# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]

md2 : active raid1 sda5[0] sdb5[1]
      1911292021 blocks super 1.2 [2/2] [UU]

md1 : active raid1 sda2[0] sdb2[1]
      41952651 blocks super 1.2 [2/2] [UU]

md0 : active raid1 sda1[0] sdb1[1]
      264960 blocks [2/2] [UU]

unused devices: <none>

Then, here's what the (non-data) filesystems look like:

[root at blu images]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_blu0-lv_root
                      786M  635M  112M  86% /
tmpfs                 5.9G  2.2M  5.9G   1% /dev/shm
/dev/mapper/vg_blu0-lv_tmp
                      1.5G   40M  1.5G   3% /tmp
/dev/mapper/vg_blu0-lv_var
                      1.5G  765M  638M  55% /var
/dev/mapper/vg_blu0-lv_usr
                       14G   11G  3.0G  78% /usr
/dev/md0              251M  144M   82M  64% /boot
/dev/mapper/vg_blu0-lv_home
                      5.0G  4.1G  656M  87% /home

So, under Fedora 16, I'm trying to duplicate this. I saw in the docs
that /usr shouldn't be split from /. OK. So, increase the size of
lv_root, and get rid of lv_usr. No big deal.

For my install, I setup (GPT, by default) partition tables with a
simplified version of above:

/dev/mapper/vg00-lv_root 2.0G on /
/dev/md0 on /boot

That's it.

sda1 is a 1049kB partition for "bios_grub". md0 is a raid1 of sda3
sdb2. md1 is sdb1 & sda2. Then, md1 holds the vg00. This is about as
simple as I can make it.

During the install, I select: Install boot loader on /dev/sda. Minimal
Install. Then I get a Warning "There was an error installing the
bootloader. The system may not be bootable". Looking at the other
virtual consoles shows me:

Alt-F3:
INFO storage: bootloader stage1 target device is sda
INFO storage: bootloader stage2 target device is md0
[Ed: Which is odd since I chose sda for the installation target in the
earlier step]

Alt-F5:
/sbin/grub2-setup: warn: This GPT partition label has no BIOS Boot
Partition; embedding won't be possible!.
/sbin/grub2-setup: error: embedding is not possible, but this is
required when the root device is on a RAID array or LVM volume.
Generating grub.cfg ...
Found linux image: /boot/vmlinux-3.1.0-7.fc16_x86_64
Found initrd image: /boot/initramfs-3.1.0-7.fc16_x86_64
done
Installation finished. No error reported.
/sbin/grub2-setup: warn: This GPT partition label has no BIOS Boot
Partition; embedding won't be possible!.
/sbin/grub2-setup: error: embedding is not possible, but this is
required when the root device is on a RAID array or LVM volume.

I know to let the RAID's finish building before I reboot, so that's not it.

After the reboot I get:
GRUB  loading.
Welcome to GRUB!

error: no such device: 71ec265a-f934-40a6-b02d-3ff3a274d229.
Entering rescue mode...
grub rescue>

ls just shows "(hd0)". It doesn't show any partitions.

set shows:
prefix=(hd0)/grub2
root=hd0

"insmod normal" says "error: unknown filesystem."

I've tried "set prefix=(hd0,0)/grub2", then "insmod normal". That
gives "error: no such partition". I've tried passing 0, 1, and 2 as
values for the partition. They all give the same value.

I'm really not sure where to go from here. I can't believe I'm the
first person to do mdadm RAID1 under F16.

If I do a "default" partitioning installation, then everything works
fine, but I don't get RAID1. Or, any RAID at all. Just an LV spanning
my drives.

Finally, this behavior is consistent on physical hardware and in a VM under KVM.

How do I install onto RAID 1?

Thanks in advance,

MJ


More information about the users mailing list