From: NeilBrown <neilb@suse.de>
To: Joe Landman <joe.landman@gmail.com>
Cc: "Iordan Iordanov" <iordan@cdf.toronto.edu>,
"Mathias Burén" <mathias.buren@gmail.com>, b2 <b2@playtime.bg>,
linux-raid@vger.kernel.org
Subject: Re: debian software raid1
Date: Wed, 20 Apr 2011 11:12:39 +1000 [thread overview]
Message-ID: <20110420111239.734ae4c1@notabene.brown> (raw)
In-Reply-To: <4DAE29EA.4040306@gmail.com>
On Tue, 19 Apr 2011 20:33:46 -0400 Joe Landman <joe.landman@gmail.com> wrote:
> On 04/19/2011 06:51 PM, NeilBrown wrote:
> > On Tue, 19 Apr 2011 12:03:27 -0400 Iordan Iordanov<iordan@cdf.toronto.edu>
>
> [...]
>
> > If there was such a deadlock, it would be a serious bug. I don't believe
> > such a bug exists (but hey - I keep finding bugs in this code, when I'm not
> > busy writing new bugs, so I guess it could crash you machine and kill your
> > cat).
>
> I ran into this a few years ago (early 2.6 series, maybe 2.6.15 or so).
> Some sort of race condition. Required a reset to get the machines
> attention.
I wonder what this might have been...
Resume from suspend when swap in on md/raid can be a bit tricky and may not
have been well tested at that time. You need to be able to assemble the
RAID1 for read without writing anything. That can be done now by setting the
'start_ro' module parameter (echo 1
> /sys/modules/md_mod/parameters/start_ro).
I haven't actually tested it myself though so I cannot speak from experience.
> Haven't tried since. Since we do lots of MD raid, I
> generally either put the swap on hardware RAID, or stripe it and
> sometimes hope for the best. The latter doesn't always work. When a
> drive goes pear shaped, and takes down pages with it, your machine will
> crash, and pretty hard at that.
>
> We'll definitely try the swap atop MD RAID going forward. I like the
> idea of a RAID10 for it.
>
> >> It would be nice to have a discussion among people who have experience
> >> with all of this.
> >
> > Definitely put swap on RAID1 if you have RAID1 at all.
> >
> > My personal preference with RAID1 to to have a single RAID1 (probably
> > --metadata=1.0) across the whole devices, and partition that for root, swap,
> > home.
>
> This gets to my question, since we haven't tried this yet ... can we do
> whole device MD RAIDs, and boot from them? Is there anything special we
> need to do in their construction (use --auto=mdp or similar)? We'd
> really prefer to go this route rather than building multiple smaller
> RAIDs. We can manage the latter, but the former is far easier/cleaner
> to handle rebuilds with.
The little 'server' in my garage runs md/raid1 across two device (using 0.90
metadata - never had any reason to convert).
I seem to remember that I had to do something special to grub to get it to
boot initially, but I also vaguely remember that after some series of updates
(this is Debian) it seemed to get a lot easier. My "grub.cfg" contains:
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686' --class debian --class gnu-linux --class gnu --class os {
insmod raid
insmod mdraid
insmod part_msdos
insmod ext2
set root='(md0,1)'
search --no-floppy --fs-uuid --set 03e9951f-d174-4d88-9b4c-dd7a31c0de61
echo 'Loading Linux 2.6.32-5-686 ...'
linux /vmlinuz-2.6.32-5-686 root=UUID=6e8a3564-5588-476e-bbe5-a68c967c6c8e ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.32-5-686
}
which was all automatically created, and it seems to "just work".
So yes - you can boot for partitioned whole-device md/raid.
You might need to use a "metadata-at-the-end" format list 0.90 or 1.0, but it
is entirely possible that it will work for other metadata formats, I really
don't know. Other than that, no special options needed when creating the
array.
NeilBrown
next prev parent reply other threads:[~2011-04-20 1:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-19 12:12 debian software raid1 b2
2011-04-19 12:25 ` Mathias Burén
2011-04-19 16:03 ` Iordan Iordanov
2011-04-19 21:10 ` Gordon Henderson
2011-04-19 21:33 ` Steven Haigh
2011-04-19 22:01 ` Roberto Spadim
2011-04-19 22:05 ` Mathias Burén
2011-04-19 22:51 ` NeilBrown
2011-04-20 0:33 ` Joe Landman
2011-04-20 1:12 ` NeilBrown [this message]
2011-04-20 14:59 ` Iordan Iordanov
2011-04-20 14:51 ` Iordan Iordanov
2011-04-21 6:15 ` Luca Berra
2011-04-21 14:50 ` Iordan Iordanov
2011-04-22 5:59 ` Luca Berra
2011-04-22 19:19 ` Iordan Iordanov
2011-04-22 19:28 ` Mikael Abrahamsson
2011-04-23 0:07 ` Iordan Iordanov
2011-04-20 10:28 ` Asdo
2011-04-20 12:40 ` NeilBrown
2011-04-23 8:33 ` Jan Ceuleers
2011-04-22 19:21 ` Iordan Iordanov
2011-04-22 22:12 ` NeilBrown
2011-04-23 0:05 ` Iordan Iordanov
2011-04-23 12:54 ` David Brown
2011-04-23 14:23 ` Keld Jørn Simonsen
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=20110420111239.734ae4c1@notabene.brown \
--to=neilb@suse.de \
--cc=b2@playtime.bg \
--cc=iordan@cdf.toronto.edu \
--cc=joe.landman@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=mathias.buren@gmail.com \
/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).