Browse Prior Art Database

Improvement of the Mirror Write Consistency Algorithm

IP.com Disclosure Number: IPCOM000111351D
Original Publication Date: 1994-Feb-01
Included in the Prior Art Database: 2005-Mar-26
Document File: 2 page(s) / 120K

Publishing Venue

IBM

Related People

Shieh, JM: AUTHOR [+2]

Abstract

Disclosed is a method to improve the synchronization of filesystems on the AIX* operating system, through an improvement to the mirror write consistency algorithm of the Logical Volume Manager device driver.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 45% of the total text.

Improvement of the Mirror Write Consistency Algorithm

      Disclosed is a method to improve the synchronization of
filesystems on the AIX* operating system, through an improvement to
the mirror write consistency algorithm of the Logical Volume Manager
device driver.

      Disk mirroring is a method by which a copy of one piece of
information is kept at another physical location.  With AIX, this is
achieved by mirroring the logical volumes that are members of a
volume group.  On top of this logical volume, sits the Journaled File
System (jfs).  When a request is made to write to the jfs, the writes
are handed down from the jfs to the Logical Volume Manager's device
driver (lvmdd).  lvmdd in turn submits the write requests to the disk
device driver (diskdd).  The one diskdd can control the actions of
one or more physical disks.  With a sequentially mirrored system, the
write request first goes to the disk that is considered the primary.
Then after that completes, the secondary disk(s) gets updated.  In
the parallel configuration, the write request is broadcast to all
disks that make up the mirrored logical volume.  Since the parallel
method is more efficient than the sequential algorithm, in terms of
data I/O, parallel mirroring is the default mirroring algorithm used
when a mirror is created.

      A problem arises with the issue of data integrity of the writes
to the mirrors.  Since the writes are multiple and independent, one
can experience data inconsistency if the system were to fail before
all mirrors complete their mirror writes for the one, original
logical write request.  Thus, those logical volumes that are involved
with the writes have a potential for being out of sync (between
mirrors).  This potential inconsistent state is avoided with a
feature called mirror write consistency (mwc).  mwc is automatically
set when a logical volume and its associated mirrors are first
created.  mwc involves the lvmdd tracking the last 62 writes it
performed.  So during the reboot process of a system, those logical
volumes in question have their mirrors synchronized with each other.
Note, this does not imply that the last successful write will be
populated to the mirrors.  But, this does mean that all mirrors look
identical to each other.  For example, a logical volume could have
three mirrors A, B, and C, each a copy of the logical volume on a
different disk.  Then a write request is issued to each disk.  Disk A
completes, but disks B and C are still not finished with their
requests when a system halt occurs.  Upon rebooting, mirrors A, B,
and C start the resynchronization because mwc has determined that
these three copies could possibly be out of sync.  In order to resync
the mirrors, one has to pick a disk's copy of a mirror and use that
as a source of copy to the other two mirrors.  The current algorithm
for picking which copy to source the synchronization is unaware that
A actually finished first.  The algor...