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>
This commit is contained in:
Oleksandr Shchirskyi 2021-06-18 15:53:31 +02:00 committed by Jes Sorensen
parent 7d8935cbb0
commit 8d69bf147e
1 changed files with 2 additions and 1 deletions

View File

@ -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) {