Bug 545494 - Kernel Raid-1 support and mdadm could use a mark-as-synced switch
Kernel Raid-1 support and mdadm could use a mark-as-synced switch
Product: Fedora
Classification: Fedora
Component: mdadm (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Doug Ledford
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-12-08 12:37 EST by Odin Trisk
Modified: 2009-12-08 13:03 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-12-08 13:03:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Odin Trisk 2009-12-08 12:37:12 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.

Comment 1 Doug Ledford 2009-12-08 13:03:32 EST
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.

Note You need to log in before you can comment on or make changes to this bug.