]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Allow RAID0 to be created with v0.90 metadata #161
authorNeilBrown <neil@brown.name>
Fri, 4 Apr 2025 00:56:04 +0000 (11:56 +1100)
committerMariusz Tkaczyk <mtkaczyk@kernel.org>
Thu, 10 Apr 2025 09:35:36 +0000 (11:35 +0200)
commit6ce7f21bb822fd0125f78434d9fbf6c3db524892
treed44cc9a5e019f497fc902cb58e95d765d57937fe
parent127e38b59cbdf717d1569bcdc75b8d823d8485f3
Allow RAID0 to be created with v0.90 metadata #161

It is not currently possible to create a RAID0 with 0.90 metadata.
This is because 0.90 cannot specify the layout of RAID0 (it is
traditionally ignored) and different kernels do different things with
RAID0 layouts.

However it should be possible to use --layout=dangerous as that
acknowledges the risk.
It also should be possible to create a RAID0 with all devices the same
size because in that case all layouts are identical.

The metadata handler can only check that all devices are the same size
quite late - in write_init_super().  By that time the default is
currently set - set to a value that super0 cannot handle.

So this patch delays the setting of the default value and leave it for
the metadata handler (or for the Build handler).

super1 selects ORIG in that case.
intel and ddf don't support non-uniform RAID0 so they don't need any
change.
super0 now checks the sizes of devices if the default RAID0 layout was
requested and rejects the request in they are not the same.

validiate_geometry0 now allows "dangerous" layouts for raid0.

Signed-off-by: NeilBrown <neil@brown.name>
Build.c
Create.c
maps.c
mdadm.h
super0.c
super1.c
tests/00raid0