From: "Steinar H. Gunderson" <sgunderson@bigfoot.com>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] Online RAID-5 resizing
Date: Tue, 20 Sep 2005 17:36:22 +0200 [thread overview]
Message-ID: <20050920153622.GA14287@uio.no> (raw)
In-Reply-To: <17200.9302.242957.23189@cse.unsw.edu.au>
On Wed, Sep 21, 2005 at 01:01:42AM +1000, Neil Brown wrote:
> Shrinking certainly adds a lot of complications, and you would have to
> start at the 'top' and work backwards. Probably not worth the effort,
> except that people might want to be able to back-out a change...
I worked on EVMS' resizing code prior to doing this, and it seems like a
resize was simply doing it the other way without any further complications...
I don't know how the underlying block layer in Linux would like it, though.
>> - It leaks memory; it doesn't properly free up the old stripes etc. at the
>> end of the resize. (This also makes it impossible to do a grow and then
>> another grow without stopping and starting the volumes.)
> I'm sure that can be fixed.
Yes, of course; it's mostly about not having gotten around to doing it yet. A
good start would be doing shrink_stripes(), but the “finish up the expanding”
code is currently called from __release_stripe() when the last stripe from
the old array is freed, and thus is done under the device_lock, and I had
problems doing memory management under the spinlock. The correct solution
would probably be moving it into raid5d, outside the spinlock.
> Crash recovery is essential I think. There are some awkward cases,
> particularly while growing the first few stripes. I'm sure we can
> work it out together.
Mm, or at least the very first stripe. I'm not really sure if it's worth it,
though; perfect crash recovery is pretty hard (for one, you'd have to disable
all write caching on the destination disks), and I'm not sure how probable
a power loss 20ms into the resizing is.
>> - It's quite slow; on my test system with old IDE disks, it achieves about
>> 1MB/sec. One could probably make a speed/memory tradeoff here, and move
>> more chunks at a time instead of just one by one; I'm a bit concerned
>> about the implications of the kernel allocating something like 64MB in one
>> go, though :-)
> I doubt speed is a top priority.
Well, with multi-terabyte arrays, restriping at those speeds will take
_weeks_, so more speed is always good. I agree that we don't need to be
pushing it very hard, though.
> I'll try to have a read through your code over the next week or so and
> give you more detailed feedback.
OK, thanks. :-) There's a lot of unneeded junk in the patch, BTW (some
reindenting here and there that I don't know where is coming from, plus lots
of temporary added printks), but I guess we can sort out the cleanness after
a while. :-)
/* Steinar */
--
Homepage: http://www.sesse.net/
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2005-09-20 15:36 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-20 14:33 [PATCH] Online RAID-5 resizing Steinar H. Gunderson
2005-09-20 15:01 ` Neil Brown
2005-09-20 15:36 ` Steinar H. Gunderson [this message]
2005-09-22 16:16 ` Neil Brown
2005-09-22 16:32 ` Steinar H. Gunderson
2005-09-23 8:59 ` Neil Brown
2005-09-23 12:50 ` Steinar H. Gunderson
2005-09-22 20:53 ` Steinar H. Gunderson
2005-09-24 1:44 ` Steinar H. Gunderson
2005-10-07 3:09 ` Neil Brown
2005-10-07 14:13 ` Steinar H. Gunderson
2005-10-14 19:46 ` Steinar H. Gunderson
2005-10-16 22:55 ` Neil Brown
2005-10-17 0:16 ` Steinar H. Gunderson
2005-10-19 23:18 ` Steinar H. Gunderson
2005-10-20 13:07 ` Steinar H. Gunderson
2005-10-22 13:45 ` Steinar H. Gunderson
2005-10-22 13:52 ` Neil Brown
2005-10-24 0:37 ` Neil Brown
2005-09-20 18:54 ` Al Boldi
2005-09-21 19:23 ` Steinar H. Gunderson
2005-09-22 0:14 ` Steinar H. Gunderson
2005-09-22 1:00 ` Steinar H. Gunderson
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=20050920153622.GA14287@uio.no \
--to=sgunderson@bigfoot.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@cse.unsw.edu.au \
/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).