Subject: Re: /boot on RAID1: "Can't open /boot"
To: Greg Oster <oster@cs.usask.ca>
From: Mike Frandsen <michael.frandsen@sri.com>
List: netbsd-help
Date: 08/25/2007 09:34:34
Greg Oster wrote:
> Mike Frandsen writes:
>
>> I've tried to follow the instructions in "Chapter 15. NetBSD RAIDframe"
>> for booting NetBSD from RAID1.
>>
>> My configuration is NetBSD 3.1 over 4 250 GB SATA drives configured with:
>> RAID1 root partition (mirroring across all 4 disks)
>> RAID5 large partition (spanning all 4 disks)
>>
>> The error I'm getting when trying to boot the system is:
>> Boot failed (errno 2): Can't open /boot
>>
>> I thought the main tricks were:
>> * make sure there's a partition visible with fdisk and marked active
>> * make sure / is only RAID1 (since RAID5 not supported for root
>> filesystem at boot time)
>> * make sure / starts at the beginning of the RAID partition
>> * make sure RAID is configured to set "root" and "autoconfig" (-A root)
>> * run installboot for all bootable disks
>> * based on the error message, I've double-checked the "/boot" file and
>> ensured it is the same as in /usr/mdec
>>
>> I can boot off a CD and mount the RAID partitions so I know RAID is
>> working and the filesystems are ok.
>>
>> Is there something I'm missing or anything else I should try? Are there
>> any peculiarities with RAID1 mirroring across all 4 disks instead of just 2?
>>
>
> Yes. A RAID 1 set across 4 disks isn't a 4-way mirror (like it
> should be). It's a interleaved mirror, which means that some of
> /boot may be one one disk, and the rest on another disk (or it might
> be all on one or the other). Once /boot gets split up (or is all on
> the disk that you didn't boot from), the initial boot code doesn't
> have a clue where to find all of it..
>
> Stick with 2 disks and you should be fine...
>
> Later...
>
> Greg Oster
>
>
>
Thanks (to all) for the various insights. To verify the above, I
searched for "interleaved" but didn't find any more information. Are
there any good pointers to more information on what's happening here and
why mirroring wouldn't happen across all 4 disks?
In any case, it looks like this is probably the problem. The "raidctl"
man page (although I wouldn't have expected this) says:
"Note as well that RAID 1 sets are currently limited to only 2
components. At present, n-way mirroring is not possible."
I'll try with RAID1 across only 2 disks (and maybe 2 spares?) in the
next couple days and report if this fixes the problem.
Thanks,
Mike