خرید بک لینک

Ubuntu (same behavior on 15.04 and 16.04) recognizes and automounts my exteal hard drive. It asks me for the encryption password and everything works well. But when I right-click on the icon on the launcher and go to safely remove, it says it safely removed it but when I unplug the USB cable the drive is still on. Further, if I recoect, it does not work. I get the following in my syslog:

Code:

Jun 17 00:38:05 rocky keel: [13385.505970] usb 2-3: new high-speed USB device number 8 using xhci_hcd
Jun 17 00:38:10 rocky keel: [13390.617919] usb 2-3: device descriptor read/64, error -110
Jun 17 00:38:25 rocky keel: [13405.833667] usb 2-3: device descriptor read/64, error -110
Jun 17 00:38:26 rocky keel: [13406.049734] usb 2-3: new high-speed USB device number 9 using xhci_hcd
Jun 17 00:38:31 rocky keel: [13411.161707] usb 2-3: device descriptor read/64, error -110
Jun 17 00:38:46 rocky keel: [13426.377484] usb 2-3: device descriptor read/64, error -110
Jun 17 00:38:46 rocky keel: [13426.593449] usb 2-3: new high-speed USB device number 10 using xhci_hcd
Jun 17 00:38:51 rocky keel: [13431.605382] xhci_hcd 0000:00:14.0: Command completion event does not match command
Jun 17 00:38:51 rocky keel: [13431.605385] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
The error corresponds to a power issue. The only way to fix it is to unplug the power adapter for the exteal drive. Then plug it back in, then recoect the USB cable. But that seems bad.

Note that the drive this is about is the 8TB Weste Digital My Book.

So after much searching the following seems to work well:

Code:

sync &&
sudo umount /dev/mapper/luks-b1d88818-d169-4a7b-a1b0-c97f764377f9 &&
sudo cryptsetup luksClose luks-b1d88818-d169-4a7b-a1b0-c97f764377f9 &&
sudo hdparm -Y /dev/sdb &&
echo 1 | sudo tee /sys/block/sdb/device/delete
If I remove my USB by doing those commands, then no system log errors and when I plug the usb back in, it works just like the first time.

But I don't really understand those commands. I kind of just cobbled them together and experimented. Do those commands seem reasonable? Is that the right order? Are any of the commands uecessary?

Once those commands complete, can I unplug the power supply to my exteal hard drive immediately or should I wait a few seconds?

برچسب: نویسنده: استخدام کار تاريخ: شنبه 29 خرداد 1395 ساعت: 4:44

صفحه بندی