summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* imsm: fix create by mdmon-updateDan Williams2008-08-121-3/+3
| | | | | | | imsm_dev dynamically grows, so dev_idx needs to be moved up in the definition to avoid getting clobbered. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: write_super return 0 on successDan Williams2008-08-121-5/+5
| | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: update mpb_size in write_super_imsmDan Williams2008-08-121-0/+5
| | | | | | | With dev->vol.map and mpb->disk entries entering and leaving the parameter block write_super_imsm needs to update the size before writeback. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* mdmon: use activate spare for re-addDan Williams2008-08-122-92/+139
| | | | | | | | | Disks that are not in-sync or failed are not assembled into member arrays by mdadm. Teach mdmon to resolve this situation by checking for spares at start. imsm_activate_spare() is updated to prefer devices that can be re-added versus new spares. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: fix handling of the 'migr_state' and 'migr_type' bitsDan Williams2008-08-121-23/+54
| | | | | | | | The option-rom and the Matrix driver mark resyncs/rebuilds with the migrate state bits. Update sizeof_imsm_dev to allow allocation of imsm_dev entries large enough to grow if migr_state is later set. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: add get_imsm_map and sizeof_imsm_mapDan Williams2008-08-111-37/+41
| | | | | | retrieve map entries from a imsm_dev, and cleanup imsm_copy_dev Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: drop 'external' from imsm_examine_briefDan Williams2008-08-111-4/+1
| | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: ensure 'usable' remains clear until the disk is in_syncDan Williams2008-08-111-1/+7
| | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: spare devices are represented as single disk containersDan Williams2008-08-091-116/+221
| | | | | | | | | | | | | | This poses a small problem for the case of handling multiple raid1 arrays across separate disk pairs i.e. 2 mirrors on 4 disks. The option-ROM will configure this as two containers. We may need the capability for one container to ask for an unused spare in another container. For now spares will just maintain the affinity established at assemble time. To support this configuration spare devices must be allowed to be assembled into the container even though the metadata indicates the disk belongs to a different family. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* imsm: store imsm_disk entries in the super->disks listDan Williams2008-08-091-56/+25
| | | | | | | removes the need to lookup the disk by index in a few cases and is a preparation step for tracking spares outside the current anchor. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* mdmon: use 'recover' instead of 'repair' when activating a spareDan Williams2008-08-071-1/+1
| | | | | | | Repair sets MD_RECOVERY_REQUESTED in md which may not result in the spare device being recovered. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* Merge branch 'devel' of ↵NeilBrown2008-08-072-33/+137
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm into dan
| * imsm: bad block management (phase1)Jacek Danecki2008-08-061-4/+74
| | | | | | | | | | | | | | | | | | | | | | This is the initial defensive implementation of bad block management support. It simply precludes assembly if there are entries in the bad block logs. This is sufficient for now as the conditions that lead to an entry in the bad block log would cause the array to be failed by MD (as of 2.6.27). [dan.j.williams@intel.com: general cleanups] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * imsm: do not mark arrays 'clean' if resync still in progressDan Williams2008-08-061-5/+13
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * imsm: raid5 layout is left-asymmetricDan Williams2008-08-061-1/+1
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * mdmon: ignore inactive arrays and other manage_new() cleanupsDan Williams2008-08-041-23/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While mdadm is constructing an array mdmon may see an intermediate state (some disks not yet added / redundancy attributes like sync_action not available). Waiting for mdstat->active == true ensures that the array is ready to be handled. This fixes a bug in create array via mdmon update whereby failures are not detected in the new array. Introduce aa_ready() to catch cases where the active_array is not correctly initialized. Barring a kernel bug this should never trigger, nonetheless it precludes a class of bugs like the one mentioned above from triggering. Cleanup the exit paths and only call replace_array when the new array is ready to be inserted into container->arrays. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Merge branch 'master' into from-stableNeilBrown2008-08-0718-62/+147
|\ \ | |/ |/| | | | | | | | | Conflicts: Create.c Manage.c
| * Cosmetic cleanup of some messages.NeilBrown2008-08-013-5/+7
| | | | | | | | | | | | | | | | e.g. --raid-disks is preferred over --raid-devices. Thanks to "Jon Nelson" <jnelson-linux-raid@jamponi.net> Signed-off-by: NeilBrown <neilb@suse.de>
| * Clean up usage of open()Doug Ledford2008-07-247-9/+9
| | | | | | | | | | | | | | | | Fix on call that passed an invalid mode to open Don't pass a third arg unless we also pass O_CREAT Use symbolic args for 2nd and 3rd args Signed-off-by: Doug Ledford <dledford@redhat.com>
| * Add support for distribution specific build extensionsDoug Ledford2008-07-241-0/+6
| | | | | | | | Signed-off-by: Doug Ledford <dledford@redhat.com>
| * Fix confusing usage in md.4 man page.Neil Brown2008-07-081-1/+1
| | | | | | | | | | | | "degraded write performance" could be confused with "write performance when degraded". It really means "reduced write performance", so say that.
| * Describe the HOMEHOST entry in the mdadm.conf man page.Neil Brown2008-07-071-0/+18
| |
| * Some more cleanup of tests.Neil Brown2008-06-273-8/+9
| | | | | | | | | | Don't use '$mdadm', just 'mdadm'. And --stop all arrays when finished.
| * Add test for stoping and restarting a raid5 reshape.Neil Brown2008-06-273-5/+42
| | | | | | | | | | There was a kernel bug with stopping and restarting raid5 recently. So add a test to check for it.
| * Add "bitmap=" to "--detail --brief" output when relevant.Neil Brown2008-06-261-0/+8
| | | | | | | | | | | | Thanks to "Jon Nelson" <jnelson-linux-raid@jamponi.net> for the suggestion. Signed-off-by: Neil Brown <neilb@suse.de>
| * Improve error message when mdadm fails to stop an array.Neil Brown2008-06-261-1/+6
| | | | | | | | Signed-off-by: Neil Brown <neilb@suse.de>
| * Couple more man page fixesNeil Brown2008-06-261-2/+2
| | | | | | | | Signed-off-by: Neil Brown <neilb@suse.de>
| * Add text to man pages suggesting partition type to use for version 1.x metadata.Pascal Charest2008-06-261-0/+8
| | | | | | | | Signed-off-by: Neil Brown <neilb@suse.de>
| * Italic/bold fixes in man pages.Neil Brown2008-06-262-35/+35
| | | | | | | | | | | | | | | | Two places that should have been .B or .I were .M, which of course is an error. So fix these and that the opportunity to be more consistent with highlighting of "mdadm". Make it always italic except when used as a literal example, then bold.
* | imsm: trim some memory wastageDan Williams2008-07-251-4/+16
| | | | | | | | | | | | | | drop the previously loaded data as load_imsm_super_all loops through the disks. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: refactor mpb handling into parse and coalesceDan Williams2008-07-251-117/+241
| | | | | | | | | | | | | | | | | | Maintaining a single global buffer is unwieldly when extending/rewriting sections of the metadata. Parse the metadata into component data structures upon reading and coalesce to a coherent buffer before writing. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | mdmon: don't fork if DEBUGDan Williams2008-07-241-16/+32
| |
* | imsm: use component_size not total array size in container_content_imsmDan Williams2008-07-241-6/+1
| | | | | | | | | | | | Also kill setting ->array.size as nothing appears to be using it. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: take chunksize into account when calculating blocks_per_memberDan Williams2008-07-241-1/+6
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | sysfs: deprecate sysfs_disk_to_sgDan Williams2008-07-243-13/+3
| | | | | | | | | | | | | | | | | | | | The cmd_filter patch merged for 2.6.27 broke retrieving the serial number via an ioctl to /dev/sgN. In debugging this I found that other utilities like sdparm simply run the ioctl on /dev/sdX. So just convert to that for protection in numbers, but scream on the mailing list for the inconvenience grr... Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: fix store_zero_imsm breakage from posix_memalign conversionDan Williams2008-07-241-2/+2
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: debug environment variable to use 'device name' as 'serial number'Dan Williams2008-07-241-3/+46
| | | | | | | | | | | | Facilitate using loopback devices for the imsm regression suite Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: allow --examine to succeed with damaged metadataDan Williams2008-07-241-2/+15
| | | | | | | | | | | | limp along after seeing mismatched serial numbers Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: handle degraded->normal transitions in set_diskDan Williams2008-07-242-6/+16
| | | | | | | | | | | | | | Removes the need for the call to ->set_array_state when sync_action transitions from 'recover' to 'idle'. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: create array via update to mdmonDan Williams2008-07-241-1/+168
| |
* | install mdmon to the same location as mdadmJacek Danecki2008-07-211-1/+2
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: remove some castsDan Williams2008-07-211-3/+3
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: activate_spare: fix handling of data_offsetDan Williams2008-07-211-9/+14
| | | | | | | | | | | | | | Neil rightly points out that imsm_activate_spare may skip valid free space on a spare, fix this up. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Document MDADM_NO_MDMONDan Williams2008-07-181-0/+10
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Documentation fixup for stripe_cache_sizeDan Williams2008-07-181-6/+9
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Document preread_bypass_thresholdDan Williams2008-07-181-0/+9
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | msg: add a timeout to ping_monitorNeilBrown2008-07-181-2/+2
| | | | | | | | | | | | | | Though it should never bee needed, having a timeout in ping_monitor is a sensible safeguard. Signed-off-by: Neil Brown <neilb@suse.de>
* | monitor: call get_resync_start on array shutdown.NeilBrown2008-07-181-0/+1
| | | | | | | | | | | | | | | | If the array is shutdown as soon as resync finishes, we might not notice the resync finish. So on array shutdown, check for current resync pos. Signed-off-by: Neil Brown <neilb@suse.de>
* | Manage: sync with mdmon before stopping containers.NeilBrown2008-07-181-0/+9
| | | | | | | | | | | | | | mdmon sometimes opens the container. That will prevent 'stop' from working. So sync with mdmon first. Signed-off-by: Neil Brown <neilb@suse.de>
* | Manage: fixed some error message in --stopNeilBrown2008-07-181-6/+11
| | | | | | | | | | | | | | Explain the meaning of 'quiet' explicitly, and fix some grammar and formatting. Signed-off-by: Neil Brown <neilb@suse.de>