summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Assemble: don't auto-assemble if any arrays are listed in mdadm.confsles11NeilBrown2008-11-201-2/+2
| | | | | | | | | | | | | | | 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>
* mdmon: pass symbolic name to mdmon instead of device name.NeilBrown2008-11-204-9/+25
| | | | | | | | | | | | | 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>
* Merge branch 'devel-3.0' into sles11NeilBrown2008-11-142-5/+9
|\
| * fix add_dev() handling of broken linksDan Williams2008-11-101-1/+3
| | | | | | | | | | | | | | | | | | | | 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>
| * fix remove_devices()Dan Williams2008-11-081-4/+6
| | | | | | | | | | | | Don't write to 'pe' if 'path' was not specified Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Merge branch 'intel-fixes' into sles11NeilBrown2008-11-141-78/+166
|\ \ | |/
| * imsm: fix uuid_from_super given 'signature' is not constantDan Williams2008-11-081-1/+1
| | | | | | | | | | | | | | The version portion of the signature changes depending on the contents of the container. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * imsm: compatibility fixes for creating imsm arraysDan Williams2008-11-081-5/+64
| | | | | | | | | | | | | | When creating an imsm array use the lowest possible feature set to maximize compatibility. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * imsm: fixup disk status definition endianessDan Williams2008-11-081-51/+27
| | | | | | | | | | | | | | 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>
| * imsm: add definitions for recent imsm versionsDan Williams2008-11-081-8/+48
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * imsm: cleanup migration definitions and usageDan Williams2008-11-071-12/+18
| | | | | | | | | | | | imsm_set_array_state need not look at the map_state when failed==0 Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * imsm: cleanup ->match_home and comment on return valueDan Williams2008-11-071-1/+8
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Start kpartx for imsm devices.NeilBrown2008-11-076-2/+37
|/ | | | | | | | 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>
* Create: don't wait for device to appear if we didn't actually start the arrayNeilBrown2008-11-071-1/+1
| | | | | | | Otherwise we get an unpleasant 2 second pause when array creation fails. Signed-off-by: NeilBrown <neilb@suse.de>
* Assemble: close mdfd before returning from assemble_container_contentNeilBrown2008-11-072-4/+8
| | | | | | This makes sure it is consistently closed. Signed-off-by: NeilBrown <neilb@suse.de>
* Assemble: return correct status from assemble_container_content.NeilBrown2008-11-071-4/+5
| | | | | | Otherwise autoassembly can get confused. Signed-off-by: NeilBrown <neilb@suse.de>
* Assemble: fix some auto-assemble bugs.NeilBrown2008-11-071-5/+8
| | | | | | | 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>
* mdopen: typo in buffer-length for a sprintf.NeilBrown2008-11-071-1/+1
| | | | | | | That '10000' should have been '1000'. Make it a 'sizeof' to avoid such carelessness. Signed-off-by: NeilBrown <neilb@suse.de>
* Makefile: install udev file into $DESTDIRNeilBrown2008-11-071-1/+1
| | | | | | Forgot the $DESTDIR in the install target :-( Signed-off-by: NeilBrown <neilb@suse.de>
* A couple of bugfixes found by suse autobuilding:NeilBrown2008-11-072-3/+17
| | | | | | | 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>
* Release 3.0-devel2mdadm-3.0-devel2NeilBrown2008-11-056-4/+104
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* Man pages: updates for container etc.NeilBrown2008-11-052-64/+197
| | | | | | Multiple updates to try to get up to date with current code. Signed-off-by: NeilBrown <neilb@suse.de>
* Stop: drop any partitions that may be associated with an array when stopping it.NeilBrown2008-11-041-1/+4
| | | | | | | 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>
* Wait for name to appear after create/assemble etc.NeilBrown2008-11-046-3/+23
| | | | | | | 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>
* mapfile: validate entries before they are returned.NeilBrown2008-11-042-10/+30
| | | | | | | 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>
* tests/06name: adjust for homehostNeilBrown2008-11-041-2/+2
| | | | | | | Now that we set homehost by default, adjust teh 06name test accordingly. Signed-off-by: NeilBrown <neilb@suse.de>
* test: always start with a clean slate.NeilBrown2008-11-041-0/+2
| | | | | | | To avoid confusion with old array, also zero superblocks before starting a test. Signed-off-by: NeilBrown <neilb@suse.de>
* Incrmental: cope with udev slowness and errors in map file.NeilBrown2008-11-041-3/+10
| | | | | | | | | | 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>
* Abort sysfs_read early if no device found.NeilBrown2008-11-041-0/+5
| | | | | | | 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>
* mdopen: only let numeric name set minor number if it doesn't cause a conflict.NeilBrown2008-11-041-1/+4
| | | | | | | 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>
* Assemble: we were missing a 'close'NeilBrown2008-11-041-0/+1
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* test: make sure udev isn't opening a device before closing it.NeilBrown2008-11-041-0/+3
| | | | | | | 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>
* Man page update for containers etc.NeilBrown2008-11-041-1/+15
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* ddf: store homehost information to allow smooth assembly.NeilBrown2008-11-041-0/+2
| | | | | | | 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>
* Create: make sure chosen_name is used for array name generation in CreateNeilBrown2008-11-041-0/+1
| | | | | | | 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>
* Create: Don't optimise resync as recovery when creating raid5 in a container.NeilBrown2008-11-041-1/+2
| | | | | | | | 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>
* mdopen: use small sequence number for uniquifying array names.NeilBrown2008-11-044-10/+44
| | | | | | | | | 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>
* Assemble: revise detection of 'autoassemble' mode.NeilBrown2008-11-041-1/+3
| | | | | | | | 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>
* DDF: report member arrays in examine_brief.NeilBrown2008-11-042-11/+27
| | | | | | Thus an auto-generated config file will list all the arrays. Signed-off-by: NeilBrown <neilb@suse.de>
* DDF: fix irregularities with retrieval of 'name' from metadata.NeilBrown2008-11-041-3/+12
| | | | | | It is only 16 bytes, not 32. And is space padded, not nul terminated. Signed-off-by: NeilBrown <neilb@suse.de>
* Assemble: allow members of containers to be assembled and auto-assembled.NeilBrown2008-11-045-1/+113
| | | | | | | | | | 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>
* Assemble: simplify test for reporting mismatches.NeilBrown2008-11-041-11/+13
| | | | | | | 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>
* Assemble: block attempts to reassemble container membersDan Williams2008-11-041-0/+25
| | | | | | | | | | | | | 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>
* Assemble: factor out assemble_container_contentDan Williams2008-11-043-56/+76
| | | | | | | | | 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>
* Assemble: revert preliminary -As supportDan Williams2008-11-044-56/+9
| | | | | | I have seen the light. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* Assemble: replace 'info' with 'content'Dan Williams2008-11-041-80/+82
| | | | | | | | 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>
* config: add containers to the default search listDan Williams2008-11-041-2/+4
| | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* config: add 'containers' as a DEVICE keywordDan Williams2008-11-042-5/+45
| | | | | | | 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>
* imsm: display container uuid in detail_superDan Williams2008-11-041-1/+6
| | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: display member array uuid in examine_super_imsmDan Williams2008-11-041-9/+16
| | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>