29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
If a spare is added to fix a degraded raid5 array and the resync does not run,
|
|
the kernel probably still has it as a spare. The user should have the option to
|
|
remove this spare disk from the array.
|
|
|
|
Note: This patch should be applied on top of raid5_degrade_fix.patch:
|
|
http://evms.sourceforge.net/patches/2.5.5/engine/raid5_degrade_fix.patch
|
|
|
|
--- evms-2.5.5a/plugins/md/raid5_mgr.c 2006-05-10 11:33:10.173604904 -0500
|
|
+++ evms-2.5.5b/plugins/md/raid5_mgr.c 2006-05-10 11:27:27.348722208 -0500
|
|
@@ -3416,15 +3416,9 @@
|
|
/* Clear out the spare_disks list. */
|
|
EngFncs->delete_all_elements(spare_disks);
|
|
|
|
- /*
|
|
- * If there is only one spare and the array is in degrade mode, then
|
|
- * the spare cannot be removed.
|
|
- */
|
|
- if (vol->spare_disks <= 1) {
|
|
- if (vol->flags & MD_DEGRADED) {
|
|
- LOG_EXIT_INT(0);
|
|
- return 0;
|
|
- }
|
|
+ if ((vol->flags & MD_DEGRADED) && (vol->spare_disks > 0)) {
|
|
+ LOG_WARNING("%s is degraded, but there are %d spare disk(s).\n",
|
|
+ vol->name, vol->spare_disks);
|
|
}
|
|
|
|
LIST_FOR_EACH(vol->members, iter, member) {
|