Randomly Expressed

About

Welcome to my blog “randomly expressed”. I created this website to publish helpful tips. It’s mainly technology driven, but I will blog about other topics. I am a Unix sysadmin that is always looking to learn new things. My goal is to be able to share knowledge that others may find useful. xkcd.com

Continue Reading »

Contact

Connect With US

Connect with us on the following social networking sites.

Most Popular Posts.

Add Some Content to This Area

You should either deactivate this panel on the Theme Settings page, or add some content via the Widgets page in your WordPress dashboard.

rescan-scsi-bus doesn’t find new disk

By on September 27, 2018 in Technology with No Comments

rescan-scsi-bus.sh is a program that is used to rescan the SCSI bus using the SCSI add-single-device feature of the Linux SCSI layer. You can install it via apt-get install scsitools on Ubuntu. If you need to add a disk and want to rescan the scsi bus so it sees the new drive this shell script will do the trick most of time. When you start adding drives and you get to more than 7 drives on a bus then you will get the following that shows no devices found.

root@nfs01:~# /sbin/rescan-scsi-bus

Scanning host 20 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 21 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 22 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 23 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 24 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 25 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 26 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 27 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 28 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 29 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 30 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 31 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 32 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning for device 32 0 0 0 ...
OLD: Host: scsi32 Channel: 00 Id: 00 Lun: 00
Vendor: VMware Model: Virtual disk Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Scanning for device 32 0 1 0 ...
OLD: Host: scsi32 Channel: 00 Id: 01 Lun: 00
Vendor: VMware Model: Virtual disk Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Scanning for device 32 0 2 0 ...
OLD: Host: scsi32 Channel: 00 Id: 02 Lun: 00
Vendor: VMware Model: Virtual disk Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Scanning for device 32 0 3 0 ...
OLD: Host: scsi32 Channel: 00 Id: 03 Lun: 00
Vendor: VMware Model: Virtual disk Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Scanning for device 32 0 4 0 ...
OLD: Host: scsi32 Channel: 00 Id: 04 Lun: 00
Vendor: VMware Model: Virtual disk Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Scanning for device 32 0 5 0 ...
OLD: Host: scsi32 Channel: 00 Id: 05 Lun: 00
Vendor: VMware Model: Virtual disk Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Scanning for device 32 0 6 0 ...
OLD: Host: scsi32 Channel: 00 Id: 06 Lun: 00
Vendor: VMware Model: Virtual disk Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
0 new device(s) found.
0 device(s) removed.

When that happens you will need to run the following command to tell it to scan higher numbers.

root@nfs01:~# /sbin/rescan-scsi-bus --ids=1,2,3,4,5,6,7,8

Facebook Comments

Post a Comment

Your email address will not be published. Required fields are marked *

Top