| Commit message (Collapse) | Author | Files | Lines |
|
Raid Devices[1] : 5 (4@20000K 3@20000K 2@0K 1@0K 0@0K)
The data offsets are 200000K and 0K.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Function was way too big, make several smaller functions.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
When a DDF array is assembled with missing devices, those devices
are now alway marked as 'missing' and cannot just re-appear in the array
and be working again.
test must be changed to acknowledge this.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Recent changes to support more ddf geometries using raid1e
requires updates to tests.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Infrastructure is there, so use it.
This requires making sure that ->data_offset is correctly set, even
for containers.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Each place the uses "get_extents" has slightly different search code
to look through the result.
Factor this out into a single find_space() function.
This is will make it easier to add --data-offset support.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
getinfo_super_ddf
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Just print the GUID, Seq and number of VDs in the container.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
The DDF "RAID1E" level is similar to md "raid10".
So use raid10 to support RAID1E, and create RAID1E for raid10
configs not already supported.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
If some other controller sets a number smaller than a calculation
would give us, we really should honour it.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Also be more consistent about setting events from seq in superblock.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
We currently copy the anchor to both primary and secondary
blocks.
This assumes that the anchor is uptodate, but it might not be.
We should trust the 'active' block and copy from there.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
- we weren't updating this timestamp at all
- the 'vd_config' seqnum was updated on every write of the metadata,
which is excessive. Just update it when there is a change.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Doco says:
Header update timestamp. MUST be set when the DDF
header is updated.
So I guess we should.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
As we are range-checking 'cd', there is a chance that it is not
in-range. In that case we should include all array indexes with 'cd'
inside the range-tested branch.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
The phys disks table should list all disks, but if the metadata
is corrupt, it might not even list the disk it was read from.
So check for and report any known disks that aren't listed.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
The "used_pdes" value counts the number of physdisk entries that
are in used.
It may not be the last one in use as there may be unused slots in
the middle.
So when were are iterating over phys disks, we need to use max_pdes
and skip unused entries.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
With consistent metdata, pdnum should never be negative,
but it is better to be safe than sorry.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
This allows it to be used for containers too.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
This is a better match for reshape_array() and means that
"mdadm --grow --continue" will run in the foreground, which
makes more sense.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
If "--assemble" or "--incremental" is started by udev, then
monitoring the reshape in the background won't work.
So try asking systemd to start a grow-continue.
If that fails, just do it the old way.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Subsequent patch will allow the background part of "mdadm --grow" to
be run from systemd. This can require the passing of a backup file
name.
To do this, store that name as a symlink in /run/mdadm (or MAP_DIR)
and look for it when appropriate.
It might be useful to also store the name across reboot, but that
would be a different patch. We would need to use the uuid to identify
it, and store it in stable storage.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
For large arrays (component size > 100GB) if write-intent bitmap is not
enabled, then it is set by default to "internal", even if the metadata
format does support internal bitmaps, which causes Create to fail.
This patch adds checking if add_internal_bitmap is set in the
superswitch before setting bitmap_file to "internal".
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
This modifies locking in Create to eliminate a situation where
--incremental can assemble a device between write_init_super() and
add_disk(), which causes Create to fail.
It sporadically occurs e.g. when metadata is written on a device,
causing an udev change event which triggers mdadm --incremental.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
1/ Add systemd shutdown script to ensure DDF and IMSM are
clean before we actually shutdown
2/ Get udev to tell systemd to run the mdmon@mdXXX.service
units when a member array appears.
If we boot off a member array (with dracut at least),
the mdmon started in the initramfs will lose track of
/sys etc, so we need to restart it.
systemd will try to forget about it too (but not actually
kill it because we said not to do this).
Having udev tell it to start it will allow a new mdmon to
run which can see /sys, and systemd will know about it.
3/ Always use --offroot and --takeover when starting mdmon with
systemd
--offroot is needed else shutdown will hang.
--takeover is needed incase an mdmon was started earlier
(e.g. in initramfs).
Neither hurt if they aren't actually needed.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
It is possible that one device has seem some reconfig but the other
hasn't. In that case they are still the "same" DDF, even though
one might be older. Such age will be detected by 'seq' differences.
If A is new and B is old, then it is import that
mdadm -I B
mdadm -I A
doesn't get confused because A has the same uuid as B, but compare_super fails.
So: if the seq numbers are different, then just accept as two
different superblocks.
If they are the same, then look to copy data from new to old.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Testing 'c' and then using 'vdc' assumes that the two are in sync,
but sometimes they aren't.
Testing 'vdc' is safer.
This avoids a crash in some cases when failing/removing/added devices
to a DDF.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
It is conceivable that ->pdnum could be -1, though only if
the metadata is corrupt.
We should be careful not to use it if it is.
Also remove an assignment for pdnum to ->container_member.
This is never used and cannot possibly mean anything.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
As well as removing from the array we really should mark
it is 'failed', and mark the array as degraded.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
..because it is more fun when new patches are harder to apply to old version :-)
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
This patch cleans up a bit the code by moving
the second repair mode, that is the manual
repair, to a separate function.
Signed off: piergiorgio.sartor@nexgo.de
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
This patch cleans up a bit the code by moving
the autorepair part into a separate function.
Signed off: piergiorgio.sartor@nexgo.de
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
The stripe locking mechanism must be atomic between
the check and the, potential, autorepair.
For this reason, the autorepair code needs to be just
after the check and both parts (check and autorepair)
must be excuted under stripe lock.
Of course, the manual repair can operate as before.
This patch reorganize the code and provides the single,
atomic, stripe lock.
It should be confirmed that this new locking is not
too demanding.
In case it is, some other solutions will be required
(suggestions wellcome).
Signed off: piergiorgio.sartor@nexgo.de
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Change how sudden-degraded devices should appear.
We don't record failure, we record that the device isn't there.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
We must remember they are missing so that if they re-appear we
don't get confused.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Also don't treat two devices with different seq numbers as completely
unrelated.
This allows split-brain detection to work properly for ddf.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
Having RAMFS_MAGIC defined as 0x858458f6 causing problems when trying
to compare it directly against statfs.f_type being cast from long to
unsigned long.
This hack is extremly ugly, but it should at least do the right thing
for every situation.
Thanks to Arnd Bergmann for suggesting the fix.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
|