Debian/Ubuntu Tips & Tricks

Debian/Ubuntu Tips & Tricks

Debuntu.org: .deb packages, Unix/Linux Tutorials and Articles.

Sponsors

User login

Syndicate

Syndicate content

Tips Bucket

Who's online

There are currently 0 users and 56 guests online.

How-To: Rescan a SCSI bus without Rebooting

When you hotplug a hard drive in a virtual machine, the drive do not show in fdisk -l output until you reboot your VM.
In order to get the drive to appear, the SCSI bus need to be rescanned.

The rescan will be triggered through sysfs pseudo filesystem.

First of all get root access and check what host is available:

# ls /sys/class/scsi_host
host0 host1 host2 host3

Pick up the one (here host2 is taken) that match where the drive is and run:

# echo "- - -" > /sys/class/scsi_host/host2/scan

Now, you should be able to see the drive when running:

# fdisk -l

I just got a new SATA drive

I just got a new SATA drive after my maxtor crashed i had it for about 10 years and it was about time for it to die but thank god i found a data recovery company to help get my files off it. Not going back to SCSI or EIDE ever