]> git.ipfire.org Git - thirdparty/mdadm.git/commit
imsm: disambiguate family_num
authorDan Williams <dan.j.williams@intel.com>
Wed, 30 Sep 2009 18:45:41 +0000 (11:45 -0700)
committerDan Williams <dan.j.williams@intel.com>
Wed, 30 Sep 2009 18:45:41 +0000 (11:45 -0700)
commita2b9798159755b6f5e867fae0dd3e25af59fc85e
treefffb12b9874af2b420ef13469fd95a8ef7dbf321
parent51725a7c2569b764f59f009bc0ef42901a1ec915
imsm: disambiguate family_num

This is a result of trawling through the Windows implementation to learn
the mechanism of how it disambiguates family_num.  It is a continuation
of commit 148acb7b "imsm: fix family number handling" which introduced a
regression when reassembling a container with stale disks and rebuilt
members.

When rebuilding, a new family number is assigned to protect against the
"prodigal array member" problem.  It prevents a former family member
from returning to the system and causing a rebuild to go the wrong
direction.  However, this invalidates looking at the generation number to
determine the most up-to-date disk when comparing across family numbers.
Instead the assembly logic looks for agreement between a disk's local
family membership compared against a global list of all families in the
system.  Whenever a disk's local metadata does not match a family number
on the global list that family number is marked offline.

It is possible that this logic results in multiple incompatible but
valid family numbers existing in a container.  In this case mdadm.conf
cannot be consulted because it only records the uuid which is generated
from static fields in the metadata.  The metadata lacks the data needed
to disambiguate "local" versus "foreign".  The "foreign" array in this
case requires updating to change its container-id information
(orig_family_num), and possibly the member array names.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
super-intel.c