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

Feature Request mdstat: Warn when auto-read-only array detected #225

Open
Napsty opened this issue Oct 20, 2023 · 0 comments
Open

Feature Request mdstat: Warn when auto-read-only array detected #225

Napsty opened this issue Oct 20, 2023 · 0 comments

Comments

@Napsty
Copy link

Napsty commented Oct 20, 2023

I noticed that check_raid.pl is currently not detecting mdadm raid array which are set to auto-read-only.
IMHO it would be helpful to detect this and WARN about this.

Output of check_raid -d:

root@nas:~# ./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.
DEBUG EXEC: /proc/mdstat at ./check_raid.pl line 503.
OK: mdstat:[md0(2.73 TiB raid1):UU, md1(5.46 TiB raid1):UU]

Output of each command from check_raid -d

/sbin/dmsetup status --noflush

vgdata1-lvswap: 0 3899392 linear 
vgdata1-lvdata: 0 3903119360 linear 
vgdata1-lvdata: 3903119360 5860261888 linear 
vgdata1-lvdata: 9763381248 1677721600 linear 

root@nas:~# cat /proc/mdstat

Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid1 sda1[2] sdb1[3]
      2930264519 blocks super 1.2 [2/2] [UU]
      
md1 : active (auto-read-only) raid1 sdd1[3] sdc1[2]
      5860390471 blocks super 1.2 [2/2] [UU]
      
unused devices: <none>

Additional environment details:

  • Debian Bullseye on a HP Proliant MicroServer
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