[wellylug] USB 3.0 via PCI-e, & SATA HDD enclosures/docks

David Antliff david.antliff at gmail.com
Fri Jul 15 08:09:43 NZST 2011


On Wed, Jul 13, 2011 at 10:13, David Antliff wrote:
> Just a quick follow-up to this - I hooked up a disk and did a few
> experiments. Looks like this motherboard supports hot-plugging
> 'natively', although I'm not 100% sure on the software procedure to
> disconnect - obviously I unmount but then what? Just pull the drive?
> Or is there a program to notify the chipset that big changes are in
> the air?

And to answer my own question:

There is a script called "rescan-scsi-bus.sh" that does something, and
has a --remove option, but does not seem to actually remove anything.
I suspect it's meant to be used *after* physically removing a drive,
although I'm not sure I need it because:

There is a program called "sg_start" that can be used, with --stop, to
spin down a disk prior to removal. However it still appears in the
output of "lsscsi" so I found that this command is helpful for
spinning down & removing this entry:

 # echo 'scsi remove-single-device 3 0 0 0' > /proc/scsi/scsi

Where 3 0 0 0  is the HostID, Channel, Id and Lun of the disk, as
reported by lsscsi.

Not sure if I still need the sg_start --stop with that, but I suppose
if the volume is unmounted and the disk is spun-down, then that's good
enough to remove safely?

-- David.



More information about the wellylug mailing list