Hey #Linux #hardware folks out there! I need help with something really, really low-level.
Here my problem: most of Qnap's NAS feature a "copy" button on the front, next to a USB-A port. That button will copy the content of any hard-drive plugged to the USB port next to it.
I want to develop that feature for Linux. But I'm having troubles finding a way to reliably associate that port and the storage that's plugged on it and I wonder how the Qnap OS does that.
Any idea?
gregkh@social.kernel.org Hi! I'm really sorry to mention you out of the wild like that. I saw that you were active here. I just out of option about the problem in the previous post. I need to find someone how knows the kernel enough to help me. Do you know a piece of documentation that would help me understand how to associate a particular USB port with the storage that's plugged on it?
@AugierLe42e Pardon my ignorance but are there other USB ports or rather other disks that may be plugged to a USB port on the QNAP ?
@AugierLe42e
Analyse dmesg/lsblk/lsusb to identify the last connected device?
@llutz Not reliable. The port under /sys/device changes based on whether the peripheral is USB2 or 3 so what else could it make that vary?