SUMMARY RE: Cannot create /dev/... entry for tape library changer?

From: <Syed.Hosain_at_aeris.net>
Date: Wed Oct 14 2009 - 18:01:07 EDT
Hi, all.

The common consensus was that I am attempting to doing the /dev/...
entry creation correctly, but that some other problem existed and I
needed to do a "probe-scsi-all" at the "ok" prompt to verify if the
loader was being seen by the system.

A "probe-scsi-all" showed the tape drive (an HP Ultrium LTO3) at SCSI 5,
lun 0, but *not* the changer.

Turns out that the Sun StorageTek C2 unit has two modes of operation - I
discovered this by playing with the Configuration settings accessed from
the front LCD panel.

One mode is "Sequential", where the changer automatically cycles to the
"next" tape when the tape in the drive is taken off-line with an "mt -f
/dev/rmt/0cn rewoffl".
In this mode, the C2 interface *only* shows the drive at an SCSI address
of 5 at lun 0 with a "probe-scsi-all".

The other mode is "Random", where the changes does *not* cycle to the
"next" tape when the drive is taken off-line. This mode requires an
external program, such as "mtx", to control the tape motion.
In this mode, the C2 has an *additional* SCSI device at the same SCSI
address as the tape drive, but with a lun of 1. The SCSI address of the
changer cannot be set independently from the drive.

Selecting "Random" mode (requires 4 minute power cycle reset of the
drive), followed by a "boot -r" at the "ok " prompt, did the trick ...
the device entry for the changer got created with the sgen driver!

Note: the default device for "mtx" is "/dev/changer". This does not get
created automatically - you have to symbolic link to the actual device.
Yes, you can use the "-f device" option to mtx too, but it is convenient
to have the "/dev/changer" device.

So, I did a

  cd /dev
  ln -s ../devices/pci@1c,600000/scsi@2,1/sgen@5,1:changer changer"

to create this link.

Final thought: I wish there was a way to use either sequential and
random modes in this tape unit as needed dynamically, but this does not
appear to be possible. You get to pick one or the other mode - set from
the LCD panel, so not changeable from the OS in any way.


Thanks to all who helped with suggestions.



Z



From: Syed Zaeem Hosain (Syed.Hosain@aeris.net)
Sent: Monday, October 12, 2009 3:00 PM
To: 'sunmanagers@sunmanagers.org'
Subject: Cannot create /dev/... entry for tape library changer?



Hi, all.



Last Friday, as per the instructions I found to add a /dev entry for a
Sun StorageTek C2 tape auto-loader, I am trying to create the device
entry for this unit. This is on a Sun Solaris-10 system (a V210).



#  uname -a

SunOS nis003 5.10 Generic_118833-36 sun4u sparc SUNW,Sun-Fire-V210



So, I added the following lines:



device-type-config-list="changer";

      name="sgen" class="scsi" target=5 lun=1;



to "/kernel/drv/sgen.conf" ... I picked target 5, lun 1 based on the
fact that the drive inside the auto-loader is at target 5, lun 0.



Then I rebooted:



# reboot -- -r



After the reboot, I was *expecting* to see an entry "/dev/scsi/changer"
or "/dev/changer" ... or at least some entries for "/dev/sg*" devices.



But, I don't see anything, and the boot messages don't appear to have
anything in there either (unless I am missing something) other than the
drive itself:



      # grep scsi /var/adm/messages

Oct 11 01:15:04 nis003 scsi: [ID 365881 kern.info]
/pci@1c,600000/scsi@2,1/st@5,0 (st12):

Oct 11 01:15:04 nis003 scsi: [ID 193665 kern.info] st12 at glm1: target
5 lun 0

Oct 11 01:15:04 nis003 genunix: [ID 936769 kern.info] st12 is
/pci@1c,600000/scsi@2,1/st@5,0

# grep changer /var/adm/messages

# grep sg /var/adm/messages

# ls -laF /dev/sc*

lrwxrwxrwx   1 root     root          29 Aug 15  2007 /dev/sctp ->
../devices/pseudo/sctp@0:sctp

lrwxrwxrwx   1 root     root          31 Aug 15  2007 /dev/sctp6 ->
../devices/pseudo/sctp6@0:sctp6

# ls -laF /dev/cha*

No match

# ls -alF /dev/chan* /dev/scsi/ch*

/dev/scsi/: No such file or directory



I also tried again, by adding all the other potential scsi address (0
through 15) for both lun 0 *and* 1 in the "/kernel/drv/sgen.conf" file,
but no luck with another "reboot -- -r".



What am I doing wrong? Why is the changer not being added as a device
that I can then access?



Thanks in advance,



Z
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Oct 16 17:32:06 2009

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:15 EST