summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge branch 'master' into devel-3.0NeilBrown2008-12-187-55/+138
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Assemble.c Incremental.c Kill.c ReadMe.c inventory mapfile.c mdadm.8 mdadm.spec mdassemble.8
| * | map: rebuild map if it doesn't exist.NeilBrown2008-12-182-47/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible for some arrays to be created e.g. by initrd, and so not get mentioned in /var/run/mdadm/map. As "-I" depends on things being listed in 'map', we create it by scanning all devices if it doesn't exist. Signed-off-by: NeilBrown <neilb@suse.de>
| * | Assemble: set stripe_cache_size properly when restarting a reshape.NeilBrown2008-12-181-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Reshape with large chunk size can require a large stripe_cache. We make this work when starting the reshape but not when restarting at assemble time. So fix that. Signed-off-by: NeilBrown <neilb@suse.de>
| * | Assemble: don't assume array is 'clean' unless all devices think it is.NeilBrown2008-12-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is only significant for --assemble --force where some old devices might be included into the array. If anything looks like it isn't clean, the kernel will not allow a degraded array to be started. Signed-off-by: NeilBrown <neilb@suse.de>
| * | Kill: Don't use O_EXCL when --force is used.NeilBrown2008-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | We really want --zero-super --force to zero the superblock in all situations. So don't open with O_EXCL - trust the user. Signed-off-by: NeilBrown <neilb@suse.de>
| * | Allow --config in --incremental mode.NeilBrown2008-12-011-0/+1
| | |
| * | Release 2.6.8NeilBrown2008-11-286-4/+64
| | |
| * | Fix typo in mdadm.conf.5NeilBrown2008-11-281-1/+1
| | | | | | | | | | | | | | | | | | Debian Bug #506245 Signed-off-by: NeilBrown <neilb@suse.de>
| * | fix add_dev() handling of broken linksDan Williams2008-11-281-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>
* | | DDF: improve --examine outputNeilBrown2008-12-041-19/+38
| | | | | | | | | | | | | | | | | | | | | Make this more readable and in line with other metadata types by providing a table for the devices. Signed-off-by: NeilBrown <neilb@suse.de>
* | | Create: support autolayout when creating in a DDFNeilBrown2008-12-044-47/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | If, when creating an array, a signal target device is given which is a container, then allow the metadata handler to choose which devices to use. This is currently only supported for DDF. Signed-off-by: NeilBrown <neilb@suse.de>
* | | Change 'size' argument to validate_geometry to be sectors, not KNeilBrown2008-12-044-7/+8
| | | | | | | | | | | | | | | | | | That way it is the same a *freesize, and generally less confusing. Signed-off-by: NeilBrown <neilb@suse.de>
* | | Create: print message when preparing a container.NeilBrown2008-11-281-1/+2
| |/ |/| | | | | | | | | | | | | We currently print e.g. "Array /dev/md0 started", but nothing for containers. Fix that. Signed-off-by: NeilBrown <neilb@suse.de>
* | Merge branch 'master' into devel-3.0NeilBrown2008-11-271-2/+0
|\|
| * Assemble: allow --force to work even when event counts are 0.NeilBrown2008-11-271-2/+0
| | | | | | | | | | | | | | | | | | | | If any superblocks in a confused array had an event count of 0, "mdadm -Af" would not update the event counts to assemble the array. I don't remember why that text is there, and it has caused at least one situation to be difficult to recover from. So remove the test. --force means --force! Signed-off-by: NeilBrown <neilb@suse.de>
* | Assemble: wait for device to appear via udevNeilBrown2008-11-271-0/+1
| | | | | | | | | | | | | | Use the new "wait_for" function to make sure udev has created the device before completion the 'assemble'. Signed-off-by: NeilBrown <neilb@suse.de>
* | imsm: fix metadata reservationDan Williams2008-11-271-0/+7
| | | | | | | | | | | | | | | | | | | | 1/ When truncating the space reserved for the metadata round down to an even numbered sector count to avoid an off-by-one error when sysfs_add_disk rounds up. 2/ Set the current metadata parameter block size as a floor. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Tidy error messages for add_to_super failure.NeilBrown2008-11-273-7/+10
| | | | | | | | | | | | | | Make sure every failure from add_to_super prints a suitable error message, and then don't print any error in the caller. Signed-off-by: NeilBrown <neilb@suse.de>
* | allow add_to_super to return errorsDan Williams2008-11-277-18/+35
| | | | | | | | | | | | Prepare add_to_super to validate disks against the platform capabilities Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Support --wait-clean --scanDan Williams2008-11-272-8/+17
| | | | | | | | | | | | | | Its cumbersome to determine which devices to wait for in a system shutdown script, so hook up --scan. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | some warn_unused_result fixupsDan Williams2008-11-271-5/+9
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Assemble: don't auto-assemble if any arrays are listed in mdadm.confNeilBrown2008-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>
* | 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>
* | 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>
* | 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-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>