summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
| | | * Assemble: Only fail auto-assemble in face of mdadm.conf conflicts.NeilBrown2014-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should never auto-assemble things that conflict with mdadm.conf However explicit assembly requests should be allowed. Reported-by: olovopb Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1070245 Signed-off-by: NeilBrown <neilb@suse.de>
| | | * Grow: improve error message is "--grow -n2" used on Linear arrays.NeilBrown2014-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linear arrays don't respond to setting raid-disks, only to adding a device. Reported-by: mulhern Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1122146 Signed-off-by: NeilBrown <neilb@suse.de>
| | | * Grow: fix that preventing resize of array to 32bit size.NeilBrown2014-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the request --size to --grow an array to is 32bits (i.e. msb in bit 32) then mdadm make wrong choice and uses ioctl instead of setting component_size via sysfs and the change is ignored. This is fixed by using correct casts. Reported-and-tested-by: Killian De Volder <killian.de.volder@megasoft.be> Signed-off-by: NeilBrown <neilb@suse.de>
| | | * IMSM: move "validate_container_imsm" to be included in mdassemblePawel Baldysiak2014-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0c21b485e4beb7bcfe631412a231f7c1ea1067bc added new function in imsm superswitch. This function should be included in mdassemble. Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
| | | * Grow: Do not try to restart if reshape is runningPawel Baldysiak2014-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grow process did not check if reshape is already started when deciding about restarting. Sync_action should be checked in this case, and if reshape is running - restart flag should not be set. Otherwise, Grow process will fail to write data to sysfs, and reshape will not be continued. Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
| | | * IMSM: validate metadata_update size before using it.NeilBrown2014-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every case in prepare_update check that the size message size is sufficient, so process_update doesn't need to check anything. Reported-by: Vincent Berg <vberg@ioactive.com> Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: validate metadata_update size before using it.NeilBrown2014-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | process_update already checks update->len, for all but the 'magic', prepare_update doesn't at all. So add tests to prepare_update that we don't exceed the buffer. This will consequently protect process_update from looking for a 'magic' which isn't there. Reported-by: Vincent Berg <vberg@ioactive.com> Signed-off-by: NeilBrown <neilb@suse.de>
| | | * mdmon: allow prepare_update to report failure.NeilBrown2014-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If 'prepare_update' fails for some reason there is little point continuing on to 'process_update'. For now only malloc failures are caught, but other failures will be considered in future. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * IMSM: Add warning message when assemble spanned containerPawel Baldysiak2014-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to several changes in code assemble with disks spanned between different controllers can be obtained in some cases. After IMSM container will be assembled, check HBA of disks, and print proper warning if mismatch is detected. Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
| | | * mdmon: ensure Unix domain socket is created with safe permissions.NeilBrown2014-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the unlikely case that mdmon is started with an overly permissive umask, we don't want to risk giving away world acccess. All other "mkdir" and "O_CREAT" calls in mdmon and mdadm set a suitably restrictive permission mask. 'bind' don't take an explicit mask so it needs an implicit one. Reported-by: Vincent Berg <vberg@ioactive.com> Signed-off-by: NeilBrown <neilb@suse.de>
| | | * md.4: Make tables narrow enough to fit.NeilBrown2014-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If we use "Dev" instead of "Device" on the wide tables, they fit better. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * revised the documentation of RAID10 layoutsChristoph Anton Mitterer2014-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Completely revised the documentation of the RAID10 layouts, with examples for n2,f2,o2 with and odd and an even number of underlying devices. Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name> Signed-off-by: NeilBrown <neilb@suse.de>
| | | * Makefile: use "man -l" to format man pages.NeilBrown2014-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Formatting a man page is more than just "nroff -man". In particular, that doesn't invoke "tbl" when needed. So use "man -l" which performs correct formatting on a given file. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * mdadm.8: Fix typo in setting font.NeilBrown2014-07-03
| | | | | | | | | | | | | | | | | | | | | | | | \fP returns to previous font, not \fp. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * mdadm.8: Fix typo in "no-bbl".NeilBrown2014-07-03
| | | | | | | | | | | | | | | | | | | | | | | | The '\' comes before the '-', not after! Signed-off-by: NeilBrown <neilb@suse.de>
| | | * IMSM: use strcpy rather than pointless strncpy.NeilBrown2014-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As strncpy doesn't guarantee to nul-terminate, some static analysers get upset that it is followed by a 'strncat'. So just use a 'strcpy' - strlen(disk_by_path) is constant and definitely less than PATH_MAX. Link: https://github.com/neilbrown/mdadm/issues/4 Signed-off-by: NeilBrown <neilb@suse.de>
| | | * Grow: fix removal of line in wrong casePawel Baldysiak2014-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 18d9bcfa33939cee345d4d7735bc6081bcc409c8 removed wrong line (in case RAID0->RAID4). This patch corrects this mistake (line should be removed in case RAID4->RAID4). Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
| | | * Makefile: install mdadm-grow-continue@.serviceNeilBrown2014-06-10
| | | | | | | | | | | | | | | | | | | | | | | | Forgot to add this to install-systemd target Signed-off-by: NeilBrown <neilb@suse.de>
| | | * Release mdadm-3.3.1NeilBrown2014-06-05
| | | | | | | | | | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
| | | * Make sure "make everything" builds again.NeilBrown2014-06-05
| | | | | | | | | | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
| | | * Incremental: remove old devices when assembling in container.NeilBrown2014-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When assembling a native array we just give all devices to the kernel and leave it to discard the 'old' ones (based on sequence/event number). For external/container arrays, mdadm needs to do that. So in assemble_container_content, get list of current devices in array and discard any that aren't in the 'content' given. They must have been rejected by metadata manager. If we cannot discard old devices the array must already be active, so just leave it alone, but with a message. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * imsm: retry load_and_parse_mpb if we suspect mdmon has made modificationsArtur Paszkiewicz2014-06-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the checksum verification fails in mdadm and mdmon is running, retry the load to get a consistent snapshot of the mpb. Based on db575f3b Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
| | | * Grow: Do not fork via systemd if freeze_reshape is setBaldysiak, Pawel2014-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mdadm should not run 'grow-continue' unit file for container if '--freeze-reshape' argument is passed. Otherwise it will be ignored, and reshape will start anyway. Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
| | | * Grow: Use 'forked' also for reshape_container in Grow_continueBaldysiak, Pawel2014-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to commit 06e293d0970e36b1ed049b9d3ccb21a870e9d2eb same thing should be done for reshape_container in Grow_continue Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
| | | * Do not set default 'before.layout' when reshaping from RAID4 to RAID4Baldysiak, Pawel2014-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit fdcad551e9a54c4aa8c4b63160b76e2c539a0441 brings some changes to reshape process. Setting 'before.layout' when reshaping from RAID4 to another RAID4 is not really necessary. If reshape is restarted 'before.layout' will be compared with 'info->array.layout' in reshape_array(). Changes brought by mentioned commit will cause this comparation return as false, becouse 'array.layout' is always set to 'ALGORITHM_PARITY_N' in analyse_change() for RAID4, so reshape will not be continued after reboot/stop. This patch reverts unnecessary changes. Signed-off-by: Pawel Baldysiak pawel.baldysiak@intel.com Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
| | | * mdcheck: don't pass the '+' to "date".NeilBrown2014-05-26
| | | | | | | | | | | | | | | | | | | | | | | | It isn't needed, makes is harder to describe what --duration does. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: remove "BVD xx is missing".NeilBrown2014-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This can happen in normal cases during incremental assembly so printing an error message is confusing. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * install: use BINDIR consistently to locate mdadm and mdmonNeilBrown2014-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every place where the paths for mdadm or mdmon is explicit, it should use the BINDIR setting, not "/sbin/". Reported-by: member graysky <graysky@archlinux.us> (https://bugs.archlinux.org/task/37330) Signed-off-by: NeilBrown <neilb@suse.de>
| | | * mdcheck: new script to help with regular checks of md arrays.NeilBrown2014-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This script allows arrays to be 'checked' for a limited amount of time on a regular basis. For example, running mdcheck --duration 6hours early every Sunday morning and mdcheck --continue 6hours ever other morning will check all arrays every week, but if that take more than 6 hours, will won't run into the day, but will be continued the next morning, and the next ... etc. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * MISC: add --action option to set or abort check/repair.NeilBrown2014-05-22
| | | | | | | | | | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
| | | * --examine-bitmap: give useful message if no bitmap found on md array.NeilBrown2014-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bitmap is stored on member devices, not on the array, so --examine-bitmap should be given the member device. If --examine-bitmap is given an array, and it doesn't have a bitmap on it (i.e. it isn't a member of some other array), then that is probably a usage error, so print a helpful message. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * mdadm: Do not reimplment offsetofCristian Rodríguez2014-05-22
| | | | | | | | | | | | | | | | | | | | | | | | Proper implementations have offsetof in stddef.h Signed-off-by: NeilBrown <neilb@suse.de>
| | | * Grow: fix resent grow_continue breakage.NeilBrown2014-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5e76dce1acd906e8fc8af04973c3a129cdc77fd6 changed Grow_continue to assume a fork had already happened, so that mdadm --grow --continue didn't fork. This is good, but it means that if Grow_continue is run from Assemble, then mdadm --assemble .... can misbehave if the array was in the middle of a reshape. So introduce finer control. Grow_continue only assumes it has already forked if run from "mdadm --grow --continue". Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: remove some pointless code in validate_geometryNeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not sure what this was supposed to do, but it isn't needed as creating on a container and on individual devices (in a container) work fine already. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: remove a FIXME comment that doesn't seem to mean anything.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: remove 'FIXME' comment that doesn't need fixing.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears this is correct, though for consistency with elsewhere we check that pdnum is not negative. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: ensure dl->devname is freed when processing a 'delete device' update.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As this code runs in 'monitor' it cannot just free memory, it must add it to a list for 'manager' to free. Fortunate update->space_list exists for just this purpose. dl->devname might be small, so put it in update->space and put dl in update->space_list. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: remove old comment about looking for spares.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As handle_missing() sets ->check_degraded, nothing else needs to be done here. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: remove an old incorrect FIXME comment.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We mustn't close fds in write_init_super if ->update_tail was set. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: add data-offset information to --examine output.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Raid Devices[1] : 5 (4@20000K 3@20000K 2@0K 1@0K 0@0K) The data offsets are 200000K and 0K. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: split up ddf_process_updateNeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | Function was way too big, make several smaller functions. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * tests: handle change to DDF assembly.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a DDF array is assembled with missing devices, those devices are now alway marked as 'missing' and cannot just re-appear in the array and be working again. test must be changed to acknowledge this. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * tests: handle new raid10/ddf geometries.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent changes to support more ddf geometries using raid1e requires updates to tests. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: add support of --data-offset when creating array.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Infrastructure is there, so use it. This requires making sure that ->data_offset is correctly set, even for containers. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: factor out common code for search through extents.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each place the uses "get_extents" has slightly different search code to look through the result. Factor this out into a single find_space() function. This is will make it easier to add --data-offset support. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: allow for unused slots when creating map list for getinfo_super_ddf.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: DDF_Missing devices should not be reported as 'working' by ↵NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | getinfo_super_ddf Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: remove old and wrong comment about settinig raid_disk.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: provide simple detail_super() implementation.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | Just print the GUID, Seq and number of VDs in the container. Signed-off-by: NeilBrown <neilb@suse.de>
| | | * DDF: support more RAID10 levels.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DDF "RAID1E" level is similar to md "raid10". So use raid10 to support RAID1E, and create RAID1E for raid10 configs not already supported. Signed-off-by: NeilBrown <neilb@suse.de>