summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleksandr Shchirskyi <oleksandr.shchirskyi@linux.intel.com>2021-06-18 15:53:31 +0200
committerJes Sorensen <jsorensen@fb.com>2021-07-16 10:25:22 -0400
commit8d69bf147ec77447c5d45c17bed7dc017808cc44 (patch)
treeccfbf03660ef38acdc9a2183b56cee247de19090
parent7d8935cbb0fdb2b776b736bffc00323a04e5f788 (diff)
downloadmdadm-8d69bf147ec77447c5d45c17bed7dc017808cc44.tar.gz
Remove Spare drives line from details for external metadata
Arrays with external metadata do not have spare disks directly assigned to volumes; spare disks belong to containers and are moved to arrays when the array is degraded/reshaping. Thus, the display of zero spare disks in volume details is incorrect and can be confusing. Signed-off-by: Oleksandr Shchirskyi <oleksandr.shchirskyi@linux.intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
-rw-r--r--Detail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Detail.c b/Detail.c
index cd26fb0f..ad56344f 100644
--- a/Detail.c
+++ b/Detail.c
@@ -548,7 +548,8 @@ int Detail(char *dev, struct context *c)
array.working_disks);
if (array.raid_disks) {
printf(" Failed Devices : %d\n", array.failed_disks);
- printf(" Spare Devices : %d\n", array.spare_disks);
+ if (!external)
+ printf(" Spare Devices : %d\n", array.spare_disks);
}
printf("\n");
if (array.level == 5) {