| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Auto-assembly and planned assembly don't really work well together,
it can be confusing.
In particular in mkinitrd or similar creates an mdadm.conf to
assemble a particular array, we shouldn't go assembling any
other arrays as well.
If you want auto assembly, you need to give mdadm a config
file with no ARRAY lines.
mdadm -Ascpartitions
can do this.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that names in /dev are usually created (eventually) by udev,
it isn't really safe to rely in finding a name in /dev to pass to
mdmon to identify which array to monitor.
And it isn't really necessary to have a name in /dev.
So just pass the symbolic name, e.g. md127 or md123.
Change util.c to pass that name, and change mdmon to process the
name sensibly.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Resolves issues like:
mdadm -Ss
mdadm: unable to open /dev/md/r1: No such file or directory
...where /dev/md/r1 points to a removed device.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| |
| |
| | |
Don't write to 'pe' if 'path' was not specified
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
The version portion of the signature changes depending on the contents
of the container.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| |
| |
| |
| | |
When creating an imsm array use the lowest possible feature set to
maximize compatibility.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| |
| |
| |
| | |
Change the multibyte disk status field definitions to imsm byte-order
(little-endian) to match other multibyte field definitions.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| | |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| |
| |
| | |
imsm_set_array_state need not look at the map_state when failed==0
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| | |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|/
|
|
|
|
|
|
| |
This probably wont get into mainline, but is need on SLES
to create partitions that the YaST partitioner has a chance
of recognising.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
Otherwise we get an unpleasant 2 second pause when array creation
fails.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
| |
This makes sure it is consistently closed.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
| |
Otherwise autoassembly can get confused.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
1/ when we choose not to use a device, must set ->used to 2, not 1.
2/ When we give up on a member, clear st and content.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
That '10000' should have been '1000'. Make it a 'sizeof' to avoid
such carelessness.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
| |
Forgot the $DESTDIR in the install target :-(
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
1/ ia64 appear to have __clone2, not clone.
2/ Including "++" in the arg to a macro is a bad thing to do.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
| |
Multiple updates to try to get up to date with current code.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
Not all kernels automatically discard partitions when the
array is stopped, so call the RRPART ioctl to force it.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
We don't really want mdadm to exit until udev has
created the names in /dev. So wait.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
It is possible for the mapfile to become wrong, and that gets
very confusing. So validate entries before returning them.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
Now that we set homehost by default, adjust teh 06name test
accordingly.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
To avoid confusion with old array, also zero superblocks
before starting a test.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
| |
If udev hasn't created the array yet, we might still want to
open it. So open directly by major:minor.
Also, of array in map file doesn't appear to exist, do use
the name associated with it.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
sysfs_read currently tried to look in sysfs even in no valid sys_name
was found. Don't to that.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
So if the array with minor number matching the name of a new array
already exists, just assemble with a different minor number.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
As we open and close so quickly, udev might still have the device
open. so call udevsettle before stopping an array during testing.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
When we create our own ddf array, store the homehost in the vendor
information so it can be so to ensure 'LOCAL' name choices.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
As with Assemble, one create_mddev has chosen a name, we should always
use that rather than the passed 'mddev'.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
As spares are treated quite differently in containers, we cannot
fake-up a spare to optimise initialisation for a raid5 in a container,
so disable that code for ->external arrays.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
| |
Rather than appending the md minor number, we now append a small
sequence number to make sure name in /dev/md/ that aren't LOCAL are
unique. As the map file is locked while we do this, we are sure
of no losing any races.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
We probably should pass a flag down saying 'this is auto-assembly',
but for now, if there is no identity information set, it must
be auto-assemble.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
| |
Thus an auto-generated config file will list all the arrays.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
| |
It is only 16 bytes, not 32. And is space padded, not nul terminated.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
| |
Try to treat members of containers much like other arrays for
assembly.
We still look through the list of devices for a match (it will be
the container), then find the relevant 'info' and try to assemble
the array.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
Rather than open-coding a test of 'verbose' and 'inargv' in
multiple places, do it one and set a variable.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attempting to open(O_EXCL) each candidate device usually filters out all
busy raid components. However, containers do not behave like components
and will return container_content that may describe active member
arrays.
This patch just adds a function that will be used to check if a
container member is busy. It will be used shortly.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
| |
Factor out, from Incremental_container, the code for assembling an
array based on information extracted from a container. We will
shortly use this from Assemble too.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
| |
I have seen the light.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
|
|
|
|
|
|
| |
In preparation for handling the container case where we may need to handle
a list of potential member arrays.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
| |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
Add anything that looks like a container in /proc/mdstat to the devlist
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
| |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
| |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
|