From: Bill Davidsen <davidsen@tmr.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Andre Majorel <aym-xunil@teaser.fr>, linux-raid@vger.kernel.org
Subject: Re: RAID1 root and swap and initrd
Date: Tue, 19 Dec 2006 16:30:46 -0500 [thread overview]
Message-ID: <45885A06.6070100@tmr.com> (raw)
In-Reply-To: <45846A43.8070207@tls.msk.ru>
Michael Tokarev wrote:
> Andre Majorel wrote:
> []
>
>> Thanks Jurriaan and Gordon. I think I may still be f*cked,
>> however. The Lilo doc says you can't use raid-extra-boot=mbr-only
>> if boot= does not point to a raid device. Which it doesn't because
>> in my setup, boot=/dev/sda.
>>
>> Using boot=/dev/md5 would solve the raid-extra-boot issue but the
>> components of /dev/md5 are not primary partitions (/dev/sda5,
>> /dev/sdb5) so I don't think that would work.
>>
>
> So just move it to sda1 (or sda2, sda3) from sda5, ensure you've
> two identical drives (or at least your boot partitions are layed
> up identically), and use boot=/dev/md1 (or md2, md3). Do NOT
> use raid-extra-boot (set it to "none"), but set up standard mbr
> code into boot sector of both drives (in debian, it's 'mbr' package;
> lilo can be used for that too - once for each drive), and mark your
> boot partition on both drives as active.
>
> This is the most clean setup to boot off raid. You'll have two
> drives, both will be bootable, and both will be updated when
> you'll run lilo.
>
> Another bonus - if you'll ever install a foreign OS on this system,
> which tends to update boot code, all your stuff will still be intact -
> the only thing you'll need to do to restore linux boot is to reset
> 'active' flags for your partitions (and no, winnt disk manager does
> not allow you to do so - no ability to set non-dos (non-windows)
> partition active).
>
>
>> I *could* run lilo once for each disk after tweaking boot= in
>> lilo.conf, or just supply a different -M option but I'm not sure.
>> The Lilo doc is not terribly enlightening. Not for me, anyway. :-)
>>
>
> No, don't do that. Even if you can automate it. It's error-prone
> to say the best, and it will bite you at an unexpected moment.
The desirable solution is to use the DOS MBR (boot active partition) and
put the boot stuff in the RAID device. However, you can just write the
MBR to the hda and then to hdb. Note that you don't play with the
partition names, the 2nd MBR will only be used if the 1st drive fails,
and therefore at the BIOS level the 2nd drive will now be hda (or C:) if
LILO stiff uses the BIOS to load the next sector.
I tried that the hard way once, and didn't even know there was a failure
until I got mail from the md monitor I was using, saying that md0 was
degraded. From a sample size of one actual test, it works.
Now the bad news: most BIOS setups will fail over if the 1st drive dies.
If the first drive returns a bad sector error it will not fail over, it
will give you some flavor of "I tried my best" message and not boot.
Sample size of three machines on that problem.
--
bill davidsen <davidsen@tmr.com>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979
next prev parent reply other threads:[~2006-12-19 21:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-15 17:56 RAID1 root and swap and initrd Andre Majorel
2006-12-15 18:30 ` thunder7
2006-12-15 19:14 ` Gordon Henderson
2006-12-16 21:05 ` Andre Majorel
2006-12-16 21:50 ` Michael Tokarev
2006-12-16 23:01 ` Andre Majorel
2006-12-17 0:03 ` Michael Tokarev
2006-12-19 21:30 ` Bill Davidsen [this message]
2006-12-21 14:45 ` Michael Tokarev
2006-12-21 18:47 ` Bill Davidsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45885A06.6070100@tmr.com \
--to=davidsen@tmr.com \
--cc=aym-xunil@teaser.fr \
--cc=linux-raid@vger.kernel.org \
--cc=mjt@tls.msk.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).