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

Added DisksRecovering #676

Closed
wants to merge 1 commit into from
Closed

Conversation

Finomosec
Copy link

@Finomosec Finomosec commented Oct 16, 2024

Hi,

after running mdadm --replace /dev/sdb1 --with /dev/sdk1 the output of cat /proc/mdstat looks like this:

Personalities : [raid6] [raid5] [raid4] [raid0] [raid1] [raid10]
md0 : active raid5 sdk1[6](R) sdf1[5](S) sdg1[4] sdc1[2] sde1[1] sdb1[0]
      14650718208 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]
      [>....................]  recovery =  1.4% (72694748/4883572736) finish=1601.3min speed=50071K/sec
      bitmap: 0/37 pages [0KB], 65536KB chunk

unused devices: <none>

Sidenote:

  • DisksTotal reports 4 (taken from the [4/4])
  • DisksSpare reports 1 taken from the (S)
  • But The (R) disk does not show up anywhere
  • So my Prometheus/Grafana report shows only 5 disks, even though there are actually 6.

I added support for recovering (R) disks as DisksRecovering.

Can you please merge it (and adjust the test-cases - i don't have the environment to run them)?

Signed-off-by: Frederic <[email protected]>
@Finomosec Finomosec changed the title Added RecoveringDisks Added DisksRecovering Oct 16, 2024
@Finomosec
Copy link
Author

Finomosec commented Oct 16, 2024

Manual test passed.

I integrated it with node_exporter (locally patched version) and it works!

grafik

@Finomosec
Copy link
Author

I just found this other PR, which kind of includes my change.
Also, i got one thing wrong: (R) seems to stand for Replacement, not Recovering.

See here: https://github.com/prometheus/procfs/pull/674/files#r1803915063

@Finomosec
Copy link
Author

Due to my misunderstanding (see previous comment) and the other open PR #674, which also solves my problem, i withdraw my PR.

@Finomosec Finomosec closed this Oct 16, 2024
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

Successfully merging this pull request may close these issues.

1 participant