SUMMARY: Removing and reattaching a SCSI drive to a live system

From: Christopher L. Barnard (cbar44@tsg.cbot.com)
Date: Fri Nov 10 2006 - 15:10:13 EST


I asked:

> 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.

The answer:

I'll just have to wait for the next reboot. Aside from the couple
of people who responded along the lines of "oh my God, don't do that"
(its safe. really. You just have to do it in the right order. ;^), people
recommended the -C flag to devfsadm, adding -v as well so that I could see
what was happening, 'update_drv sd', manually deleting the offending
/dev/dsk and /dev/rdsk entries, and cfgadm. None worked.

Thanks to

Stan.Pietkiewicz@statcan.ca
Susan.Thielen@wellsfargo.com
Anthony D'Atri <aad@beak.org>
Chris Ruhnke <ruhnke@us.ibm.com>
Darren Dunham <ddunham@taos.com>
Chris Hoogendyk <hoogendyk@bio.umass.edu>
"Stevens, Adrian" <A.Stevens@leedsmet.ac.uk>
"Hafiz, W (Waqar)" <Waqar.Hafiz@rabobank.com>
"Lineberger, Aaron" <alineberger@ncdoc.navy.mil>

+-----------------------------------------------------------------------+
| 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:10 EDT