Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

x86 cpu_rootconf, raidframe, wedges



Hi,

I'm wanting to have alternate raidframe root partitions on my drive.
For example; raid0 on wd[01]a, raid1 on wd[01]e.  I want to be able
to tell boot(8) `dev hd[01][ae]:` and have the correct raid[01]a
device automatically chosen for root.  I also want this to work when
wd[01][ae] are accessed via dk(4).

Currently, rf_autoconfig() happens before the first cpu_rootconf()
call. This means that the 'booted_wedge' hasn't been determined yet.

When rf_buildroothack() calls cpu_rootconf() the raid(4) driver
has already exclusively-opened the underlying block device.
cpu_rootconf(), specifically match_bootwedge(), will try to correlate
the booted wedge with a device.  To do this, it needs to read the
underlying block device, it tries and fails.  Thus booted_wedge isn't
known and rf_buildroothack() can't determine what raid should be root.

I should note that I've locally improved the detection of booted raid
devices in the multiple root-eligible case.  I can get my scenario to
work in the raid-on-disklabel case, and in the raid-on-wedges case if
I call cpu_rootconf() at the beginning of rf_autoconfig().  But I have
a feeling calling cpu_rootconf() so many times is probably not right.

Comments?  Suggestions?

TBH, I can get away without the raid-on-wedges case working for now.
But, given the oncoming onslaught of >2TiB drives, this won't work
forever.

        Jonathan Kollasch


Home | Main Index | Thread Index | Old Index