Red Hat Bugzilla – Bug 545494
Kernel Raid-1 support and mdadm could use a mark-as-synced switch
Last modified: 2009-12-08 13:03:32 EST
Description of problem:
When installing a system using software RAID-1 mirroring, if you know there is no data of useful value on the master of the master/slave mirror pair of drives, there is no need to perform resynchronization.
An extra switch to mdadm when creating/assembling the MD device would signal to the kernel to consider them synchronized (still taking the lead from the master, for MD superblock serial number and state). There should be appropriate warnings to using this option presented to the command line user.
This is especially true if the sequence of events after the setup of RAID-1 will be to format the file system.
Some disks can be extremely large these days and the extra I/O load during the installation process makes the user perceive of a slow install, especially when the disks may have no chance of completely syncing up within the time the installation takes and the next reboot. So what is the point in starting to sync.
Even when the filesystem is marked out on the disk it is not normal to zero out every block so the state of unwritten/uninitialized blocks is always undefined.
I also know of no tooling which attempts to check or verify block for block the two physical partitions to look for possible discrepancies while the MD RAID-1 mirror is running.
THIS REPORT IS MADE TO PROVIDE FEEDBACK TO CONCERNS MADE DURING A FEDORA12 INSTALLATION.
mdadm already has such a switch: --assume-clean
It is, however, not advised even for raid1 arrays. While it is technically true that any unwritten portions of the disk have no guarantee of a consistent data state, the principal of least surprise suggests that we would want our raid arrays to behave like individual disks. Even in the uninitialized portions of a regular disk, the one thing that's true is from read to read, the data doesn't change. If we didn't sync the raid1 arrays, we would not provide that same behavior.