Feb 152017
 

I have a system with three tape drives and two tape changers. If one tape library is powered off when the system boots, the device names for the other tape library may be skewed. That is, /dev/sa0 may not be the LTO-4 drive, it will be the SDLT drive. This is not ideal.

FreeBSD uses device.hints for this. I have used it before, and for quite some time, however, I learned something new about it today.

You might not get what you want if you specify the same bus/target/lun tuple more than once.

For example, I had this in /boot/device.hints:

# ch0 is the <IBM 3573-TL B.60>                 at scbus0 target 0 lun 1 (ch0,pass1)
hint.pass.1.at="scbus0"
hint.pass.1.target="0"
hint.pass.1.unit="1"

#hint.ch.0.at="scbus0"
#hint.ch.0.target="0"
#hint.ch.0.unit="1"

However, after boot, I was seeing this:

                 at scbus0 target 0 lun 1 (ch0,pass3)

By commenting out the hint.ch.0 lines, I was able to get the changer at pass1.

I am using mtx for my tape changers. This operates on the pass device, not the ch device.

Conversely, if I was using chio for my tape changers, I would want to hard wire the ch devices, not the pass device, because chio works on ch devices.

Conclusion: hardwire either the ch/sa or the pass device, but not both. That is, use a given bus/target/lun tuple only once.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive