From Wiki

Reset SCSI bus

Works with Ubuntu 11.10 .

Search for the script

Install the scscitools (and optionally sg3-utils) package:

sudo apt-get install sg3-utils scsitools
  1. Power off your device
  2. Remove the device from the kernel with -r
  1. Switch on the device
  2. Wait until it is ready
  3. Rescan the bus

Your device should be ready to use now.

Mount and unmount external scsi with scsiadd


# Removing an external SCSI with scsiadd ( )
# Howto:


shopt -s nullglob
export DISPLAY=:0.0 # required for notify-send

if ! [ -f /usr/local/bin/scsiadd ]
    notify-send -u critical -t 100000 "Program missing" "scsiadd must be installed in /usr/local/bin/scsiadd."
    exit 1

# Find generic dock interface for UltraBay
if  /usr/local/bin/scsiadd -p | grep ${SCSI_CHANNEL}
        logger external ${SCSI_CHANNEL} eject starting
        logger cannot locate external ${SCSI_CHANNEL} device
        notify-send -u critical -t 100000 "Eject of external SCSI device failed" "Cannot locate an external scsi device on ${SCSI_CHANNEL} (probably already unmounted)."
        exit 1

# A device was found
gksudo "su -c 'if /usr/local/bin/scsiadd -r 3 00 00 00; then echo 12 > /proc/acpi/ibm/beep; fi'"

if /usr/local/bin/scsiadd -p | grep ${SCSI_CHANNEL}; then
    logger eject of external scsi went wrong done
    notify-send -u normal -t 10000 "Somthing went finally wrong" "The external scsi device could _NOT_ be removed. Please check manually for errors."

    # Tell the user we're OK
    logger  done
    notify-send -u normal -t 10000 "Safe to remove device" "The external scsi device can now safely be removed"

# We need sleep here so someone can disconnect the bay and the drive
sleep 1

exit 0