SolarisRescanSCSI

How to rescan the SCSI chain

1. Rescanning the SCSI chain:

Sometimes, for instance after adding a new tape drive to a Solaris server, you need to rescan the SCSI chain to make sure the tape is correctly recognized.

To do this, use the devfsadm command under Solaris 8 and following versions.

For instance, here is this command in action, scanning a machine only for new tape drives:

galactus:/sauvegarde > devfsadm -v -c tape
devfsadm[5257]: verbose: removing node /devices/pci@8,700000:devctl.  invalid st_rdev
devfsadm[5257]: verbose: mknod /devices/pci@8,700000:devctl 0l/3l/20600
devfsadm[5257]: verbose: removing node /devices/pci@8,700000:devctl.  invalid st_rdev
devfsadm[5257]: verbose: mknod /devices/pci@8,700000:devctl 0l/3l/20600
devfsadm[5257]: verbose: removing node /devices/pci@9,700000:devctl.  invalid st_rdev
devfsadm[5257]: verbose: mknod /devices/pci@9,700000:devctl 0l/3l/20600
devfsadm[5257]: verbose: removing node /devices/pci@9,700000:devctl.  invalid st_rdev
devfsadm[5257]: verbose: mknod /devices/pci@9,700000:devctl 0l/3l/20600
devfsadm[5257]: verbose: removing node /devices/pci@9,600000:devctl.  invalid st_rdev
devfsadm[5257]: verbose: mknod /devices/pci@9,600000:devctl 0l/3l/20600
devfsadm[5257]: verbose: removing node /devices/pci@9,600000:devctl.  invalid st_rdev
devfsadm[5257]: verbose: mknod /devices/pci@9,600000:devctl 0l/3l/20600
devfsadm[5257]: verbose: mknod /devices/pci@9,700000/pci@2/scsi@5/st@4,0: 0l/3l/20666
devfsadm[5257]: verbose: symlink /dev/rmt/2 -> ../../devices/pci@9,700000/pci@2/scsi@5/st@4,0:
devfsadm[5257]: verbose: mknod /devices/pci@9,700000/pci@2/scsi@5/st@4,0:n 0l/3l/20666
devfsadm[5257]: verbose: symlink /dev/rmt/2n -> ../../devices/pci@9,700000/pci@2/scsi@5/st@4,0:n
devfsadm[5257]: verbose: mknod /devices/pci@9,700000/pci@2/scsi@5/st@4,0:b 0l/3l/20666
devfsadm[5257]: verbose: symlink /dev/rmt/2b -> ../../devices/pci@9,700000/pci@2/scsi@5/st@4,0:b
devfsadm[5257]: verbose: mknod /devices/pci@9,700000/pci@2/scsi@5/st@4,0:bn 0l/3l/20666
devfsadm[5257]: verbose: symlink /dev/rmt/2bn -> ../../devices/pci@9,700000/pci@2/scsi@5/st@4,0:bn
devfsadm[5257]: verbose: mknod /devices/pci@9,700000/pci@2/scsi@5/st@4,0:l 0l/3l/20666
devfsadm[5257]: verbose: symlink /dev/rmt/2l -> ../../devices/pci@9,700000/pci@2/scsi@5/st@4,0:l
devfsadm[5257]: verbose: mknod /devices/pci@9,700000/pci@2/scsi@5/st@4,0:m 0l/3l/20666
devfsadm[5257]: verbose: symlink /dev/rmt/2m -> ../../devices/pci@9,700000/pci@2/scsi@5/st@4,0:m
devfsadm[5257]: verbose: mknod /devices/pci@9,700000/pci@2/scsi@5/st@4,0:h 0l/3l/20666
[... etc ...]

2. Testing the new configuration:

The easiest way to do this is to use the mt command:

galactus:/sauvegarde > mt -f /dev/rmt/2cn status
IBM Ultrium Gen 4 LTO tape drive:
   sense key(0x0)= No Additional Sense   residual= 0   retries= 0
   file no= 0   block no= 0

galactus:/sauvegarde > echo $?
0

PLEASE NOTE The following has only been tested on Solaris 8 server. You may need to adapt this for a Solaris 10 machine. You have been warned! Take a look at the reference under the 'See Also' section for more information.

See Also: