-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[input.smart]: Specifying multiple drives in the devices= parameter fails when the '-d' parameter is used to differentiate drives within a hardware RAID array #8684
Comments
Still plugging away at it. Looking at similar issues previously logged, I tried their (failed) workaround attempts and found the same result. The following should work according to documentation, but it still returns the same error:
|
After leaving things overnight, I was surprised to come back and see that my grafana charts show data for all the drives in my array (24 of them!). It appears that the error that occurs happens to all the disks except 1 random one, each time the query is made. So, over time, all drives are queried. Just not all of them, all the time. and repeating it a few times. Every time it runs it produces the errors for all the drives, except one, and it's always a different one:
and, repeated, shows a different drive's results:
So, while not operating correctly, at least I can get some data. Here's an extract from [input_smart]. I'm only displaying the 1st 2 drives but there's 24 in total:
|
@douginoz For example:
|
Same result:
My best guess right now is that the code considers "device=/dev/sda" different from "device=/dev/sdb", but doesn't consider "/dev/sg3 -d areca,2/2" different than "/dev/sg3 -d areca,3/2" and gets some sort of collision. |
Hello @douginoz! We are assuming that your issue with areca RAID may be located on the driver's side. To check if the above is true, I kindly ask you to change one line in your local telegraf smart plugin code located in In lines 505 - 507 plugin iterates over devices and then proceeds aggregation in goroutines. You just need to remove "go" prefix.
So change line 506 from:
To:
And then build your local telegraf by make command, run you configuration with new telegraf binary and check if the areca problem still exists. If this approach is correct, maybe there should be added some configuration options about concurrency. |
Thanks for this. I'm struggling to follow your instructions though. I think you're assuming that I normally run telegraf etc. from my own compiled source code. I don't. I simply downloaded the ubuntu telegraf and influx etc. from the website and installed them as per the website instructions.
I removed the installed version of go (# apt remove golang-go;rm -R /usr/local/go) then manually installed the latest (v15) one, which works:
|
I've made the change from And it appears to be working. Doing a test run now produces a LOT of data, for each drive in the array. I assume this change has a performance penalty but it's one that I'm happy to put up with! |
Relevant telegraf.conf:
System info:
Telegraf 1.17.0 (git: HEAD 3f7a54c)
Linux sophie 5.4.0-58-generic #64-Ubuntu SMP (Ubuntu 20.04)
smartmontools release 7.1 dated 2019-12-30 at 15:00:11 UTC
smartmontools SVN rev 5022 dated 2019-12-30 at 15:00:49
smartmontools build host: x86_64-pc-linux-gnu
Docker
Docker not being used.
Steps to reproduce:
devices = [ "/dev/sg3 -d areca,2/2", "/dev/sg3 -d areca,3/2" ] # Two drives from within the Areca array
Expected behaviour:
Smartctl can retrieve data from individual drives within a hardware array provided the '--device=' parameter is correct.
For Areca arrays, the following is correct syntax:
smartctl --info --health --attributes --tolerance=verypermissive -n standby --format=brief --device=areca,1/2 /dev/sg3
This returns comprehensive data about the specific drive within the array:
When a different value is used, Smartctl correctly retrieves the data for the different disk within the array:
The [input.smart] plugin allows for specifying device and device type:
The above works correctly:
As do any of the examples previously documented above.
However, the following doesn't work:
devices = [ "/dev/sg3 -d areca,1/2", "/dev/sg3 -d areca,7/2" ]
Actual behavior:
The following is the output from specifying more than one drive within the areca array:
Only the first drive gets reported on. Any subsequent drives within that same array don't, with only the 'exit_status=2i" message returned.
Strangely, the following works:
devices = [ "/dev/sdf", "/dev/sdf", "/dev/sdf", "/dev/sdf" ]
so it doesn't appear to be a problem with handling duplicate drives.
Additional info:
Issue #4720 was logged by @sachaz Sept 19,2018 which was identical, except he was using an HP smart array instead of an Areca, but the principle is the same - you must use the '-d' parameter to specify individual drives within the array.
The text was updated successfully, but these errors were encountered: