From: Bill Davidsen <davidsen@tmr.com>
To: Neil Brown <neilb@suse.de>
Cc: Paul Davidson <Paul.Davidson@anu.edu.au>, linux-raid@vger.kernel.org
Subject: Re: Is shrinking raid5 possible?
Date: Thu, 22 Jun 2006 20:49:04 -0400 [thread overview]
Message-ID: <449B3A80.4070602@tmr.com> (raw)
In-Reply-To: <17558.10906.59066.196870@cse.unsw.edu.au>
Neil Brown wrote:
>On Monday June 19, Paul.Davidson@anu.edu.au wrote:
>
>
>>Hi,
>>
>>I'd like to shrink the size of a RAID5 array - is this
>>possible? My first attempt shrinking 1.4Tb to 600Gb,
>>
>>mdadm --grow /dev/md5 --size=629145600
>>
>>gives
>>
>>mdadm: Cannot set device size/shape for /dev/md5: No space left on device
>>
>>
>
>Yep.
>The '--size' option refers to:
> Amount (in Kibibytes) of space to use from each drive in
> RAID1/4/5/6. This must be a multiple of the chunk size, and
> must leave about 128Kb of space at the end of the drive for the
> RAID superblock.
>(from the man page).
>
>So you were telling md to use the first 600GB of each device in the
>array, and it told you there wasn't that much room.
>If your array has N drives, you need to divide the target array size
>by N-1 to find the target device size.
>So if you have a 5 drive array, then you want
> --size=157286400
>
May I say in all honesty that making people do that math instead of the
computer is a really bad user interface? Good, consider it said. An
means to just set the target size of the resulting raid device would be
a LOT less likely to cause bad user input, and while I'm complaining it
should inderstand suffices 'k', 'm', and 'g'.
Far easier to use for the case where you need, for instance, 10G of
storage for a database, tell mdadm what devices to use and what you need
(and the level of course) and let the computer figure out the details,
rounding up, leaving 128k, and phase of the moon if you decide to use it.
Sorry, I think the current approach is baaad human interface.
--
bill davidsen <davidsen@tmr.com>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979
next prev parent reply other threads:[~2006-06-23 0:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-19 2:30 Is shrinking raid5 possible? Paul Davidson
2006-06-19 4:39 ` Neil Brown
2006-06-19 5:07 ` Paul Davidson
2006-06-23 0:49 ` Bill Davidsen [this message]
2006-06-23 1:26 ` Neil Brown
2006-06-23 2:17 ` Paul Davidson
2006-06-23 8:34 ` Henrik Holst
2006-06-23 18:16 ` Christian Pernegger
2006-06-26 7:41 ` Neil Brown
2006-06-26 11:33 ` Christian Pernegger
2006-11-22 20:40 ` Henrik Holst
2009-11-06 13:17 ` Thomas Arthur Oehser
2009-11-06 15:04 ` Asdo
2009-11-06 15:26 ` Thomas Arthur Oehser
2009-11-06 17:00 ` Goswin von Brederlow
2009-11-06 18:32 ` John Robinson
2009-11-06 18:38 ` Thomas Arthur Oehser
2009-11-06 19:30 ` Goswin von Brederlow
2009-11-06 19:38 ` John Robinson
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=449B3A80.4070602@tmr.com \
--to=davidsen@tmr.com \
--cc=Paul.Davidson@anu.edu.au \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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).