summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | imsm: cleanup print_imsm_dev()Dan Williams2009-12-121-9/+10
| | | | | | | | | | | | | | | | | | | | | When printing the migration state there is no need to print "migrating". The fact that the state is non-idle should be enough indication. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | util: fix devnum2devname for devnum == 0Dan Williams2009-12-121-1/+1
| | | | | | | | | | | | | | | | | | devnum 0 is md0 no md_d-1 Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: fix thunderdome segfaultDan Williams2009-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disk_list_get() can return NULL if: 1/ A formerly missing disk is re-added 2/ The original array has not been rebuilt, so the family number of the missing disk still matches 3/ The metadata record of the in-sync disks are read before the missing disk This will result in the missing disk not adding its own serial number to the disk_list, only its truncated value will be present. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: fix spare promotionDan Williams2009-12-101-0/+1
| | | | | | | | | | | | | | | | | | | | | When associating a spare take on the target's metadata version number to satisfy future compare_super checks. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: honor orom constraints for auto-layoutDan Williams2009-12-101-19/+33
| | | | | | | | | | | | | | | | | | | | | | | | Factor out the orom checking bits to validate_geometry_imsm_orom() and share it between validate_geometry_imsm_volume() and the entry path to reserve_space(). Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * | imsm: catch attempt to auto-layout zero-length arraysDan Williams2009-12-011-9/+12
| |/ | | | | | | | | | | | | | | | | | | When -z is omitted reserve_space() looks to satisfy a zero length allocation which lo and behold is equal to the amount of free space on a full disk. So, catch maxsize == 0 and simplify the return value from merge_extents() to always equal amount of free space (no benefit to having a special case ~0ULL == error). Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DDF: fix incorrect header magic number.NeilBrown2009-12-301-1/+1
| | | | | | | | | | I was using the wrong magic number when creating an array. Signed-off-by: NeilBrown <neilb@suse.de>
* | Don't attempt a re-add if the device is marked as faulty.NeilBrown2009-12-081-1/+4
| | | | | | | | | | | | | | | | If a device is marked as faulty, then a re-add will cause it to be added as a faulty drive, which is not what it wanted. So just refuse to try to re-add a device which is marked 'faulty'. Signed-off-by: NeilBrown <neilb@suse.de>
* | Check partition tables when creating array.Trela, Maciej2009-12-083-3/+191
| | | | | | | | | | | | | | When creating an array, check if the devices have partition tables and print a warning if the table or the partitions might be destroyed by array creation. Signed-off-by: NeilBrown <neilb@suse.de>
* | Grow: be more careful when using array.sizeNeilBrown2009-11-261-8/+14
|/ | | | | | | | As array.size is 32bit we need to prefer the 'component_size' read from sysfs when that is available. Grow wasn't always suitably careful. Signed-off-by: NeilBrown <neilb@suse.de>
* Grow: avoid truncation error when checking size of array.NeilBrown2009-11-261-1/+1
| | | | | | | | | | array.size is only 32bit so it is not safe to multiply it up before casting to (long long). Actually, we shouldn't be using array.size here at all, but that will get fixed in a subsequent patch. Reported-by: Andrew Burgess <aab@cichlid.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Various fixes for --killNeilBrown2009-11-245-11/+20
| | | | | | | | | - When --kill-superblock is used with --metadata, find every different superblock if there are several and kill them all. - When creating a new array, kill off any old metadata. The code to do this was already present but has become broken over time. Signed-off-by: NeilBrown <neilb@suse.de>
* Release mdadm-3.1.1NeilBrown2009-11-198-5/+54
| | | | bugfix over 3.1, but changes to some significant defaults.
* Merge branch 'master' into devel-3.1NeilBrown2009-11-192-7/+7
|\
| * vol_id was removed by the udev upstream maintainer in May 2009.Marco d'Itri2009-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | One should use /sbin/blkid -o udev -p ... (from util-linux >> 2.16) instead of vol_id --export ... Author: Marco d'Itri <md@linux.it> Bug-Debian: http://bugs.debian.org/541884 Reviewed-by: martin f. krafft <madduck@debian.org> Signed-off-by: NeilBrown <neilb@suse.de>
| * Remove bogus warnings from man page.NeilBrown2009-10-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LANG=C man --warnings -l mdadm.8 > /dev/null complains that '.XX' is an invalid macro. This is not correct. The sequence .ig XX anything can go here .XX is correct and is ignored (see 'info groff' and the 'ig' index entry). However the same can be achieved with .ig anything can go there .. and this produces no warnings, so use that instead. Signed-off-by: NeilBrown <neilb@suse.de>
* | Assemble: fix testing of 'verbose' flag.NeilBrown2009-11-191-2/+2
| | | | | | | | | | | | | | The 'verbose' flag can be negative, meaning 'quiet'. So never check for != 0. Signed-off-by: NeilBrown <neilb@suse.de>
* | Create: warn when creating a raid1 using default metadata.NeilBrown2009-11-191-0/+11
| | | | | | | | | | | | | | | | As a some/most bootloaders don't understand md metadata, it might be difficult to boot off an array with the default 1.0 metadata. So if this is used for a RAID1, ask for confirmation. Signed-Off-By: NeilBrown <neilb@suse.de>
* | Don't silently map --re-add to --addNeilBrown2009-11-171-0/+6
| | | | | | | | | | | | | | | | | | As --add can destroy important data on a disk, and --re-add is not suppose to, it is wrong to silently try --add if --re-add fails. So print a message and abort instead. Signed-off-by: NeilBrown <neilb@suse.de>
* | Improve error messages when metadata handler does not support request.NeilBrown2009-11-175-10/+33
| | | | | | | | | | | | | | | | | | ->validate_geometry is called to validate overall parameters, and to validate each individual device. If it ever fails, it needs to report the reason, as common code cannot possible know. Signed-off-by: NeilBrown <neilb@suse.de>
* | Set default bitmap-chunksize for internal bitmaps to at least 64MegNeilBrown2009-11-1713-17/+27
| | | | | | | | | | | | | | | | | | A small bitmap-chunksize hurts performance without helping resync speed much - particularly on internal bitmaps. So set the default to at least 64Meg. Signed-off-by: NeilBrown <neilb@suse.de>
* | Grow: various fixes to recent breakages.NeilBrown2009-11-171-5/+8
| | | | | | | | | | | | | | - I forgot to write the send backup-super-block on spares. - I wasn't adding the data_offset to an offset Signed-off-by: NeilBrown <neilb@suse.de>
* | Change default metadata from 0.90 to 1.1NeilBrown2009-11-1735-97/+106
| | | | | | | | | | | | | | | | | | 1.1 is more flexible in a number of ways and is safer. 0.90 is still fully supported. 1.0 should possibly be used for RAID1 arrays that you want to boot off, depending on your boot loader. Signed-off-by: NeilBrown <neilb@suse.de>
* | Increase default chunk size to 512KNeilBrown2009-11-1720-41/+51
| | | | | | | | | | | | | | | | | | | | | | This seems more appropriate for current (and recent) model drives than 64K. 64K is still the default for '--build' as changing that could corrupt data. 64K is also the default rounding for 'linear' on kernels older than 2.6.16. Signed-off-by: NeilBrown <neilb@suse.de>
* | Replace all relevant occurrences of -4 with LEVEL_MULTIPATHNeilBrown2009-11-173-7/+7
| | | | | | | | | | | | Also -1 -> LEVEL_LINEAR. Signed-off-by: NeilBrown <neilb@suse.de>
* | Assemble/super0: allow non-in-sync devices to be assembled without complaint.NeilBrown2009-11-171-1/+8
| | | | | | | | | | | | | | | | Other metadata formats already did not worry about whether 'sync' was missing or not. super0 needs that now, but only for 0.91 metadata that is undergoing reshape. Signed-off-by: NeilBrown <neilb@suse.de>
* | Assemble: include ACTIVE but not in-sync devices as non-spares.NeilBrown2009-11-174-4/+4
| | | | | | | | | | | | | | | | | | Previously such things did not exist: ACTIVE and SYNC were either both set or both clear. Recent changes with reshape means that a device can be ACTIVE but not yet fully in-sync, so they need to be handled and included in the array as active devices. Signed-off-by: NeilBrown <neilb@suse.de>
* | Grow: data_offset is in sectors, offsets[] is in bytes - convertNeilBrown2009-11-161-1/+1
| | | | | | | | | | | | Another missed sectors->bytes conversion. Signed-off-by: NeilBrown <neilb@suse.de>
* | Grow: do not allow size changes with other changes.NeilBrown2009-11-062-0/+18
| | | | | | | | | | | | | | | | | | | | | | A change the reduces the size of an array always happens before any other change. So it can cause data to be lost. By themselves these changes are reversible. But once another change has started, the data would be permanently lost. So recommend data integrity be checked between a size change and any other change. Signed-off-by: NeilBrown <neilb@suse.de>
* | Grow: goto release rather than just returnNeilBrown2009-11-061-4/+8
| | | | | | | | | | | | otherwise we exit with the array frozen. Signed-off-by: NeilBrown <neilb@suse.de>
* | Grow: restrict to 2.6.32NeilBrown2009-11-061-0/+6
| | | | | | | | | | | | | | | | | | 2.6.31 has a bug which can lead to unsafe reshaping. So only allow a reshape with 2.6.32. When the required fixed get into 2.6.31.y, this can be relaxed slightly Signed-off-by: NeilBrown <neilb@suse.de>
* | Grow: use large block count and make sure stripe cache can hold it.NeilBrown2009-11-061-7/+27
| | | | | | | | | | | | | | | | The bigger the backup is, the fast it goes to some extend. 16Meg is fairly arbitrary Signed-off-by: NeilBrown <neilb@suse.de>
* | Grow: get component_size before using it.NeilBrown2009-11-061-4/+5
| | | | | | | | | | | | | | | | We were using ->component_size while it hadn't been set. This effectively meant that 'blocks' wasn't multiplied by 16 and reshape was even slower than it should have been. Signed-off-by: NeilBrown <neilb@suse.de>
* | Grow: handle array going degraded during reshape.NeilBrown2009-11-061-6/+35
| | | | | | | | | | | | | | | | If an array goes degraded during reshape, we need to adjust the devices we read from so as not to back up stale data. Signed-off-by: NeilBrown <neilb@suse.de>
* | Grow: restore backup to proper location.NeilBrown2009-11-061-2/+2
| | | | | | | | | | | | | | | | | | | | The 'arraystart' is in sectors while restore_stripes requires bytes, so we need a conversion. Without this, backups get restored to the wrong offset. Reported-by: "KueiHuan Chen" <kueihuan.chen@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
* | Detail: report new-layout for RAID6 arraysNeilBrown2009-10-291-0/+5
| | | | | | | | | | | | We were only reporting it for RAID5 and RAID10. Signed-off-by: NeilBrown <neilb@suse.de>
* | Release 3.1NeilBrown2009-10-228-5/+52
| | | | | | | | | | | | New functionality in --grow. Signed-off-by: NeilBrown <neilb@suse.de>
* | Merge branch 'master' into devel-3.1NeilBrown2009-10-228-5/+49
|\|
| * Release 3.0.3NeilBrown2009-10-228-5/+49
| | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
* | Merge branch 'master' into devel-3.1NeilBrown2009-10-2220-316/+869
|\|
| * Free some malloced memory that wasn't being freed.NeilBrown2009-10-223-2/+8
| | | | | | | | | | | | | | | | | | | | As mdadm is normally a short-lived program it isn't always necessary to free memory that was allocated, as the 'exit()' call will automatically free everything. But it is more obviously correct if the 'free' is there. So this patch add a few calls to 'free' Signed-off-by: NeilBrown <neilb@suse.de>
| * super-intel: Fix compilation of mdassemble.NeilBrown2009-10-201-1/+7
| | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
| * testreshape5 fixes.NeilBrown2009-10-201-1/+2
| | | | | | | | | | | | We seem to need a 'udevadm settle', and possibly the 'sync'.. Signed-off-by: NeilBrown <neilb@suse.de>
| * tests/imsm: allow for rounding of array size.NeilBrown2009-10-202-0/+8
| | | | | | | | | | | | | | IMSM rounds array size to a multiple of 1024K, so our tests must assume this. Signed-off-by: NeilBrown <neilb@suse.de>
| * mdopen: only use 'dev' as chosen name if it is a full path.NeilBrown2009-10-191-2/+1
| | | | | | | | | | | | | | Otherwise using names like "r0" causes problem. They are handled sufficiently by other paths in the code. Signed-off-by: NeilBrown <neilb@suse.de>
| * Assemble: handle container members betterNeilBrown2009-10-191-0/+18
| | | | | | | | | | | | | | When looking for a specific member, don't accept a different member, but step on to the next one. Signed-off-by: NeilBrown <neilb@suse.de>
| * Assemble: print verbose messages when finding members in containersNeilBrown2009-10-191-0/+6
| | | | | | | | | | | | .. so that "-Av" gives more hints at what is going on. Signed-off-by: NeilBrown <neilb@suse.de>
| * Detail: list containers before members.NeilBrown2009-10-191-0/+8
| | | | | | | | | | | | | | To allow "--assemble --scan" to have a chance, list containers before members in --detail --scan output. Signed-off-by: NeilBrown <neilb@suse.de>
| * test/ddf: don't insist that mdadm.conf is always in the same order.NeilBrown2009-10-191-4/+4
| | | | | | | | | | | | | | When created by different process, the order could reasonably be different. So sort before compare Signed-off-by: NeilBrown <neilb@suse.de>
| * test/raid6integ: correct typeNeilBrown2009-10-191-2/+2
| | | | | | | | | | | | ddf-zero-restart was misspelled. Signed-off-by: NeilBrown <neilb@suse.de>