9

So, I have an Optiplex 780 with esata on the back. Under windows, I'm able to hotplug any ol' hard drive using my Thermaltake eSata USB Docking Station. As soon as I plug in the eSata cable, it spins up the drive and is recognized. Unfortunately, under Ubuntu it doesn't spin up at all.

Under Ubuntu 14.04 I've added lsscsi, but I only end up with the following output:

[0:0:0:0]    disk    ATA      hp ssd v300a     502A  /dev/sda
[1:0:0:0]    cd/dvd  TSSTcorp DVD+-RW TS-L633C DW50  /dev/sr0

(Basically, my system drive and the DVD writer)

The drive does not spin up, and nothing is recognized.

I've tried rescanning using

 echo "- - -" | sudo tee -a /sys/class/scsi_host/host0/scan 

(for each of the host0-3), But that doesn't seem to improve the situation.

gparted also does not show the drive.

In my research I've come across the following:

  1. http://bitprison.net/monoig_model_attibutes_translation
  2. https://help.ubuntu.com/community/AutomaticallyMountPartitions

But to no avail. Any ideas?

lspci gives the following:

00:1f.2 IDE interface: Intel Corporation 82801JD/DO (ICH10 Family) 4-port SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801JD/DO (ICH10 Family) SMBus Controller (rev 02)
00:1f.5 IDE interface: Intel Corporation 82801JD/DO (ICH10 Family) 2-port SATA IDE Controller (rev 02)

I don't know if that makes any difference.

cgp
  • 303

2 Answers2

10

Did the trick for me:

sudo rescan-scsi-bus

rescan-scsi-bus is in the package scsitools, not installed by default, so maybe you will have to install it first:

sudo apt install scsitools
sierrasdetandil
  • 2,681
  • 1
  • 26
  • 25
prototyp
  • 215
0

The answer provided by prototyp just worked for me using Ubuntu 20.04.

However I found that I needed to do more than eject using Nautilus (or umount from command line) to stop and deregister the disk properly before unplugging.

Summarising: To detect the disk (credit to prototyp):

sudo rescan-scsi-bus

To list the disks:

lsscsi

Before unplugging the disk (from here):

sudo blockdev --flushbufs /dev/<id>
sudo bash -c "echo 1 > /sys/block/<id>/device/delete"

where <id> is your "block device id" listed for example by lsscsi

Failure to do this last step will cause the disk to continue to show after you have unplugged the drive.

ianinini
  • 140