Solaris -- can I add a SCSI target without a reconfigure reboot?

David Wolfskill david at catwhisker.org
Fri Jul 6 16:18:51 PDT 2007


On Fri, Jul 06, 2007 at 01:53:26PM -0700, David Wolfskill wrote:
> ...
> Is there a reasonable way to accomplish that goal without a reboot?

The following sequence caused creation of new entries under /dev/rmt as
well as in the kernel's device tree (as shown by "sysinfo -level all"):

* Save the output of "sysinfo -level all" or "prtconf" to a file.

* Ensure that termination is set properly (precisely one termination for
  each end of each SCSI bus) and that the SCSI target ID selected for the
  device does not conflict with any other SCSI target on the same SCSI
  bus.  It also helps to use a SCSI target ID that is "usual" for the
  type of device.  It's my understanding that SCSI IDs 4 & 5 are typically
  used for tape drives in Solaris; I used 4.  (The only other device --
  other that  the SCSI host adaptor -- on this SCSI bus is a scanner; the
  probability that I'll be using both at the same time is negligible.)

* Physically connect the new device in the chain of devices.  It's right
  handy if nothing else on that bus is currently being used.  (That was,
  in fact, the case for me.)

* Turn the new device on.  (I had overlooked this at first.  Silly me.)

* Issue "modinfo | grep ' st '" to determine the ID of the "st" driver.
  (In my case, it was 114.)  If you are feeling very brave (and don't
  really want corroborating uinformation), use
  "modinfo | awk '/ st /{print $1}'".

* Unload the st driver: "modunload -i `modinfo | awk '/ st /{print $1}'`
  (or something functionally equivalent).

* drvconfig (This may take several seconds.)

* devlinks

* tapes

* Re-run "sysinfo -level all" or "prtconf" abd save the output to a
  different file.

* A "diff" of the two files should show the new device node(s):

# diff -c pogo new
*** pogo        Fri Jul  6 13:36:14 2007
--- new Fri Jul  6 16:00:41 2007
***************
*** 65,71 ****
  Number of processors (CPUs) configured (_SC_NPROCESSORS_CONF) is               1
  Number of processors (CPUs) online (_SC_NPROCESSORS_ONLN) is                   1
  Total number of pages of physical memory (_SC_PHYS_PAGES) is                   32768
! Number of pages of physical memory not currently in use (_SC_AVPHYS_PAGES) is  1418
  Max number of I/O operations in single list I/O call (_SC_AIO_LISTIO_MAX) is   256
  Max number of timer expiration overruns (_SC_DELAYTIMER_MAX) is                2147483647
  Max number of open message queue descriptors per process (_SC_MQ_OPEN_MAX) is  32
--- 65,71 ----
  Number of processors (CPUs) configured (_SC_NPROCESSORS_CONF) is               1
  Number of processors (CPUs) online (_SC_NPROCESSORS_ONLN) is                   1
  Total number of pages of physical memory (_SC_PHYS_PAGES) is                   32768
! Number of pages of physical memory not currently in use (_SC_AVPHYS_PAGES) is  497
  Max number of I/O operations in single list I/O call (_SC_AIO_LISTIO_MAX) is   256
  Max number of timer expiration overruns (_SC_DELAYTIMER_MAX) is                2147483647
  Max number of open message queue descriptors per process (_SC_MQ_OPEN_MAX) is  32
***************
*** 242,248 ****
                          Target                : 6
                          Connected to          : esp0
  
!                     rmt/0 (st4) is a SCSI tape drive
                          Lun                   : 0
                          Target                : 4
                          Connected to          : esp0
--- 242,248 ----
                          Target                : 6
                          Connected to          : esp0
  
!                     rmt/0 (st4) is a "HP 35470A 4mm DAT (HP      HP35470A)" SCSI tape drive
                          Lun                   : 0
                          Target                : 4
                          Connected to          : esp0
***************
*** 298,304 ****
--- 298,311 ----
                      Interrupts            : 3
                      Connected to          : dma1
                      Unit                  : 1
+                     Attached Device(s)    : rmt/2
  
+                     rmt/2 (st11) is a SCSI tape drive
+                         Lun                   : 0
+                         Target                : 4
+                         Connected to          : esp1
+                         Unit                  : 11
+ 
              lebuffer0 is a "FSBE/S" Fast SCSI Buffered Ethernet/Sbus
                  Description           : Fast SCSI Buffered Ethernet/Sbus
                  Burst Sizes           : 63
# 

* And "ls -l /dev/rmt" should show entries that weren't there before.
  I'll spare you that bit of spam.  :-}

My thanks to Alexei Rodriguez, Robert Hajime Lanning, and Darren
Dunham (in the order in which I received their replies) for their
responses.

Peace,
david
-- 
David H. Wolfskill				david at catwhisker.org
Anything and everything is a (potential) cat toy.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://www.baylisa.org/pipermail/baylisa/attachments/20070706/05a3c0df/attachment.bin>


More information about the Baylisa mailing list