Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MD-RAID: list spare disks #92

Open
danboid opened this issue Feb 4, 2020 · 1 comment
Open

MD-RAID: list spare disks #92

danboid opened this issue Feb 4, 2020 · 1 comment

Comments

@danboid
Copy link

danboid commented Feb 4, 2020

It would be useful if the MD-RAID template reported the number of spare disks available.

@paraenggu
Copy link
Member

paraenggu commented Feb 7, 2020

Thanks for the input @danboid.

Do you have any suggestion on how to easily get the numbers of spare devices of a given MD RAID?

Each device has a state (/sys/block/<MD-NAME>/md/<RD-NAME>/state), which can be spare and is already available in the State of MD {#MD_RAID_RAID_DEV_NAME} RD {#MD_RAID_COMPONENT_DEV_NAME} device item.

However, there seems to be no single file within sysfs (/sys) which lists the number of spares, as it is the case for the number of degraded devices (/sys/block/<MD-NAME>/md/degraded).

One could write a custom user parameter which counts the number of spare drives with the help of a script or some shell tooling magic. But there might be a more elegant solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants