Re: Preparing for mdadm-3.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 24 Jun 2013 06:44:25 -0700 Mark Knecht <markknecht@xxxxxxxxx> wrote:

> On Mon, Jun 24, 2013 at 12:18 AM, NeilBrown <neilb@xxxxxxx> 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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux