Unable to set mdadm chunk size during Ubuntu Server install

Asked by Donald Schultz

When setting up a Linux software RAID array inside the Ubuntu Server install routine (which uses mdadm), beyond the ability to specify array members and personality, there is no ability to tweak the chunk size. The chunk size defaults to 512KB which would be suitable for a very specific set of uses but quite suboptimal for others. The underlying hardware is also a factor, as SSDs benefit from a much smaller chunk size due to high performance at high queue depths regardless of use case. Is there a way to get a setting into the Ubuntu Server 16.04 installation routine that will allow tweaking of the chuck size while also setting the chunk size down to a more sane 256K by default if none is specified?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

https://linux.die.net/man/8/mdadm

--size or -z option seems to do it

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

       -c, --chunk=
              Specify chunk size of kibibytes. The default when creating an
              array is 512KB. To ensure compatibility with earlier versions,
              the default when Building and array with no persistent metadata
              is 64KB. This is only meaningful for RAID0, RAID4, RAID5,
              RAID6, and RAID10.

http://manpages.ubuntu.com/manpages/xenial/en/man8/mdadm.8.html

Revision history for this message
Donald Schultz (donaldwschultz) said :
#3

Actually, at the command line, it is the -c or chunk size option that does it. However, I am talking about the inability to set the chunk size during array creation while inside the Ubuntu Server install routine. Sorry if I was not clear about that. During the install routine, you are allowed to create the array but it will automatically use the mdadm default for a 512KB chunk size.

Revision history for this message
Donald Schultz (donaldwschultz) said :
#4

Thanks Manfred. You are correct, but that option only applies when creating an array from the command line post-install. I am referring to a knob that can be manipulated during the Ubuntu Server install routine.

Revision history for this message
Donald Schultz (donaldwschultz) said :
#5

Just to provide more information, the 512KB default chunk size is only useful with mechanical HDDs on a media server or other NAS box type setup where the files are large in nature and someone is using RAID0/1/10. Further, anything above a 64KB chunk size for a parity array will cause serious performance issues.

I am aware that mdadm can be setup appropriately at the terminal but many folks are completely unaware of the default chunk size during Ubuntu Server install and don't fully understand how to setup mdadm at the terminal, much less how to make it persistent. Some users are more advanced than others.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

You could report a bug, get the option added

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

According to https://wiki.ubuntu.com/Bugs/FindRightPackage#When_installing_Ubuntu_.28or_Derivatives.29 the right target for the bug would most probably be debian-installer

Can you help with this problem?

Provide an answer of your own, or ask Donald Schultz for more information if necessary.

To post a message you must log in.