summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Assemble: call map_update even when not starting the array.NeilBrown2009-04-071-4/+7
| | | | | | | | | | | | | | | | | | | | | For incremental assembly to work, we need to keep the 'map' up-to-date even when not starting the array yet. Signed-off-by: NeilBrown <neilb@suse.de>
* | | ddf: fixed 'working_disks' reported by container_content.NeilBrown2009-04-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The 'work_disks' number should be the number that is expected, not the number found so far. This is needed for Incremental assembly to start the array at the right time. Signed-off-by: NeilBrown <neilb@suse.de>
* | | ddf: improve print out of physical devices.NeilBrown2009-04-071-4/+4
| | | | | | | | | | | | | | | | | | Just add some more space really. Signed-off-by: NeilBrown <neilb@suse.de>
* | | ddf: fix variable name overloadNeilBrown2009-04-071-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | The variable 'i' was being used as a loop variable, and also for something else inside the loop. So make the larger loop have a more meaningful name. Signed-off-by: NeilBrown <neilb@suse.de>
* | | wait_for improvement.NeilBrown2009-04-076-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | wait not only for the name to appear, but for it to refer to the correct device. Sometimes old symlinks left lying around can be confusing. Signed-off-by: NeilBrown <neilb@suse.de>
* | | config: treat "container=" and "member=" and providing the required identity ↵NeilBrown2009-04-061-1/+3
| | | | | | | | | | | | | | | | | | information. Signed-off-by: NeilBrown <neilb@suse.de>
* | | Detail: use meaningful names with --scan.NeilBrown2009-04-061-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reporting "--detail --scan", use names like /dev/md/foo where available rather than /dev/md/127 This is particularly needed for containers where the member arrays will report "container=/dev/md/foo" and we want the container to have the same name. Signed-off-by: NeilBrown <neilb@suse.de>
* | | Create: round to chunk sizeNeilBrown2009-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | | There are probably other places where rounding size to chunksize is needed, or useful, but this is a good start. Signed-off-by: NeilBrown <neilb@suse.de>
* | | test: support testing DDFNeilBrown2009-04-061-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | DDF requires larger devices as 32Meg is reserved. So allocated larger loop devices for DDF tests. Signed-off-by: NeilBrown <neilb@suse.de>
* | | util.c: use correct range for minor numbers when finding free device.NeilBrown2009-04-061-1/+1
| | | | | | | | | | | | | | | | | | Minor numbers are 20 bits, not 22. So when looking for a free, high minor number, try (1<<20)-1, not (1<<22)-1.
* | | ddf: make sure Create fails if devices are too small.NeilBrown2009-04-021-0/+2
| | | | | | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
* | | ddf: fix bug with error returns.NeilBrown2009-04-021-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | In some cases we should only print an error message if 'devname' is defined. In fact we were only returning the error at all in that case!! Signed-off-by: NeilBrown <neilb@suse.de>
* | | ism-tests: fix the imsm-create-fail-rebuild testNeilBrown2009-04-011-2/+3
| | | | | | | | | | | | | | | it was testing the return status of mdadm wrongly, and I found I needed a 'udevadm settle'.
* | | test: return correct error status for mdadmNeilBrown2009-04-011-0/+2
| | | | | | | | | | | | | | | mdadm's return status is being hidden by the 'test' script so individual tests cannot see it.
* | | Makefile: build 'mdmon' for 'test'NeilBrown2009-04-011-1/+1
| | | | | | | | | | | | | | | | | | Else make test might not prepare everything for running tests.
* | | grow: don't wait forever for critical section to pass.NeilBrown2009-04-013-0/+29
|/ / | | | | | | | | | | | | | | | | | | If an array reshape completed within 1 second, then --grow will not notice that it has finished and will keep waiting for the critical section to pass. So be more cautious in the test. Signed-off-by: NeilBrown <neilb@suse.de>
* | Release mdadm-3.0-devel3NeilBrown2009-03-109-7/+135
| |
* | Merge branch 'master' in devel-3.0NeilBrown2009-03-106-8/+65
|\|
| * Release mdadm-2.6.9NeilBrown2009-03-108-9/+64
| |
| * super1: make sure max_dev grows enough when adding a device to an array.NeilBrown2009-03-091-0/+3
| | | | | | | | | | | | | | | | | | | | There was a few kernel releases where the kernel would shrink max_dev to be just enough to hold the current number of devices. More recent kernels never shrink it. However to be as compatible as possible, if we notice that max_dev is too small to successfully add a device, increase it. Signed-off-by: NeilBrown <neilb@suse.de>
| * Monitor: send --test message for arrays in /proc/mdstat that aren't in ↵NeilBrown2009-02-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | mdadm.conf "mdadm --monitor --test --scan" currently only sends test messages for arrays listed on the command line or in /etc/mdadm.conf. With this patch it also reports on any active arrays, which is more in line with the description in the manpage. Thanks to Andrew Walrond <andrew@walrond.org> for reporting this error. Signed-off-by: NeilBrown <neilb@suse.de>
* | mdmon: allow incremental assembly of containers.NeilBrown2009-03-102-0/+22
| | | | | | | | | | | | | | | | If mdmon sees a device added to a container, it should assume it is a new spare. It could be a part of the array that just hadn't been assembled yet. So check first. Signed-off-by: NeilBrown <neilb@suse.de>
* | DDF: fix up container_contentNeilBrown2009-03-101-3/+4
| | | | | | | | | | | | | | If we haven't got hold of all the devices yet, we need to be ready to skip over some while gathering content information. Signed-off-by: NeilBrown <neilb@suse.de>
* | Assemble/container: catch errors when starting a partial container.NeilBrown2009-03-101-11/+21
| | | | | | | | | | | | | | | | | | | | | | If we are assembling an array in a container and it isn't complete enough to start yet, then - don't start mdmon - don't say the array is started - don't wait for the device to appear in /dev Signed-off-by: NeilBrown <neilb@suse.de>
* | Incremental/container: don't create when we should just be opening.NeilBrown2009-03-101-7/+10
| | | | | | | | | | | | | | When incr-assembling in a container, if the array already exists, don't try to create it again, just open it. Signed-off-by: NeilBrown <neilb@suse.de>
* | mdopen: be more careful when adding digit to names.NeilBrown2009-03-101-1/+1
| | | | | | | | | | | | | | | | If we need to add digits to a name to make it unique, but don't have to add '_', we need to avoid adding a digit immediately after a digit. So if the last character of the name is a digit, add the '_' anyway. Signed-off-by: NeilBrown <neilb@suse.de>
* | Incremental: fix some handling of trustworthy.NeilBrown2009-03-101-12/+14
| | | | | | | | | | | | | | | | | | | | | | 1/ if homehost matches, then we need to set trustworthy to 'LOCAL' 2/ if we decide to set trustworthy to 'METADATA' because we have to use the metadata version name, do that *after* we have checked if we are going to assemble within a container, as inside the container there could be different sources of names to use. Signed-off-by: NeilBrown <neilb@suse.de>
* | ddf: use better random number generation.NeilBrown2009-03-101-8/+15
| | | | | | | | | | | | use /dev/urandom rather than calls to 'random()' if possible. Signed-off-by: NeilBrown <neilb@suse.de>
* | Examine: add examine_export for ddf and avoid crashes.NeilBrown2009-03-092-1/+15
| | | | | | | | | | | | If the personality doesn't provide export_examine_super, don't crash. Signed-off-by: NeilBrown <neilb@suse.de>
* | ddf: fix memory corruption bug.NeilBrown2009-03-091-1/+1
| | | | | | | | | | When adding to a point, you don't need to multiple by the size of the pointer - C does that for you!
* | DDF: minor formatting improvementNeilBrown2009-03-091-1/+1
| | | | | | | | avoid long lines in --examine output
* | Support new raid6 layouts needed for DDFNeilBrown2009-03-094-21/+120
| | | | | | | | | | | | | | | | DDF raid6 layouts are subtly different from the standard 'md' layouts. From 2.6.30 the kernel knows about these. Teach mdadm about them, and also allow 'ddf' to set an appropriate default. Signed-off-by: NeilBrown <neilb@suse.de>
* | super1/examine: remove confusing information.NeilBrown2009-03-091-4/+21
| | | | | | | | | | | | | | | | | | The information about how slots and roles in the array lined up turned out to be confusing. So simplify it and one provide the interesting information. Signed-off-by: NeilBrown <neilb@suse.de>
* | super1 - do metadata IO in sector_size units.NeilBrown2009-03-091-7/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the sector size is > 512, we need to be more careful about alignment. The largest known sector size is 4096 and (fortunately) both the superblock and (in many cases) the bitmap are 4096-byte aligned. So there should be no data-overlap problems. The exception is when the bitmap is squeezed into the 3K after the superblock. This arrangement cannot currently be supported on 4K sector-size devices. Signed-off-by: NeilBrown <neilb@suse.de>
* | super0: Do all metadata IO with 4096byte alignmentNeilBrown2009-03-091-11/+14
| | | | | | | | | | | | | | | | | | .. because some devices (dasd) have 4096 byte sector size. As the superblock is 4096 bytes and the bitmap is in a 60K region, this is safe from any possible corruption. Signed-off-by: NeilBrown <neilb@suse.de>
* | Fix udev-rules for case where array isn't really there..NeilBrown2009-03-091-0/+1
| | | | | | | | | | | | See http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=b822542608326092e177fd1707ca7fb53b2846c4 Signed-off-by: NeilBrown <neilb@suse.de>
* | imsm: display supported chunk sizes in --detail-platformDan Williams2009-02-271-0/+17
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Incremental: honor --no-degraded to delay assemblyDan Williams2009-02-243-1/+10
| | | | | | | | | | | | | | | | | | | | Currently Incremental_container is being called after adding each disk. In the imsm case where spares are not tracked in the raid_disks field we can use --no-degraded to block premature assembly. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Incremental: fix 'name_to_use' in the container caseDan Williams2009-02-241-2/+9
| | | | | | | | | | | | | | | | | | Just like the Assemble case, default to the text_version of the container if another name is not specified. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | mdmon: update cmdline when scanningDan Williams2009-02-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Allows ps -ax | grep mdmon to show: mdmon md127 mdmon md126 ...rather than: mdmon /proc/mdstat mdmon /proc/mdstat Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | mdmon: man pageDan Williams2009-02-241-0/+138
| | | | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | mdmon: fix missed 'clean' eventDan Williams2009-02-241-28/+21
| | | | | | | | | | | | | | | | | | | | | | | | mdmon may miss events because it re-reads state after read_and_act. The additional read is used to determine dirty status before allowing a sigterm to proceed. Since read_and_act is in the best position to determine 'dirty' status and its return value is not used, modify it to return true if the array is dirty. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: auto layoutDan Williams2009-02-241-7/+103
| | | | | | | | | | | | | | | | | | | | | | | | In support of auto-layout: 1/ collect and merge all extents to find the largest common-start free region 2/ verify that we meet the "all volumes must use the same set of disks" 2/ mark the disks to be added in add_to_super_imsm_volume Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Create: fixup 'insert_point', dependent on 'subdevs', for auto-layoutDan Williams2009-02-241-1/+5
| | | | | | | | | | | | | | | | | | 'subdevs' is read from the container in the auto-layout case so reset subdevs dependent default values. 'insert_point' without this change is always 2 blocking creation of arrays with > 2 raid disks. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Create: wait_for container creationDan Williams2009-02-241-0/+1
| | | | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Manage: permit '--remove detached' for containersDan Williams2009-02-241-1/+8
| | | | | | | | | | | | | | | | Skip the unique holder check in the detached case... pretty sure no one is holding on to it if open() returns ENXIO. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | mdmon: record added disksDan Williams2009-02-241-2/+13
| | | | | | | | | | | | | | Prevent duplicate disks from being sent to the monitor thread. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | mdmon: fix removed disk handlingDan Williams2009-02-242-8/+11
| | | | | | | | | | | | | | | | Use SKIP_GONE_DEVS when reading the container, and correct some confused logic in manage_new(). Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | sysfs: allow sysfs_read to detect and drop removed disksDan Williams2009-02-244-24/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All operations that rely on loading from an existing container (like --add) will fail after a disk has been removed. Provide an option to skip missing / offline disks rather than abort. We attempt to do this in the load_super_{imsm,ddf}_all cases when mdmon is running i.e. we already have a consitent version of the metadata running in the system. Otherwise, we fail as normal and let the administrator fix up the container. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: retry load_imsm_mpb if we suspect mdmon has made modificationsDan Williams2009-02-241-3/+14
| | | | | | | | | | | | | | | | | | | | If the checksum verification fails and mdmon is running we retry the load to get a consistent snapshot of the mpb. Found by tests/08imsm-overlap. Signed-off-by: Dan Williams <dan.j.williams@intel.com>