RAID-1 should use metadata version 1.0

Bug #1902288 reported by Peter Folk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity
New
Undecided
Unassigned

Bug Description

RAID-1 in principle ends up with partitions that are normal partitions but mirrored on two disks. If that were the case, and you needed to recover data from a failed disk, you could for example put the drive in another machine and mount the partition and use disk recovery software to find files or file fragments.

In practice, Linux software RAID defaults to putting the RAID metadata 4k into the partition, which results in it being much harder to recover a partition on a separate machine (you first have to initialize the RAID, which means your recovery machine needs to be Linux, and the RAID needs to be intact enough to be recovered, and you have to know how to recover a failed RAID array, etc.).

Linux software RAID supports putting metadata at the end of the partition, which results in the underlying partition being mountable as described above; you just have to pass "-e 1.0" to mdadm when creating the RAID.

I believe this should be the default metadata version for the installer. Users installing new RAID partitions on a live server can choose the metadata location, and presumably could recover a failed drive from within the functioning server. But if your boot drive is failed you may not HAVE a functioning linux server to recover from, so metadata version 1.0 is more necessary.

Alternatively, if not the default least there should be some way for people to specify metadata version within the installer.

p.s. This also assists with bootable software RAID setups: GRUB installed in the MBR can recognize and boot from an EXT4 partition inside a software RAID when it has the metadata at the end (version 1.0). At least in the versions I tested, it was not able to boot from a RAID that had its metadata 4k from the front of the partition, instead requiring a separate boot partition on each drive, which has to be manually kept up to date.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.