feat: expose MD raid component devices#674
Merged
SuperQ merged 7 commits intoprometheus:masterfrom Oct 25, 2025
Merged
Conversation
1ad0a36 to
dca5b72
Compare
Contributor
Author
|
@SuperQ can you have a look at this please? |
Contributor
|
I'm pretty sure this is already at least partially implemented by the mdraid sysfs parsing, https://pkg.go.dev/github.com/prometheus/procfs@v0.15.1/sysfs#Mdraid Drawing attention once again to prometheus/node_exporter#1085 - I really think it's time to mark the old |
Member
|
I agree, I think we should focus the effort on the sysfs |
Contributor
Author
|
@SuperQ can you please merge prometheus/node_exporter#3031 then - and I'll build on top of that to expose per-device state? |
Member
|
@robbat2 Sure, sounds good. |
Finomosec
reviewed
Oct 16, 2024
| Faulty: strings.Contains(match[3], "(F)"), | ||
| Spare: strings.Contains(match[3], "(S)"), | ||
| Journal: strings.Contains(match[3], "(J)"), | ||
| Replacement: strings.Contains(match[3], "(R)"), |
Closed
Member
|
This needs a rebase. |
Note: rebased on top of master for reformatting Signed-off-by: Singee <git@singee.me> Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>
Note: rebased on top of master for reformatting Signed-off-by: Singee <git@singee.me> Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>
Note: rebased on top of master for reformatting Signed-off-by: Singee <git@singee.me> Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>
Signed-off-by: Singee <git@singee.me>
Expose what component devices are part of a MD raid device, as well as the most common flags per-component. This will enable a future node_exporter metric showing which component of a RAID had failed. Signed-off-by: Robin H. Johnson <robbat2@orbis-terrarum.net> Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>
dca5b72 to
22c345a
Compare
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Contributor
Author
Done |
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
sklyfr
reviewed
Jul 10, 2025
Comment on lines
+46
to
+49
| // Some additional flags that are NOT exposed in procfs today; they may | ||
| // be available via sysfs. | ||
| // In_sync, Bitmap_sync, Blocked, WriteErrorSeen, FaultRecorded, | ||
| // BlockedBadBlocks, WantReplacement, Candidate, ... |
discordianfish
approved these changes
Sep 17, 2025
SuperQ
approved these changes
Oct 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose what component devices are part of a MD raid device, as well as the most common flags per-component. This will enable a future node_exporter metric showing which component of a RAID had failed.
This PR builds up top of PR 505, implementing the requested changes to detect the known RAID types on a given system.
Reference: #505
Signed-off-by: Robin Johnson robbat2@orbis-terrarum.net