summaryrefslogtreecommitdiffstats
path: root/tests/03r5assemV1 (unfollow)
Commit message (Collapse)AuthorFilesLines
2010-06-30Support fail/remove using kernel nameNeilBrown1-20/+83
Allow kernel names like "sda" and "hdb1" to be used to fail/remove devices from an array. This is useful as after a device has been removed it can be difficult to get the major/minor number. Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-30Add mdstat_by_componentNeilBrown2-4/+65
This allows finding the array which contains a given component. Components are named using the kernel-internal string name such as "sda1" or "hdb". Don't return member arrays, only the contain that contains them. Also tidy up the parsing of 'inactive' arrays in /proc/mdstat. If we see 'inactive' we need to set 'in_devs' immediately as there is no level coming. Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-30Correct documentation for --rebuild-mapNeilBrown2-9/+9
In some places it is referred to as "--rebuild", and while that works due to getopt allowing prefixes, it could appear confusing (rebuild means other things too) and being explicit is some safeguard if we want to add e.g. --rebuild-foo later. Reported-by: Doug Ledford <dledford@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-29Fix parsing of inactive arrays in /proc/mdstatJeff DeFouw1-2/+3
They don't have a level, so we should not expect one, and should expect devices instead. Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-17Create: fix typo in RAID10 default layout message.NeilBrown1-1/+1
It reports "layout defaults to n1" but it means "... to n2". Reported-by: Adrian Sandor <aditsu@yahoo.com> Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-05mdadm.conf: fix AUTO typoNeilBrown1-1/+1
Reported-by: Marc Schiffbauer <marc@schiffbauer.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-31Fix man page reference to --level changes with --grow.NeilBrown1-2/+3
--level can be used with --grow now, so correct man page. Reported-by: "Leslie Rhorer" <lrhorer@satx.rr.com> Signed-off-by: NeilBrown <neilb@suse.de>
2010-05-31Compile-time switch to enable 0.9 metadata as defaultmartin f. krafft4-5/+27
This commit introduces DEFAULT_OLD_METADATA as a preprocessor definition. If defined, it causes mdadm to assume metadata version 0.9 as default. If not defined, version 1.x (currently 1.2) is used as default. The man page mdadm.8 is also modified to reflect the chosen default. The selftests will not work if the old default is chosen. This patch was requested by Debian so they could distribute a current mdadm together with boot loaders that only understand 0.90 metadata for md-raid. Preferred usage is simply make DEFAULT_OLD_METADATA=yes Signed-off-by: martin f. krafft <madduck@debian.org> Signed-off-by: NeilBrown <neilb@suse.de>
2010-05-31Revert change to handling of -empty-string- metadata.NeilBrown2-3/+3
If the metadata is an empty string, it means the array in question does not use metadata. This comes from sysfs_read finding "none" in "metadata_version", then super_by_fd noticing the vers == -1, and so just using the ->text_version (which is empty). In this case we want to use the super0 metadata handler routines because that is what we always used to do before commit 7d5c3964ccfaace123f7b75e15d38c2650e013d8 And that commit was wrong because "" doesn't mean "default" and so should not have been changed at the same time. Reported-by: martin f. krafft <madduck@debian.org> Signed-off-by: NeilBrown <neilb@suse.de>
2010-05-26imsm: robustify recovery-start detectionDan Williams1-0/+9
update_recovery_start() assumed that the out-of-sync disk would always be marked as IMSM_ORD_REBUILD in the disk_ord_tbl, but the segmentation fault reported by Andy proves otherwise. This might also be explained by an interrupted rebuild and the disk has not yet been marked missing. https://bugzilla.redhat.com/show_bug.cgi?id=592030 Reported-by: Andy Lutomirski <luto@mit.edu> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-05-26Revert "Incremental: honor --no-degraded to delay assembly"Dan Williams3-10/+1
This reverts commit fdb482f99b9ad2ef8cd1724902fdfeedaa8796a1. Now that containers can report state for ->container_enough we can automatically determine when the array can be started, and no longer need the --no-degraded hammer. Conflicts: Incremental.c Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-05-26Incremental: honor an 'enough' flag from external handlersDan Williams4-21/+92
This is needed for imsm where: 1/ we want to report raid_disks as zero to allow mdadm -As to incorporate all spares 2/ we can't determine stale disks by looking at the event counts. 3/ we can't see per-subarray expectations with the info returned from the container level ->getinfo_super() Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-05-18Monitor: don't report the disappearance of a faulty device as SpareActive.NeilBrown1-0/+1
Normally Monitor doesn't see faulty devices in active slots - they get moved away too quickly. But if it does, it reports the "faulty device disappeared" event (when it finally does get moved away) as SpareActive due to insufficient checking. So add a better check. Reported-by: Pierre Vignéras <pierre@vigneras.name>
2010-05-18Grow: move error message closer to error cause.NeilBrown1-7/+7
A recent change move the sysfs_read call away from the check that it succeeded. This patch moves the check back next to the sysfs_read call. Signed-off-by: NeilBrown <neilb@suse.de>
2010-05-18fix: memory leak in mdmon_pid()Przemyslaw Hawrylewicz Czarnowski1-1/+5
devnum2devname() returns pointer to memory allocated with strdup. It must be released to prevent memory leak. Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-04-29mdmon: fix missing open of md/<dev>/recovery_startDan Williams1-25/+19
When activating a spare we neglect to open recovery_start and as such do not see checkpoint events. Move disk initialization to common routine to mitigate recurrence. Reported-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-04-29Grow: avoid overflow of chunk sizes.NeilBrown1-24/+24
Chunks aren't particularly big, but when you could them in bytes and multiply them together (as we do for calculating the backup size for 'grow') they can overflow a 32bit int. So group the division by 512 more closely with the chunk size so were would need 30Meg chunks to come close to overflowing 32bits. Signed-off-by: NeilBrown <neilb@suse.de>
2010-04-29IMSM/DDF: don't recognised these metadata on partitions.NeilBrown4-0/+34
These metadata are not expected on partitions, and they have no way of differentiation whether which is correct if they are found both on the device and on the last partition. So if the device is a partition, refuse to read the metadata. Signed-off-by: NeilBrown <neilb@suse.de>
2010-04-19Create: cleanup after failed create in duplicated array member caseDan Williams5-8/+32
mdadm prevents creation when device names are duplicated on the command line, but leaves the partially created array intact. Detect this case in the error code from add_to_super() and cleanup the partially created array. The imsm handler is updated to report this conflict in add_to_super_imsm_volume(). Note that since neither mdmon, nor userspace for that matter, ever saw an active array we only need to perform a subset of the cleanup actions. So call ioctl(STOP_ARRAY) directly and arrange for Create() to cleanup the map file rather than calling Manage_runstop(). Reported-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-04-15Fixup default definitions of VAR_RUN and ALT_RUNDan Williams1-2/+2
I suspect commit c132678b wanted VAR_RUN and ALT_RUN to be suffixed by '/mdadm' to match the defaults in mdadm.h. Cc: Luca Berra <bluca@comedia.it> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2010-04-07powerpc compile fixDoug Ledford1-1/+1
Signed-off-by: Doug Ledford <dledford@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
2010-04-07Don't attempt to create or read bitmaps where the metadata doesn't support it.NeilBrown3-2/+16
In particular, if the relevant bitmap method is NULL, don't try to call it, print an error instead. Signed-off-by: NeilBrown <neilb@suse.de>