Caution: Kernel 5.3.4 and RAID0 default_layout

When you have a RAID0 array that is made up of 2 or more devices that are not the same size, at least on Archlinux since Kernel version 5.3.4 you will have trouble booting.
You will get the message:

The explanation by the committee is:
raid0 default_layout commit

md/raid0: avoid RAID0 data corruption due to layout confusion.

If the drives in a RAID0 are not all the same size, the array is
divided into zones.
The first zone covers all drives, to the size of the smallest.
The second zone covers all drives larger than the smallest, up to
the size of the second smallest – etc.

A change in Linux 3.14 unintentionally changed the layout for the
second and subsequent zones. All the correct data is still stored, but
each chunk may be assigned to a different device than in pre-3.14 kernels.
This can lead to data corruption.

It is not possible to determine what layout to use – it depends which
kernel the data was written by.
So we add a module parameter to allow the old (0) or new (1) layout to be
specified, and refused to assemble an affected array if that parameter is
not set.

In order to know which layout to use you will have to check when the raid was assembled.
In the case of Archlinux you’ll be dropped to an emergency shell, where you’re able to run the folloing commands:

And receive results similar to the following

There you see the date the RAID was assembled and can backtrack which Kernel was current when you assembled your RAID.
You can see the release version history on the following link:

Linux_3.14 Released 30 March, 2014 (70 days)

If your RAID creation date is significanty later, like 1 year you can be sure to set the default_layout to 2.

The price question is, how do you set it to 2 or 1?

By a kernel command line parameter. Your grub.cfg probably looks something like

To be able to boot again, press the E key when grub lets you select which kernel to boot and append the following to the kernel command parameters

so it looks similar to this

Once you have booted you can make the change permanent by editing
to hold


While you’re still in the emergency shell type

0 = not set
1 = original, pre 3.14
2 = new, post 3.14


and see if everything seems to be good. Check thoroughly.

Spread the love

Schreib einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.