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

[bug] with parsing mdadm output => Unexpected parse #199

Open
aplufr opened this issue Feb 18, 2020 · 0 comments
Open

[bug] with parsing mdadm output => Unexpected parse #199

aplufr opened this issue Feb 18, 2020 · 0 comments

Comments

@aplufr
Copy link

aplufr commented Feb 18, 2020

Plugin report an unexpected parse error when executing.

Tried with 4.0.9 (from Debian 10) and 4.0.10 (from this git).

Output of check_raid -d:

# perl ./check_raid.pl -d
check_raid 4.0.10
Visit <https://github.com/glensc/nagios-plugin-check_raid#reporting-bugs> how to report bugs
Please include output of **ALL** commands in bugreport

DEBUG EXEC: /sbin/dmsetup status --noflush at ./check_raid.pl line 503.
DEBUG EXEC: /proc/mdstat at ./check_raid.pl line 503.
Unexpected parse at ./check_raid.pl line 3578, <$fh> line 2.

Output of cat /proc/mdstat:

# cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda3[2] sdc3[3](W)(R) sdb3[0]
      976015360 blocks super 1.2 [2/3] [UU]
      [===>.................]  check = 15.6% (152996864/976015360) finish=153.2min speed=89504K/sec
      bitmap: 2/8 pages [8KB], 65536KB chunk

md1 : active raid1 sdc2[3](W)(S) sda2[2] sdb2[0]
      409280 blocks super 1.2 [2/2] [UU]

unused devices: <none>

After giving a look at the code, I suspect that's because disk sdc3 have two flags: W (write-mostly) and R (recovery) or S (spare) but I'm not good in perl.

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

1 participant