Removing and reattaching a SCSI drive to a live system

From: Christopher L. Barnard (cbar44@tsg.cbot.com)
Date: Thu Nov 02 2006 - 13:29:18 EST


I sometimes use external SCSI drives to move files to isolated servers.
To do this I plug the SCSI cable of the external drive into an *unused*
SCSI port of a running system. I run devfsadm so that the system recognizes
the new drive, I copy over the files, then unplug the drive. The running
server does not complain. About 99% of the time it works fine: the system
reports that the removed drive is "unavailable" but it is still trivial
to reuse that port. Occasionally, however, the <drive not available> remains
when a disk is re-attached, even if I do a new devfsadm. I know that a
reboot will clear the list of drives. But when this happens I usually do
not want (or cannot) do an immediate reboot. Does anyone know of a way
to clear "unavailable" drives without rebooting the system?

Another way to put it: Here is the output of a "format" from several systems.

AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@1c,600000/scsi@2/sd@0,0
       1. c1t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@1c,600000/scsi@2/sd@1,0
       2. c2t3d0 <drive not available>
          /pci@1c,600000/scsi@2,1/sd@3,0

c1 is the internal controller and c2 is the external SCSI port. c2t3 is the
external SCSI disk I move around. On some servers, if I plug something into
c2t3, the new disk info will replace the "drive not available". On others,
the "drive not available" remains and the system will not recognize the new
disk. So on servers that do not recognize anything new in c2t3, I need to
remove selection 2 from "format" without rebooting the system.

+-----------------------------------------------------------------------+
| Christopher L. Barnard O When I was a boy I was told that |
| cbarnard@tsg.cbot.com / \ anybody could become president. |
| (312) 347-4901 O---O Now I'm beginning to believe it. |
| http://www.cs.uchicago.edu/~cbarnard --Clarence Darrow |
+----------PGP public key available via finger or PGP keyserver---------+
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:41:07 EDT