summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
| * 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>
| * DDF: explain why spare_refs are ignored.NeilBrown2014-05-21
| | | | | | | | Signed-off-by: NeilBrown <neilb@suse.de>
| * DDF: use array_size from metadata.NeilBrown2014-05-21
| | | | | | | | | | | | | | If some other controller sets a number smaller than a calculation would give us, we really should honour it. Signed-off-by: NeilBrown <neilb@suse.de>
| * DDF: set utime for container from timestamp is superblock.NeilBrown2014-05-21
| | | | | | | | | | | | Also be more consistent about setting events from seq in superblock. Signed-off-by: NeilBrown <neilb@suse.de>
| * DDF: don't assume the anchor is fully up-to-date.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | We currently copy the anchor to both primary and secondary blocks. This assumes that the anchor is uptodate, but it might not be. We should trust the 'active' block and copy from there. Signed-off-by: NeilBrown <neilb@suse.de>
| * DDF: update timestamp/seqnum for virtual disks when config changes.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | - we weren't updating this timestamp at all - the 'vd_config' seqnum was updated on every write of the metadata, which is excessive. Just update it when there is a change. Signed-off-by: NeilBrown <neilb@suse.de>
| * DDF: update timestamp in DDF header.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | Doco says: Header update timestamp. MUST be set when the DDF header is updated. So I guess we should. Signed-off-by: NeilBrown <neilb@suse.de>
| * DDF: avoid ref outside array in getinfo_super_ddf_bvdNeilBrown2014-05-21
| | | | | | | | | | | | | | | | As we are range-checking 'cd', there is a chance that it is not in-range. In that case we should include all array indexes with 'cd' inside the range-tested branch. Signed-off-by: NeilBrown <neilb@suse.de>
| * DDF: examine_pds to also list devices that aren't in the metadata.NeilBrown2014-05-21
| | | | | | | | | | | | | | | | The phys disks table should list all disks, but if the metadata is corrupt, it might not even list the disk it was read from. So check for and report any known disks that aren't listed. Signed-off-by: NeilBrown <neilb@suse.de>
| * DDF: fix usage of ->used_pdesNeilBrown2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | The "used_pdes" value counts the number of physdisk entries that are in used. It may not be the last one in use as there may be unused slots in the middle. So when were are iterating over phys disks, we need to use max_pdes and skip unused entries. Signed-off-by: NeilBrown <neilb@suse.de>