From: Neil Brown <neilb@suse.de>
To: Michael Brancato <mike@mikebrancato.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: status of raid 4/5 disk reduce
Date: Tue, 16 Dec 2008 10:18:09 +1100 [thread overview]
Message-ID: <18758.58801.598933.281565@notabene.brown> (raw)
In-Reply-To: message from Michael Brancato on Monday December 8
On Monday December 8, mike@mikebrancato.com wrote:
> I'm curious as to the status of the ability to reduce the number of
> disks in a RAID 4/5 array. I would like the ability to reshape a 4 disk
> raid4/5 to a 3 disk raid4/5 for flexibility.
>
> here is what I want to do....
> $ sudo mdadm /dev/md0 --fail /dev/disk4 --remove /dev/disk4
> mdadm: set /dev/disk4 faulty in /dev/md0
> mdadm: hot removed /dev/disk4
> $ sudo mdadm --grow /dev/md0 -n3
> mdadm: /dev/md0: Cannot reduce number of data disks (yet).
>
> I know this capability is missing in the md driver. What is needed to
> make it work and is anyone currently working on it?
It is on my todo list, but I am not currently working on it. Maybe
next year.
There are three sorts of restriping.
1/ When the total amount of space grows.
In this case we are (for the most part) reading data from later in
the devices and writing it somewhere earlier in the devices.
So we progress forward through the devices (from low blocks
addresses to high block address) often having two copies of the
data that is currently being moved, so we can be sure of finding
good data after a crash.
2/ When the total amount of space shrinks.
This is the reverse of the above. Data is moved from early in the
device to later in the device, so we start at the end and move
backwards (from high block addresses to low block addresses).
Again, the data which is currently being moved is easily safe in
the face of a system crash.
3/ When the total amount of space remains unchanged (e.g. raid5 to
raid6 with one extra device).
To make this crash proof we would need to copy N stripes of data
into some backup area, then copy it back in the new layout, then
update the metadata.
So this will be much slower than other restriping (which is already
slow).
Only '1' is currently implemented.
'2' should be fairly easy. There are some fiddly bits such as mapping
the forward progress that md insists on into a backwards progress, but
that is quite manageable.
'3' would require a user-space helper to be copying data to backup and
then allowing the restripe to progress a bit further.
NeilBrown
next prev parent reply other threads:[~2008-12-15 23:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-08 20:59 status of raid 4/5 disk reduce Michael Brancato
2008-12-09 21:11 ` Alex Lilley
2008-12-09 21:33 ` David Lethe
2008-12-09 21:51 ` Robin Hill
2008-12-09 23:15 ` Ryan Wagoner
2008-12-10 12:14 ` Alex Lilley
2008-12-11 0:07 ` Michael Brancato
2008-12-11 4:30 ` David Lethe
2008-12-11 6:33 ` Michael Brancato
2008-12-11 13:52 ` Louis-David Mitterrand
2008-12-11 15:13 ` Michael Brancato
2008-12-11 11:43 ` John Robinson
2008-12-11 14:46 ` Mikael Abrahamsson
2008-12-11 15:24 ` David Lethe
2008-12-11 16:13 ` Michael Brancato
2008-12-11 15:27 ` Michael Brancato
2008-12-11 11:51 ` Alex Lilley
2008-12-15 23:18 ` Neil Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-12-12 15:38 David Lethe
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=18758.58801.598933.281565@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=mike@mikebrancato.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).