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
Add UDEV rule to fix duplicate serial numbers on QNAP TR-002 #1683
Comments
Sure! It's this one: https://www.qnap.com/en/product/tr-002; the little brother of the TR-004 you added with #1532.
|
Thx, i realized the name of the device is already mentioned in the issue title. |
… devices Fixes: #1683 Signed-off-by: Volker Theile <votdev@gmx.de>
@zsteinmetz What about SMART? Does it work for the TR-002 or do we need the same adaptions as for TR-004? See
|
SMART doesn't work out of the box, no. I was still trying to figure out why, though.
With that,
Interestingly, sometimes and after waiting five minutes or so, I get the complete SMART device list in the WebGUI including the TR-002 drives, yet again accompanied by a number of CPU monitoring alerts. The Celeron J4105 should be powerful enough not to struggle with that and I haven't seen such delays with my internal drive before.
Don't know if this is comparable to the problems you faced with the TR-004 but yeah, we might need some adaptations. What do you think? Let me know, if certain logs would be helpful for you. |
I think adding the config to the smartmontools custom database is the better approach. Additionally i would think about opening a bug-/feature request on their GitHub page so that other Qnap TR-002 will benefit from that as well. It is sad that the producers of such hardware do not take care that tools like smartmontools or other tools in the Linux environment do not know their devices by default. This would reduce troubles for their customers a lot (and projects like OMV as well). |
So true, @votdev! Do you happen to have an idea why opening SMART and drive lists takes super long now in the OMV web GUI? It didn't before adding the TR-002 to |
My bad, I found the problem. The delay in retrieving SMART data is not related to OMV. I used |
Just for reference if others face the same problem: the timeout occurs because the QNAP TR-002 doesn't support multi-sector I/O (see smartmontools/smartmontools#237). A workaround is to use @votdev, would it make sense to catch such timeouts earlier so that they don't slow down OMV? |
But a second call will additionally increase the delay. Doing this would mean a lot of code changes because the current implementation fully relies on the output of |
I don't feel experienced enough with the internals of OMV (yet) to prepare such a PR, I'm afraid. For the time being, I successfully tested the following hack/workaround. Don't know if you would advice messing around with For fellow users who face a similar issue: please use this at your own risk! Create #!/bin/bash
sid=$(udevadm info --query=all --name=${@: -1} | grep 'ID_SERIAL=')
if [[ $sid = *QNAP_TR-002* ]] ; then
inj="-H -i -g all -g wcreorder -c -A -f brief -l xerror,error -l xselftest,selftest -l selective -l directory -l scttemp -l scterc -l defects -l sataphy"
args=$(echo "$@" | sed -E "s/(--xall|-x)/$inj/")
/sbin/smartctl $args
else
/sbin/smartctl $@
fi This short script overrides the default Then add the following to
|
Isn't it possible to add the necessary command line args to |
Not yet, but I created an issue at smartmontools/smartmontools#237 already. Maybe it will be added in the future. |
@zsteinmetz This PR should be of interest to you. It reduces the number of requested data to the minimum when querying the SMART infos. Only |
Sounds great! Can't wait to test it! |
Works like a charm. Thank you! My previous workaround is needed only for speeding up the "Extended Information" tab, which I haven't used much anyway. Ah, and manually triggering self tests still takes a while. This seems bearable given that most people use CRON jobs for that, I guess. |
Is your feature request related to a problem? Please describe.
I have a QNAP TR-002 with two 4TB HDDs connected via USB to a Dell Wyse 5070 thin client running OMV 7.0-25. The QNAP is configured in individual/single mode making both disks visible to OMV. However, device information is masked by QNAP. The device model just reads "TR-002 DISK00" and "TR-002 DISK01" with two identical serial numbers.
Describe the solution you'd like
I added this modified UDEV rule to
/etc/udev/rules.d
in line with #746 and #1302, which seems to fix the issue.After a reboot, the OMV device list looks like this and I get the following
udevadm
outputs (see below).Describe alternatives you've considered
N/A
Additional context
udevadm
outputs for/dev/sdb
and/dev/sdc
Maybe you want to add this upstream? Let me know if you need more info.
The text was updated successfully, but these errors were encountered: