I would like to be able to eject a certain disk from the task scheduler. I can find out which disk I want to eject with the lsusb -ciu command. If for example I want to eject disk 5-1.2, how could I do it?
I have tried some scripts that I have seen on some support pages but none have worked. Maybe you are doing something wrong. This just doesn't work for me, the drive is still operational.
echo "5-1.2" > /sys/bus/usb/drivers/usb/unbind
The device is ejected but the nas shows a warning: The device has not been ejected safely.
I have also tried the following script. It also unplugs it but the warning for not ejecting the external hard drive safely reappears.
USBDEVICE="5-1.2"
echo 0 > /sys/bus/usb/devices/$USBDEVICE/authorized
What's going on?