summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release mdadm-3.0devel-3.0NeilBrown2009-06-0236-2180/+27
| | | | | | | | - remove lot of old 'ANNOUNCE' files - trim changelog - update version numbers Signed-off-by: NeilBrown <neilb@suse.de>
* Merge branch 'master' of git://github.com/djbw/mdadm into devel-3.0NeilBrown2009-06-021-6/+8
|\
| * imsm: kill "auto=" in brief_examine_super_imsmDan Williams2009-05-181-3/+2
| | | | | | | | | | | | | | | | | | The auto parameter is obsolete after kernel version 2.6.28 as all arrays are partitionable via block device extended minor support. Environments that requre the mdp style of array can always edit the configuration file to specify auto=mdp. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * imsm: fix num_domainsDan Williams2009-05-181-3/+6
| | | | | | | | | | | | | | | | | | The 'num_domains' field simply identifies the number of mirrors. So it is 2 for a 2-disk raid1 or a 4-disk raid10. The orom does not currently support more than 2 mirrors, but a three disk raid1 for example would increase num_domains to 3. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Merge branch 'master' into devel-3.0NeilBrown2009-06-022-8/+21
|\ \ | | | | | | | | | | | | | | | Conflicts: super0.c super1.c
| * | Monitor: support spare-group manipulation for 1.x metadata.NeilBrown2009-05-124-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | The code for moving spares around a spare-group currently only works for 0.90 metadata. Generalise it for 1.x metadata as well. Reported-by: "Garth Snyder" <garth@grsweb.us> Signed-off-by NeilBrown <neilb@suse.de>
| * | Ignore leading zeros in version number information.NeilBrown2009-05-121-3/+6
| | | | | | | | | | | | --detail sometimes generates leading zero which are just noise.
* | | Move WaitClean from Monitor.c to sysfs.cNeilBrown2009-06-023-105/+106
| | | | | | | | | | | | | | | | | | That way mdmon doesn't need to include Monitor.o Signed-off-by: NeilBrown <neilb@suse.de>
* | | Update copyright dates and remove references to @cse.unsw.edu.auNeilBrown2009-06-0228-146/+51
| | | | | | | | | | | | | | | | | | Also removed 'paper' addresses. Signed-off-by: NeilBrown <neilb@suse.de>
* | | Monitor: reduce default poll interval if mdstat is pollable.NeilBrown2009-06-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since 2.6.16, mdstat responds to select/poll. So in that case, increase the default poll interval to about 15 minutes. This ensures that the background load is insignificant. Signed-off-by: NeilBrown <neilb@suse.de>
* | | Monitor: don't get confused if utime is never set.NeilBrown2009-06-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | externally managed arrays do not (currently) cause utime in GET_ARRAY_INFO to be updated. So if it is zero, just assume the current time. This will cause GET_DISK_INFO to be called more often, but as we do the scan only every 60 seconds normally, a few extra syscalls isn't going to make a big difference. Signed-off-by: NeilBrown <neilb@suse.de>
* | | mdadm.8: Man page updatesNeilBrown2009-06-028-241/+481
| |/ |/| | | | | General review and update of mdadm.8
* | Release mdadm-3.0-rc1NeilBrown2009-05-117-5/+148
| |
* | Merge branch 'master' into devel-3.0NeilBrown2009-05-117-36/+39
|\| | | | | | | | | | | | | | | Conflicts: Build.c mdadm.c mdadm.h super1.c
| * re-add error checkNeilBrown2009-05-051-0/+5
| |
| * Fix gcc-4.4 compiler warning.NeilBrown2009-04-292-25/+22
| | | | | | | | | | | | | | | | | | Apparently the dereferencing of a type-punned pointer breaks strict aliasing rules. And we wouldn't want to do that. So just make a different array of the appropriate type and use memcpy. Resolves-Debian-bug: 505375 Signed-off-by: NeilBrown <neilb@suse.de>
| * Makefile: use $(CC) more consistently.NeilBrown2009-04-291-3/+3
| | | | | | | | | | Explicitly calling 'gcc' in some rules makes it hard to test with other compilers.
| * mdadm: allow build to use --sizePaul Clements2009-04-213-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables the --size parameter for build operations. Without this, if you have a raid1, for instance, where the 2 disks are not the exact same size, and you need to build the array but one of the disks is not available right at the moment (maybe it's USB and it's unplugged, or maybe it's a network disk and it's unavailable), then you have to play some weird games to get the array to size correctly (that is, to the size of the smaller of the two components or less). There may be other uses for this too... -- Paul Signed-off-by: NeilBrown <neilb@suse.de>
* | create_mddev: don't replace /dev/mdX with /dev/md/XNeilBrown2009-05-111-1/+4
| | | | | | | | | | | | | | | | If someone creates/assemble an array called "/dev/md0", don't force it to be "/dev/md/0". Doing so isn't really necessary and it likely to confuse people. Signed-off-by: NeilBrown <neilb@suse.de>
* | mapfile - when rebuilding, choose an appropriate name is none is found.NeilBrown2009-05-113-1/+155
| | | | | | | | | | | | | | | | When rebuilding the mapfile (mdadm -Ir), if not appropriate name is found in /dev/md/, try to find an appropriate name, either by looking in mdadm.conf or by using the name in the metadata. Signed-off-by: NeilBrown <neilb@suse.de>
* | Incr: use devname_matches to when looking in mdadm.conf for bitmap fileNeilBrown2009-05-111-1/+1
| | | | | | | | | | | | This is more likely to always do the right thing than a strcmp. Signed-off-by: NeilBrown <neilb@suse.de>
* | mapfile - Fix off-by-one error in RebuildMapNeilBrown2009-05-111-1/+1
| | | | | | | | | | | | | | "mdadm -Ir" would get the path for md0 wrong because it went looking for mdp(-1) by mistake. Signed-off-by NeilBrown <neilb@suse.de>
* | Fix printf compile warning.NeilBrown2009-05-111-1/+2
| | | | | | | | | | | | | | | | It always afters to cast big things to (unsigned long long) before printing as %llu - it seems there will always be one arch which has something to complain about .... Signed-off-by: NeilBrown <neilb@suse.de>
* | Incremental: fix uninitialised variable.NeilBrown2009-05-111-2/+2
| | | | | | | | | | | | | | st2 might not be initialised at this point. So use the more correct 'st'. Signed-off-by: NeilBrown <neilb@suse.de>
* | Incr: cope better with possibility that mp->path might be NULLNeilBrown2009-05-111-17/+17
| | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
* | mapfile: allow the path name to the device to be empty.NeilBrown2009-05-112-6/+10
| | | | | | | | | | | | | | Allowing an empty name and coping with it is less confusing than seeing "/empty" appear. Signed-off-by: NeilBrown <neilb@suse.de>
* | map_dev: prefer names in /dev/md/NeilBrown2009-05-111-14/+13
| | | | | | | | | | | | | | | | Rather than preferring non-standard names (of which there are many, like /dev/block/9:1), prefer names in /dev/md/ when finding the name of an md device. Signed-off-by: NeilBrown <neilb@suse.de>
* | udev-md-raid.rules: use string_escapeNeilBrown2009-05-111-2/+2
| | | | | | | | | | | | For safety, "MD_NAME" strings should be escaped in udev. Signed-off-by: NeilBrown <neilb@suse.de>
* | super1 - fix brief examine.NeilBrown2009-05-111-3/+3
| | | | | | | | | | | | We manage to lose some space here... Signed-off-by: NeilBrown <neilb@suse.de>
* | man pages: note that --auto is largely deprecated and irrelevant.NeilBrown2009-05-113-9/+16
| | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
* | Be more consistent about keeping the host: prefix on array names.NeilBrown2009-05-112-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | If an array name contains a "hostname:" prefix, then --assemble will tend to leave it there, while --incremental will strip it off (when chosing a device name during auto-assembly). Make this more consistent: strip the name off if we decide that the name will be treated as 'local'. Leave it on if it will be treated as 'foreign'. Signed-off-by: NeilBrown <neilb@suse.de>
* | config: enhance name matching in conf_get_ident.NeilBrown2009-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | Use when searching mdadm.conf for a device, use more flexible matching that e.g. ignores leading /dev/md/ or /dev/ As mdadm now accepts both "/dev/md/foo" and "foo" is many places as equivalent, they should compare as the same. Signed-off-by: NeilBrown <neilb@suse.de>
* | Allow homehost to be largely ignored when assembling arrays.NeilBrown2009-05-118-25/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If mdadm.conf contains HOMEHOST <ignore> or commandline contains --homehost=<ignore> then the check that array metadata mentions the given homehost is replace by a check that the name recorded in the metadata is not already used by some other array mentioned in mdadm.conf. This allows more arrays to use their native name rather than having an _NN suffix added. This should only be used during boot time if all arrays required for normal boot are listed in mdadm.conf. If auto-assembly is used to find all array during boot, then the HOMEHOST feature should be used to ensure there is no room for confusion in choosing array names, and so it should not be set to <ignore>. Signed-off-by: NeilBrown <neilb@suse.de>
* | util: fix test for text_versionNeilBrown2009-05-111-1/+4
| | | | | | | | | | | | | | | | as text_version is a char array (not a pointer), testing the address against NULL is the wrong thing to do. Test the content instead. Signed-off-by: NeilBrown <neilb@suse.de>
* | Assemble/Incr : minor tidy up of setting 'trustworthy'.NeilBrown2009-05-112-10/+6
| | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
* | config: allow Array line to contain array name without /dev/md/ prefix.NeilBrown2009-05-113-8/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For consistency with --create and --assemble, allow the array name given in mdadm.conf to exclude the "/dev/md/" prefix. So e.g. ARRAY home uuid=whatever is treated like ARRAY /dev/md/home uuid=whatever Also exclude names which create_mddev will reject. Signed-off-by: NeilBrown <neilb@suse.de>
* | Fix tests on ->container and ->memberNeilBrown2009-05-112-3/+3
| | | | | | | | | | | | | | | | For container= and member= to be effective in an mdadm.conf line they must both be present. So when checking for their absence we need container != NULL || member != NULL. Signed-off-by: NeilBrown <neilb@suse.de>
* | Make --brief even briefer.NeilBrown2009-05-117-23/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | Because ---examine --brief, or --detail --brief are often used to create mdadm.conf, and because people don't want to have to update their mdadm.conf unnecessarily, we don't want to include information that might change. And now that level changing is supported, that is almost everything but UUID. So move some more fields into the "Only print with --verbose" class. Signed-off-by: NeilBrown <neilb@suse.de>
* | mdadm.8 general updatesNeilBrown2009-05-111-42/+8
| | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
* | conf/assemble: new config line "auto".NeilBrown2009-05-116-3/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The line 'auto' in mdadm.conf can be used to disable assembly of specific metadata types, or of all arrays. This does not affect assembly of arrays listed in mdadm.conf or on command line. auto -all will disable all auto-assembly. auto -ddf will cause mdadm to ignore ddf arrays that are not explicitly mentioned, and auto assemble anything else it finds. Signed-off-by: NeilBrown <neilb@suse.de>
* | config: support "ARRAY <ignore> ..." lines in mdadm.confNeilBrown2009-05-116-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes we want to ensure particular arrays are never assembled automatically. This might include an array made of devices that are shared between hosts. To support this, allow ARRAY lines in mdadm.conf to use the word "ignore" rather than a device name. Arrays which match such lines are never automatically assembled (though they can still be assembled by explicitly giving identification information on the mdadm command line. Signed-off-by: NeilBrown <neilb@suse.de>
* | assemble: support arrays created with --homehost=anyNeilBrown2009-05-112-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | If an array is created with --homehost=any, then --assemble and --incremental will treat it as being local to 'this' host, no matter what the name of this host is. This is useful for array that will be given unique names and be moved between machines. This needs to be documented. Signed-off-by: NeilBrown <neilb@suse.de>
* | create_dev - allow array names like mdX and /dev/mdX to appear 'numeric'NeilBrown2009-05-111-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When choosing the minor number to use with an array, we currently base the number of the 'name' stored in the metadata if that name is numeric. Extend that so that if it looks like a number md device name (/dev/md0 or just md0 or even /dev/md/0), then we use the number at the end to suggest a minor number. The means that if someone creates and array with "--name md0" or even "--name /dev/md0" it will continue to do what they expect. Signed-off-by: NeilBrown <neilb@suse.de>
* | Wait for POLLPRI on /proc or /sys files.NeilBrown2009-04-143-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | From 2.6.30, /proc/mounts and various /sys files will probably always returns 'readable' to select, so we will need to wait on POLLPRI to get the 'new data is available' signal. When using select, this corresponds to an 'exception', so adjust calls to select accordingly. In one case we sometimes wait on a socket and sometime on /proc/mounts, so we need to test which. Signed-off-by: NeilBrown <neilb@suse.de>
* | Merge branch 'master' of git://github.com/djbw/mdadm into devel-3.0NeilBrown2009-04-147-54/+162
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Grow.c mdadm.h sysfs.c Due to independent fixes for the "mdadm hangs if reshape finishes too quickly" problem.
| * | mdmon: fix resync completion detectionDan Williams2009-04-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with 2.6.30 the md/resync_start attribute will no longer return a non-sensical number when resync is complete, instead it now returns 'none'. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | Grow: fix hang when reshape completes too fastDan Williams2009-04-123-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For short reshapes the kernel may be done before mdadm can check that progress has passed the critical section. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | RebuildMap: handle missing disksDan Williams2009-04-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | When rebuilding the map file tolerate missing/offline disks, otherwise we will segfault on the NULL return from sysfs_read. Reported-by: Jacek Danecki <jacek.danecki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: add the ddf fieldDan Williams2009-04-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This field is always one in arrays created by the Windows driver / OROM, not sure why... Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: round down array size at CreateDan Williams2009-04-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store the 1MB rounded down size of the array at create time. Signed-off-by: Dan Williams <dan.j.williams@intel.com>