From: NeilBrown <neilb@suse.de>
To: Mark Knecht <markknecht@gmail.com>
Cc: Linux-RAID <linux-raid@vger.kernel.org>
Subject: Re: Preparing for mdadm-3.3
Date: Tue, 25 Jun 2013 09:38:24 +1000 [thread overview]
Message-ID: <20130625093824.1723e2e3@notabene.brown> (raw)
In-Reply-To: <CAK2H+ef9Zs0rQsGtB5BTOV6bYGXQ_n=Ld_9Lq63x9gBbDnFPog@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2042 bytes --]
On Mon, 24 Jun 2013 06:44:25 -0700 Mark Knecht <markknecht@gmail.com> wrote:
> On Mon, Jun 24, 2013 at 12:18 AM, NeilBrown <neilb@suse.de> wrote:
> <SNIP>
> >
> > I somehow got unsubscribed from linux-raid (again) a few weeks back, so if
> > anything was sent to the list and not me that I should know about, now might
> > be a good time to resend that too.
> >
> > Thanks,
> > NeilBrown
>
> Neil,
> Welcome back. :-)
>
> I currently run mdadm-3.1.4 which is Gentoo stable. It seems that I
> cannot change chunk size if the new chunk size doesn't divide evenly
> into the number of sectors on the partition, or at least that's the
> way I understand the message. Is that anything you've either worked on
> or considered for mdadm?
>
In my mind, it should "obviously" work the way it does. As you seem to think
differently, at least one of us must be missing something.
Each device (in a striped array) must contribute an integer number of chunks
to the array, otherwise you will get holes in the data.
So if you set the chunk size to something that doesn't divide into the size
of the device, then you will end up using less of the device. And that means
that they array will become smaller.
Making the array smaller will mostly likely cause you to lose data.
If you really want to do that, you can. Just set the size to something
appropriate and then change the chunk size.
mdadm -G /dev/mdXX --size=smaller
mdadm -G /dev/mdXX --chunk=different
Of course the "something appropriate" must be a multiple of both the old and
the new chunk sizes. As chunk sizes are mostly powers of 2, that shouldn't be
a problem.
Maybe when mdadm reports that the chunk size doesn't divide the device size,
it could suggest a "--grow --size=" command to reduce the array size so that
it will.
Obviously you would need to resize any file system before resizing the array.
Does that address your issue? Is there something that you are thinking that
I am missing?
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2013-06-24 23:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 7:18 Preparing for mdadm-3.3 NeilBrown
2013-06-24 13:44 ` Mark Knecht
2013-06-24 23:38 ` NeilBrown [this message]
[not found] ` <wrfjli5zfq1c.fsf@redhat.com>
2013-06-24 23:42 ` NeilBrown
2013-06-25 8:40 ` Jes Sorensen
2013-06-27 18:24 ` Martin Wilck
2013-07-01 23:41 ` NeilBrown
2013-07-25 8:02 ` NeilBrown
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=20130625093824.1723e2e3@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=markknecht@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).