-
Notifications
You must be signed in to change notification settings - Fork 193
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_info.sh / md_info_detail.sh: /dev/md/ directory does not exist on newer kernels #92
Comments
The The only entries that are always going to be there are |
In that case, is it better not to attempt to get the array names at all?
Or else the code could work multiple ways (one where /dev/md exists, one where it doesn't) |
I think that attempting to obtain the array name is ok, so long as it fails gracefully. But obviously the glob pattern at the start of the for-loop should use a more robust / reliable value than Also I don't think that the lack of a |
closes prometheus-community#24 closes prometheus-community#48 closes prometheus-community#92 For remaining problems, please open a new issue at https://github.com/prometheus/node_exporter
closes prometheus-community#24 closes prometheus-community#48 closes prometheus-community#92 For remaining problems, please open a new issue at https://github.com/prometheus/node_exporter Signed-off-by: Thomas Kriechbaumer <[email protected]>
closes prometheus-community#24 closes prometheus-community#25 closes prometheus-community#48 closes prometheus-community#92 For remaining problems, please open a new issue at https://github.com/prometheus/node_exporter Signed-off-by: Thomas Kriechbaumer <[email protected]>
On some newer machines, I find that
/dev/mdXXX
exists but the/dev/md
directory does not. This includes Ubuntu 20.04 and Debian 10, both with 5.4.0 kernel.Unfortunately the textfile collector scripts are hard-wired to look for
/dev/md/*
and so they don't pick up any arrays.The array is visible under
/dev/disk/by-id/md-name-<HOSTNAME>:<ARRAYNAME>
This path also exists for Ubuntu 18.04 (4.15.0). Checking the oldest machine I have, which is CentOS 6 (2.6.32):
In this host,
mdadm -E
shows the name as justalthough it's currently picked up as
md_name="scratch1_0"
, and so changing to/dev/disk/by-id/md-name-*
would change the label set.However, I think this is probably the right long-term fix. To demonstrate:
The text was updated successfully, but these errors were encountered: