Tape autoloader management

Hi,
I should use an HP-autoloader tape-robot.
I’ve just installed mtx module to do it, but I have some doubts on how to proceede.

I’m using Suse11-sp1.

First of all, can you suggest me how to verify the correct behavior of the autoloader? I mean, if the driver are correctly loaded for this device.
I check it via “mtx status” but I’ve response “cannot open SCSI device ‘/dev/changer’ - no such file or directory”.
So I try to check /dev/st0 and /dev/sg0 , but the response in both case is “cannot open SCSI device xxxx - no media found”.

The autoloader is linked to a HP-SAS switch.

Thanks in advance,
Stefano

Some more informations:

hwinfo --tape

47: SCSI 00.0: 10601 Tape
[Created at scsi.1459]
UDI: /org/freedesktop/Hal/devices/pci_103c_323a_scsi_host_scsi_device_lun0_scsi_generic
Unique ID: Er1e.jH5QXkQpQf6
Parent ID: vTuk.Aop68pcgl28
SysFS ID: /class/scsi_tape/st0
SysFS BusID: 0:0:0:0
SysFS Device Link: /devices/pci0000:00/0000:00:07.0/0000:06:00.0/host0/target0:0:0/0:0:0:0
Hardware Class: unknown
Model: “HP Ultrium 4-SCSI”
Vendor: “HP”
Device: “Ultrium 4-SCSI”
Revision: “U61W”
Driver: “cciss”, “st”
Driver Modules: “cciss”
Device File: /dev/st0 (/dev/sg0)
Device Files: /dev/st0, /dev/tape/by-id/scsi-3500143801606c849, /dev/tape/by-path/pci-0000:06:00.0-scsi-0:0:0:0-0:0:0:0st
Device Number: char 9:0 (char 21:0)
Config Status: cfg=no, avail=yes, need=no, active=unknown
Attached to: #40 (RAID bus controller)

/proc # cd scsi
/proc/scsi # ll
total 0
dr-xr-xr-x 2 root root 0 Apr 19 11:38 cciss
-r–r–r-- 1 root root 0 Apr 19 11:38 device_info
-r–r–r-- 1 root root 0 Apr 19 11:38 scsi
dr-xr-xr-x 2 root root 0 Apr 19 11:38 sg
/proc/scsi # more scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: HP Model: Ultrium 4-SCSI Rev: U61W
Type: Sequential-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 00 Lun: 01
Vendor: HP Model: 1x8 G2 AUTOLDR Rev: 3.80
Type: Medium Changer ANSI SCSI revision: 05

I find the linked device, but maybe there is a bug:

lsscsi

[0:0:0:0] tape HP Ultrium 4-SCSI U61W /dev/st0
[0:0:0:1] mediumx HP 1x8 G2 AUTOLDR 3.80 /dev/sch0

/proc/scsi # more scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: HP Model: Ultrium 4-SCSI Rev: U61W
Type: Sequential-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 00 Lun: 01
Vendor: HP Model: 1x8 G2 AUTOLDR Rev: 3.80
Type: Medium Changer ANSI SCSI revision: 05

mtx -f /dev/sch0 status
/dev/sch0 is not an sg device, or old sg driver.

Maybe I can use /dev/sg1:

/proc/scsi # ls -la /dev/sg*
crw-r----- 1 root disk 21, 0 Apr 4 17:34 /dev/sg0
crw-r----- 1 root disk 21, 1 Apr 4 17:34 /dev/sg1
/proc/scsi # mtx -f /dev/sg1 status
Storage Changer /dev/sg1:1 Drives, 8 Slots ( 0 Import/Export )
Data Transfer Element 0:Empty
Storage Element 1:Full
Storage Element 2:Full
Storage Element 3:Empty
Storage Element 4:Empty
Storage Element 5:Empty
Storage Element 6:Empty
Storage Element 7:Empty
Storage Element 8:Empty

/proc/scsi # mtx -f /dev/sg0 status
mtx: Request Sense: Long Report=yes
mtx: Request Sense: Valid Residual=no
mtx: Request Sense: Error Code=70 (Current)
mtx: Request Sense: Sense Key=Illegal Request
mtx: Request Sense: FileMark=no
mtx: Request Sense: EOM=no
mtx: Request Sense: ILI=no
mtx: Request Sense: Additional Sense Code = 20
mtx: Request Sense: Additional Sense Qualifier = 00
mtx: Request Sense: BPV=no
mtx: Request Sense: Error in CDB=no
mtx: Request Sense: SKSV=no
READ ELEMENT STATUS Command Failed

In this way I don’t know if there are any other problems…
What do you think?

Thanks,
Ste

Hi Stefano,

In this way I don’t know if there are any other problems…
What do you think?

whatever you’re supposed to do with that changer - that’s to be tested.

Do you have any backup software that is supposed to work with the tape drive / changer? Then test that. If you’re supposed to support the changer via mtx, then test the changer operations.

Depending on the changer, there may be various modi of operations… starting with “sequential”, where the loader will auto-load tapes one by one, once the previous tape is filled - to “random access” in multiple virtual libraries, via bar code reading, auto-loading cleaning tapes, employing mail slots and controlling encryption.

So any advice from my side can only be generic: Test to see if things work the way they are supposed to work.

Controlling the changer via mtx (moving selected tapes from the lib to the drive, move them back) may mean nothing, if the future backup software doesn’t know how to handle the drive / changer. (But at least, that’d be a good start :slight_smile: ).

Regards,
Jens

Hi Jens,
thanks for your answer. What I don’t understand it’s why standard mtx module doesn’t recognized the /charger.
Is it just “a way” (a driver) to control the autoloader, or is it mandatory?

Thanks,
Stefano

Maybe the answer to my question is in mtx man:
“Set the symbolic link /dev/changer to point to that device name (if it is not doing so already).”

Stefano

Hi Stefano,

[QUOTE=Stefanik74;13200]Maybe the answer to my question is in mtx man:
“Set the symbolic link /dev/changer to point to that device name (if it is not doing so already).”

Stefano[/QUOTE]

yes, all in all this is a very simplified approach… there are some defaults compiled in, and mtx seems to use “/dev/changer” per default when looking for the changer’s device. If you have not set up a udev rule to handle that for you, you’ll need to manually create a symlink.

It’s “simplified” because when you have more than a single changer attached to the system, there will have to be more than one device :).

I recommend to use the “device names” via /dev/tape/by-id", because these are persistent across reboots. In my case I see entries like

myhost:/dev/tape # l by-id/ total 0 drwxr-xr-x 2 root root 100 Mar 28 16:18 ./ drwxr-xr-x 4 root root 80 Mar 28 16:18 ../ lrwxrwxrwx 1 root root 9 Mar 28 16:18 scsi-350014280032c08b8 -> ../../sg1 lrwxrwxrwx 1 root root 9 Mar 28 16:18 scsi-350014280032c08b9 -> ../../st0 lrwxrwxrwx 1 root root 10 Mar 28 16:18 scsi-350014280032c08b9-nst -> ../../nst0

where *b8 is referring to the changer and b9 is referring to the tape drive. My backup software is configured to use /dev/tape/by-id/scsi-350014280032c08b8 to access the changer device and /dev/tape/by-id/scsi-350014280032c08b9-nst to access the tape drive.

Regards,
Jens

Hi Jens,
thanks for your information.
One question more is on your tape on “st0”. I’ve the same situation and I “think” st0 is related to sg1. Is it right?
Is /dev/st0 the tape loaded from /dev/sg1 changer?

Thanks,
Stefano

Hi Stefano,

[QUOTE=Stefanik74;13237]Hi Jens,
thanks for your information.
One question more is on your tape on “st0”. I’ve the same situation and I “think” st0 is related to sg1. Is it right?
Is /dev/st0 the tape loaded from /dev/sg1 changer?

Thanks,
Stefano[/QUOTE]

the tape library connected to that server consists of multiple tape drives and a common robotic unit (“changer”). The tape drives are accessed via the (n)st0, (n)st1,… device files, while sg1 is the device to control the changer itself (move tapes from drive to storage slots, handle mail slot etc.).

Regards,
Jens

Thanks Jens.