linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* MDADM grow /dev/md0 - chunk size
@ 2017-01-15 10:33 J. Cassidy
  2017-01-22 22:52 ` NeilBrown
  0 siblings, 1 reply; 3+ messages in thread
From: J. Cassidy @ 2017-01-15 10:33 UTC (permalink / raw)
  To: linux-raid; +Cc: neilb

Hello all/Neil,




I am trying to change the chunk size on a RAID 0 (two SSD) from 512K to 64K.

I am running Debian Stretch with a 4.10 kernel.

MDADM version is 4.0 (GIT).

This is the command string being issued -

mdadm --grow -c 64 --backup-file=/zz/backup.file /dev/md0

or

mdadm --grow -c 64  /dev/md0

both of the abovementioned commands produce this message -


"mdadm: /dev/md0: could not set level to raid4"


A snippet from dmesg -
.
.
md/raid:md0: cannot takeover raid0 with more than one zone.
md: md0: raid4 would not accept array
.
.

My MDADM setup -


mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Sat Jan 14 16:51:54 2017
     Raid Level : raid0
     Array Size : 497783808 (474.72 GiB 509.73 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Sat Jan 14 16:51:54 2017
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

     Chunk Size : 512K

           Name : Pezenas:0  (local to host Pezenas)
           UUID : 77cd6f4e:f98bf2b0:862948df:12da38fa
         Events : 0

    Number   Major   Minor   RaidDevice State
       0     259        4        0      active sync   /dev/nvme0n1p2
       1     259        2        1      active sync   /dev/nvme1n1p1


I recall doing something similiar a few years ago and it worked, though not using
NVME drives.


Any help/pointers much appreciated.




Regards,



John






John Cassidy

Obere Bühlstrasse 21
8700 Küsnacht (ZH)
Switzerland / Suisse / Schweiz


Mobile:    +49  152 58961601 (Germany)
Mobile:    +352 621 577 149  (Luxembourg)
Mobile:    +41  78 769 17 97 (CH)
Landline:  +41  44 509 1957
Mobile email: mobile@jdcassidy.eu

http://www.jdcassidy.eu

"Aut viam inveniam aut faciam" - Hannibal.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: MDADM grow /dev/md0 - chunk size
  2017-01-15 10:33 MDADM grow /dev/md0 - chunk size J. Cassidy
@ 2017-01-22 22:52 ` NeilBrown
  2017-01-25 17:04   ` Raid wiki - was " Wols Lists
  0 siblings, 1 reply; 3+ messages in thread
From: NeilBrown @ 2017-01-22 22:52 UTC (permalink / raw)
  To: J. Cassidy, linux-raid

[-- Attachment #1: Type: text/plain, Size: 3154 bytes --]

On Sun, Jan 15 2017, J. Cassidy wrote:

> Hello all/Neil,
>
>
>
>
> I am trying to change the chunk size on a RAID 0 (two SSD) from 512K to 64K.
>
> I am running Debian Stretch with a 4.10 kernel.
>
> MDADM version is 4.0 (GIT).
>
> This is the command string being issued -
>
> mdadm --grow -c 64 --backup-file=/zz/backup.file /dev/md0
>
> or
>
> mdadm --grow -c 64  /dev/md0
>
> both of the abovementioned commands produce this message -
>
>
> "mdadm: /dev/md0: could not set level to raid4"
>
>
> A snippet from dmesg -
> .
> .
> md/raid:md0: cannot takeover raid0 with more than one zone.
> md: md0: raid4 would not accept array

Your two partitions that form the RAID0 array are different sizes.
This causes raid0 to create 2 zones, one which covers all of the smaller
partition and an equal portion of the larger partition, and one which
covers the remainder of the larger partition.

raid4 does not have a similar concept of zones, so it is not possible to
convert the raid0 into a degraded raid4.
raid0 does not support chunk-size changes (or any changes) directly.
These are performed by transforming the RAID0 to RAID4 and having the
raid4 module perform the change.

The consequence of all this is that: sorry, you cannot change the chunk
size of the array.

And... please don't send nag emails so soon - it was barely more than
24hours after the original.  This just comes across as rude and
impatient.  People have other commitments.
My rule of thumb is to wait at least a week before resending - and then
resend the full text of the original.  Your nag email was not only too
soon, but contained no detail and so was useless.

NeilBrown


> .
> .
>
> My MDADM setup -
>
>
> mdadm --detail /dev/md0
> /dev/md0:
>         Version : 1.2
>   Creation Time : Sat Jan 14 16:51:54 2017
>      Raid Level : raid0
>      Array Size : 497783808 (474.72 GiB 509.73 GB)
>    Raid Devices : 2
>   Total Devices : 2
>     Persistence : Superblock is persistent
>
>     Update Time : Sat Jan 14 16:51:54 2017
>           State : clean
>  Active Devices : 2
> Working Devices : 2
>  Failed Devices : 0
>   Spare Devices : 0
>
>      Chunk Size : 512K
>
>            Name : Pezenas:0  (local to host Pezenas)
>            UUID : 77cd6f4e:f98bf2b0:862948df:12da38fa
>          Events : 0
>
>     Number   Major   Minor   RaidDevice State
>        0     259        4        0      active sync   /dev/nvme0n1p2
>        1     259        2        1      active sync   /dev/nvme1n1p1
>
>
> I recall doing something similiar a few years ago and it worked, though not using
> NVME drives.
>
>
> Any help/pointers much appreciated.
>
>
>
>
> Regards,
>
>
>
> John
>
>
>
>
>
>
> John Cassidy
>
> Obere Bühlstrasse 21
> 8700 Küsnacht (ZH)
> Switzerland / Suisse / Schweiz
>
>
> Mobile:    +49  152 58961601 (Germany)
> Mobile:    +352 621 577 149  (Luxembourg)
> Mobile:    +41  78 769 17 97 (CH)
> Landline:  +41  44 509 1957
> Mobile email: mobile@jdcassidy.eu
>
> http://www.jdcassidy.eu
>
> "Aut viam inveniam aut faciam" - Hannibal.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Raid wiki - was Re: MDADM grow /dev/md0 - chunk size
  2017-01-22 22:52 ` NeilBrown
@ 2017-01-25 17:04   ` Wols Lists
  0 siblings, 0 replies; 3+ messages in thread
From: Wols Lists @ 2017-01-25 17:04 UTC (permalink / raw)
  To: NeilBrown, linux-raid

On 22/01/17 22:52, NeilBrown wrote:
> And... please don't send nag emails so soon - it was barely more than
> 24hours after the original.  This just comes across as rude and
> impatient.  People have other commitments.
> My rule of thumb is to wait at least a week before resending - and then
> resend the full text of the original.  Your nag email was not only too
> soon, but contained no detail and so was useless.

Just to point out - to everyone :-) - that the linux wiki is currently
being maintained so pointing people at it is a good idea.

And there's a page called "asking for help". Not only does this tell
people all the commands (like "cat /proc/mdstat", "mdadm --detail",
"mdadm --examine") they should be running to get the info the list is
likely to want, but

*almost the first thing* on that page is a reminder that many of us here
are volunteers, and prompt replies are a privilege not a right. Lusers
get spoilt in that we take pride in our work.

But can I ask, if you do point people at the wiki, just take a quick
glance yourself first. And if you do spot a mistake on the wiki,
brickbats and fixes are welcome :-)

Cheers,
Wol

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-25 17:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-15 10:33 MDADM grow /dev/md0 - chunk size J. Cassidy
2017-01-22 22:52 ` NeilBrown
2017-01-25 17:04   ` Raid wiki - was " Wols Lists

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).