I recently purchased a multi-port usb hub so that I can connect multiple external hard drives to my Synology nas.
When I don't need to use them, I eject them safely from the web interface and then with a smart plug I disconnect it from the power remotely.
The problem is that when I need to use them again and activate them with the smart plug it does not recognize them again. This system works perfectly if an external drive is plugged directly into the nas via usb, but with the hub when you turn on the drive it never reappears. If I restart the system, it recognizes all the drives connected to the hub but it's a very inconvenient thing to do constantly.
You would need a command or tool that ejects or unplugs the usb hub (as if you had rebooted the nas) to get it to recognize all drives again.
Through SSH with the dmesg command, it gives me a lot of information, but I think the relevant one in my case could be this:
[ 38.081313] usb-storage 3-1.1:1.0: USB Mass Storage device detected
[ 38.088627] scsi host2: usb-storage 3-1.1:1.0
[ 38.093334] usb-storage 5-1.4:1.0: USB Mass Storage device detected
[ 38.099958] scsi host3: usb-storage 5-1.4:1.0
[ 38.104628] usb-storage 5-1.3.1:1.0: USB Mass Storage device detected
[ 38.111356] scsi host4: usb-storage 5-1.3.1:1.0
[ 38.116179] usbcore: registered new interface driver usb-storage
[ 38.174998] uhci_hcd: USB Universal Host Controller Interface driver
[ 38.308182] usbcore: registered new interface driver usblp
[ 38.392432] usbcore: registered new interface driver usbhid
[ 38.398144] usbhid: USB HID core driver
How could I reset the hub (or one of the drives plugged into the hub individually) so that the drives are recognized again after being ejected, unplugged, and plugged back in? I'm not very good with Linux commands, I've tried this but without success:
echo "5-1" > /sys/bus/usb/drivers/usb/unbind
sleep 10
echo "5-1" > /sys/bus/usb/drivers/usb/bind