Tape Libary, 2 drives

davlaw

Renowned Member
Apr 4, 2012
197
4
83
Are tape libraries still WIP?

I have a script that runs mtx for zeroing out tapes before use. And seems to work with either drive.

But not sure I'm dealing with the updated pmtx dealing with a multiple drive arrangement, or the drive itself ( It was added at the same time)

get same error with either gui or cli

root@pbs172:/var/log# pmtx load 13 --changer ADIC --drivenum 1
using device /dev/tape/by-id/scsi-ADICA0C0607908_LLA
Error: load drive failed - Illegal Request, Additional sense: Invalid element address
root@pbs172:/var/log#

pmtx status --changer ADIC , resulting response


root@pbs172:/var/log# pmtx status --changer ADIC
using device /dev/tape/by-id/scsi-ADICA0C0607908_LLA
Transport Element (Griper) 0: Empty
Data Transfer Element (Drive) 0: VolumeTag("000005"), Source: 16, Serial: F09C7CF000
Data Transfer Element (Drive) 1: Empty
Storage Element 1: VolumeTag("000153")
Storage Element 2: VolumeTag("000149")
Storage Element 3: VolumeTag("000147")
Storage Element 4: VolumeTag("000148")
Storage Element 5: VolumeTag("000146")
Storage Element 6: VolumeTag("000063")
Storage Element 7: VolumeTag("000062")
Storage Element 8: Empty
Storage Element 9: Empty
Storage Element 10: Empty
Storage Element 11: Empty
Storage Element 12: VolumeTag("000004")
Storage Element 13: VolumeTag("000006")
Storage Element 14: VolumeTag("000039")
Storage Element 15: VolumeTag("000041")
Storage Element 16: Empty
Storage Element 17: VolumeTag("000059")
Storage Element 18: VolumeTag("000011")
Storage Element 19: VolumeTag("000021")
Storage Element 20: VolumeTag("000034")
Storage Element 21: VolumeTag("000076")
Storage Element 22: VolumeTag("001009")
Storage Element 23: VolumeTag("000106")
Storage Element 24: VolumeTag("000075")
Storage Element 25: VolumeTag("000107")
Storage Element 26: VolumeTag("000132")
Storage Element 27: VolumeTag("001049")
Storage Element 28: VolumeTag("001047")
Storage Element 29: VolumeTag("001055")
Storage Element 30: VolumeTag("000156")
Import/Export 31: Empty
Import/Export 32: Empty
Import/Export 33: Empty
Import/Export 34: Empty
Import/Export 35: Empty
Import/Export 36: Empty



I have emptied the library, reconfigured partitions to include the drive.

Removed configs in PBS for library and drives, readd and reboot

My next step will be to do the same and make the recently added drive the only one in the library

But a bit confused that my scripts are working with mtx on the same drive
 
hi, what kind of changer drive do you have (model/type) ?
can you post your tape.cfg ? (/etc/proxmox-backup/tape.cfg )
 
Changer is a Dell ML6000 (rebranded Scalar_i500), drives are 2 LTO4 SAS

root@pbs172:/etc/proxmox-backup# cat tape.cfg
changer: ADIC
export-slots 31 32 33 34 35 36
path /dev/tape/by-id/scsi-ADICA0C0607908_LLA

lto: drive0
changer ADIC
path /dev/tape/by-id/scsi-F09C7CF000-sg

lto: drive1
changer ADIC
changer-drivenum 1
path /dev/tape/by-id/scsi-F09C7CF004-sg
root@pbs172:/etc/proxmox-backup#

The changer does have a control path configuration, which I had messed with, It points to the drive1 in the tape.cfg.

But when doing this I purge the partition setup and reboot the libary and reconfigure the partition (seems to make things less confusing for the library), reconfig PBS tape setup to update/match changes.

my script to erase is rather nasty. (tweaked to my use), but I see tape.cfg is using the drives mapped to -sg#

Not thinking it would make a differance, but the sg# mapped drives are using your newer driver?

#!/bin/sh

#LIBRARYB="scsi-1ADIC_A0C0316328_LLA"
LIBRARYB="scsi-ADICA0C0607908_LLA"
#DRIVE="scsi-3
DRIVE="1"
DRIVEPHY="scsi-F09C7CF004-nst"
#DRIVE="0"
#DRIVEPHY="scsi-F09C7CF000-nst"
for i in 1 2 3 4 5 6
do
echo $i
mtx -f /dev/tape/by-id/$LIBRARYB inquiry
#pmtx -f /dev/tape/by-id/$LIBRARYB status
mtx -f /dev/tape/by-id/$LIBRARYB load $i /dev/tape/by-id/$DRIVE
#pmtx -f /dev/tape/by-id/$LIBRARYB load $i $DRIVE
echo "rewind "
mt -f /dev/tape/by-id/$DRIVEPHY rewind
echo "weof "
mt -f /dev/tape/by-id/$DRIVEPHY weof
echo "rewoffi "
mt -f /dev/tape/by-id/$DRIVEPHY rewoffl
mtx -f /dev/tape/by-id/$LIBRARYB unload $i $DRIVE
done
exit 0
 
I did just try using -sg instead of the -nst drives. Just some ramblings..

So for this drive the mt command failed for the -sg drive

lrwxrwxrwx 1 root root 9 Apr 19 11:52 scsi-F09C7CF004 -> ../../st0
lrwxrwxrwx 1 root root 10 Apr 19 11:52 scsi-F09C7CF004-nst -> ../../nst0
lrwxrwxrwx 1 root root 9 Apr 19 11:52 scsi-F09C7CF004-sg -> ../../sg4
 
ok can you also post the output of
Code:
pmtx status --changer ADIC --output-format json-pretty
 
Ok, trying to learn what your looking for.... but by this I'm missing data on the second drive..

{
"Ok": {
"drives": [
{
"loaded_slot": 16,
"status": {
"VolumeTag": "000005"
},
"drive_serial_number": "F09C7CF000",
"vendor": "IBM",
"model": "ULTRIUM-TD4",
"element_address": 256
},
{
"loaded_slot": null,
"status": "Empty",
"drive_serial_number": null,
"vendor": null,
"model": null,
"element_address": 8224
}
],
"slots": [
{
"import_export": false,
"status": {
"VolumeTag": "000153"
},
"element_address": 4096
},
{
"import_export": false,
"status": {
"VolumeTag": "000149"
},
"element_address": 4097
},
{
"import_export": false,
"status": {
"VolumeTag": "000147"
},
"element_address": 4098
},
{
"import_export": false,
"status": {
"VolumeTag": "000148"
},
"element_address": 4099
},
{
"import_export": false,
"status": {
"VolumeTag": "000146"
},
"element_address": 4100
},
{
"import_export": false,
"status": {
"VolumeTag": "000063"
},
"element_address": 4101
},
{
"import_export": false,
"status": {
"VolumeTag": "000062"
},
"element_address": 4102
},
{
"import_export": false,
"status": "Empty",
"element_address": 4103
},
{
"import_export": false,
"status": "Empty",
"element_address": 4104
},
{
"import_export": false,
"status": "Empty",
"element_address": 4105
},
{
"import_export": false,
"status": "Empty",
"element_address": 4106
},
{
"import_export": false,
"status": {
"VolumeTag": "000004"
},
"element_address": 4107
},
{
"import_export": false,
"status": {
"VolumeTag": "000006"
},
"element_address": 4108
},
{
"import_export": false,
"status": {
"VolumeTag": "000039"
},
"element_address": 4109
},
{
"import_export": false,
"status": {
"VolumeTag": "000041"
},
"element_address": 4110
},
{
"import_export": false,
"status": "Empty",
"element_address": 4111
},
{
"import_export": false,
"status": {
"VolumeTag": "000059"
},
"element_address": 4112
},
{
"import_export": false,
"status": {
"VolumeTag": "000011"
},
"element_address": 4113
},
{
"import_export": false,
"status": {
"VolumeTag": "000021"
},
"element_address": 4114
},
{
"import_export": false,
"status": {
"VolumeTag": "000034"
},
"element_address": 4115
},
{
"import_export": false,
"status": {
"VolumeTag": "000076"
},
"element_address": 4116
},
{
"import_export": false,
"status": {
"VolumeTag": "001009"
},
"element_address": 4117
},
{
"import_export": false,
"status": {
"VolumeTag": "000106"
},
"element_address": 4118
},
{
"import_export": false,
"status": {
"VolumeTag": "000075"
},
"element_address": 4119
},
{
"import_export": false,
"status": {
"VolumeTag": "000107"
},
"element_address": 4120
},
{
"import_export": false,
"status": {
"VolumeTag": "000132"
},
"element_address": 4121
},
{
"import_export": false,
"status": {
"VolumeTag": "001049"
},
"element_address": 4122
},
{
"import_export": false,
"status": {
"VolumeTag": "001047"
},
"element_address": 4123
},
{
"import_export": false,
"status": {
"VolumeTag": "001055"
},
"element_address": 4124
},
{
"import_export": false,
"status": {
"VolumeTag": "000156"
},
"element_address": 4125
},
{
"import_export": true,
"status": "Empty",
"element_address": 16
},
{
"import_export": true,
"status": "Empty",
"element_address": 17
},
{
"import_export": true,
"status": "Empty",
"element_address": 18
},
{
"import_export": true,
"status": "Empty",
"element_address": 19
},
{
"import_export": true,
"status": "Empty",
"element_address": 20
},
{
"import_export": true,
"status": "Empty",
"element_address": 21
}
],
"transports": [
{
"status": "Empty",
"element_address": 1
}
]
}
}
 
Ok, trying to learn what your looking for.... but by this I'm missing data on the second drive..
yeah i'm trying to find out what our driver might do wrong.

the error message:
Error: load drive failed - Illegal Request, Additional sense: Invalid element address
indicates that the element address of the drive is wrong/invalid

so it seems that we read that wrong from the tape library
 
Thanks folks, much appreciated

I'm still not beyond having done something wrong somewhere..
 
Last edited:
I started to post this earlier, I have the same library mapped twice, but both to same device

Odd, its the only scsi device listed as such,

lrwxrwxrwx 1 root root 9 Apr 19 11:52 scsi-1ADIC_A0C0607908_LLA -> ../../sg5
lrwxrwxrwx 1 root root 9 Apr 19 11:52 scsi-3500308c09c7cf000 -> ../../st1
lrwxrwxrwx 1 root root 10 Apr 19 11:52 scsi-3500308c09c7cf000-nst -> ../../nst1
lrwxrwxrwx 1 root root 9 Apr 19 11:52 scsi-3500308c09c7cf000-sg -> ../../sg6
lrwxrwxrwx 1 root root 9 Apr 19 11:52 scsi-3500308c09c7cf004 -> ../../st0
lrwxrwxrwx 1 root root 10 Apr 19 11:52 scsi-3500308c09c7cf004-nst -> ../../nst0
lrwxrwxrwx 1 root root 9 Apr 19 11:52 scsi-3500308c09c7cf004-sg -> ../../sg4
lrwxrwxrwx 1 root root 9 Apr 19 11:52 scsi-ADICA0C0607908_LLA -> ../../sg5
lrwxrwxrwx 1 root root 9 Apr 19 11:52 scsi-F09C7CF000 -> ../../st1
lrwxrwxrwx 1 root root 10 Apr 19 11:52 scsi-F09C7CF000-nst -> ../../nst1
lrwxrwxrwx 1 root root 9 Apr 19 11:52 scsi-F09C7CF000-sg -> ../../sg6
lrwxrwxrwx 1 root root 9 Apr 19 11:52 scsi-F09C7CF004 -> ../../st0
lrwxrwxrwx 1 root root 10 Apr 19 11:52 scsi-F09C7CF004-nst -> ../../nst0
lrwxrwxrwx 1 root root 9 Apr 19 11:52 scsi-F09C7CF004-sg -> ../../sg4
 
I started to post this earlier, I have the same library mapped twice, but both to same device
that should not harm things

i am still trying to find if we parse the info from the scsi device wrong and get a wrong element_address from it (maybe our reads are misaligned or something)
can you post the output (caution, maybe it's long) for
Code:
sg_raw -r 64k /dev/tape/by-id/scsi-ADICA0C0607908_LLA B8 10 00 00 FF FF 01 FF FF FF 00 00

this sends the raw scsi command to the drive (a 'Read Element Status')
this is basically also what mtx inquiry does
 
that should not harm things

i am still trying to find if we parse the info from the scsi device wrong and get a wrong element_address from it (maybe our reads are misaligned or something)
can you post the output (caution, maybe it's long) for
Code:
sg_raw -r 64k /dev/tape/by-id/scsi-ADICA0C0607908_LLA B8 10 00 00 FF FF 01 FF FF FF 00 00

this sends the raw scsi command to the drive (a 'Read Element Status')
this is basically also what mtx inquiry does
Yep, was looking for a better way to capture, but here is what I got

Received 2196 bytes of data:
00 00 01 00 27 00 00 08 8c 01 80 00 34 00 00 00 34 ...'.......4...4
10 00 01 00 00 00 00 00 00 00 00 00 00 20 20 20 20 ............
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
30 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 ....
40 00 00 00 00 03 80 00 34 00 00 01 38 00 10 38 00 .......4...8..8.
50 00 00 00 00 00 00 00 00 20 20 20 20 20 20 20 20 ........
60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
70 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 ........
80 00 11 38 00 00 00 00 00 00 00 00 00 20 20 20 20 ..8.........
90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
a0 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 ....
b0 00 00 00 00 00 12 38 00 00 00 00 00 00 00 00 00 ......8.........
c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
e0 00 00 00 00 00 00 00 00 00 13 38 00 00 00 00 00 ..........8.....
f0 00 00 00 00 20 20 20 20 20 20 20 20 20 20 20 20 ....
100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
110 20 20 20 20 00 00 00 00 00 00 00 00 00 14 38 00 ..........8.
120 00 00 00 00 00 00 00 00 20 20 20 20 20 20 20 20 ........
130 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
140 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 ........
150 00 15 38 00 00 00 00 00 00 00 00 00 20 20 20 20 ..8.........
160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
170 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 ....
180 00 00 00 00 04 80 00 74 00 00 00 e8 01 00 01 00 .......t........
190 00 00 00 00 00 80 10 0c 30 30 30 30 30 36 20 20 ........000006
1a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1b0 20 20 20 20 20 20 20 20 00 00 00 00 02 01 00 22 ......."
1c0 49 42 4d 20 20 20 20 20 55 4c 54 52 49 55 4d 2d IBM ULTRIUM-
1d0 54 44 34 20 20 20 20 20 46 30 39 43 37 43 46 30 TD4 F09C7CF0
1e0 30 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00
1f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
200 01 01 08 00 00 00 00 00 00 00 00 00 20 20 20 20 ............
210 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
220 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 ....
230 02 01 00 22 49 42 4d 20 20 20 20 20 55 4c 54 52 ..."IBM ULTR
240 49 55 4d 2d 54 44 34 20 20 20 20 20 46 30 39 43 IUM-TD4 F09C
250 37 43 46 30 30 34 20 20 20 20 20 20 20 20 20 20 7CF004
260 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
270 20 20 20 20 02 80 00 34 00 00 06 18 10 00 09 00 ...4........
280 00 00 00 00 00 80 10 00 30 30 30 31 35 33 20 20 ........000153
290 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
2a0 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 ........
2b0 10 01 09 00 00 00 00 00 00 80 10 01 30 30 30 31 ............0001
2c0 34 39 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49
2d0 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 ....
2e0 00 00 00 00 10 02 09 00 00 00 00 00 00 80 10 02 ................
2f0 30 30 30 31 34 37 20 20 20 20 20 20 20 20 20 20 000147
300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
310 00 00 00 00 00 00 00 00 10 03 09 00 00 00 00 00 ................
320 00 80 10 03 30 30 30 31 34 38 20 20 20 20 20 20 ....000148
330 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
340 20 20 20 20 00 00 00 00 00 00 00 00 10 04 09 00 ............
350 00 00 00 00 00 80 10 04 30 30 30 31 34 36 20 20 ........000146
360 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
370 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 ........
380 10 05 09 00 00 00 00 00 00 80 10 05 30 30 30 30 ............0000
390 36 33 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63
3a0 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 ....
3b0 00 00 00 00 10 06 08 00 00 00 00 00 00 00 00 00 ................
3c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
3d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
3e0 00 00 00 00 00 00 00 00 10 07 08 00 00 00 00 00 ................
3f0 00 00 00 00 20 20 20 20 20 20 20 20 20 20 20 20 ....
400 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
410 20 20 20 20 00 00 00 00 00 00 00 00 10 08 08 00 ............
420 00 00 00 00 00 00 00 00 20 20 20 20 20 20 20 20 ........
430 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
440 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 ........
450 10 09 08 00 00 00 00 00 00 00 00 00 20 20 20 20 ............
460 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
470 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 ....
480 00 00 00 00 10 0a 08 00 00 00 00 00 00 00 00 00 ................
490 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
4a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
4b0 00 00 00 00 00 00 00 00 10 0b 09 00 00 00 00 00 ................
4c0 00 80 10 0b 30 30 30 30 30 34 20 20 20 20 20 20 ....000004
4d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
4e0 20 20 20 20 00 00 00 00 00 00 00 00 10 0c 09 00 ............
4f0 00 00 00 00 00 80 10 06 30 30 30 30 36 32 20 20 ........000062
500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
510 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 ........
520 10 0d 09 00 00 00 00 00 00 00 00 00 30 30 30 30 ............0000
530 33 39 20 20 20 20 20 20 20 20 20 20 20 20 20 20 39
540 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 ....
550 00 00 00 00 10 0e 09 00 00 00 00 00 00 00 00 00 ................
560 30 30 30 30 34 31 20 20 20 20 20 20 20 20 20 20 000041
570 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
580 00 00 00 00 00 00 00 00 10 0f 09 00 00 00 00 00 ................
590 00 80 10 0f 30 30 30 30 30 35 20 20 20 20 20 20 ....000005
5a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
5b0 20 20 20 20 00 00 00 00 00 00 00 00 10 10 09 00 ............
5c0 00 00 00 00 00 80 10 06 30 30 30 30 35 39 20 20 ........000059
5d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
5e0 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 ........
5f0 10 11 09 00 00 00 00 00 00 00 00 00 30 30 30 30 ............0000
600 31 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 11
610 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 ....
620 00 00 00 00 10 12 09 00 00 00 00 00 00 00 00 00 ................
630 30 30 30 30 32 31 20 20 20 20 20 20 20 20 20 20 000021
640 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
650 00 00 00 00 00 00 00 00 10 13 09 00 00 00 00 00 ................
660 00 00 00 00 30 30 30 30 33 34 20 20 20 20 20 20 ....000034
670 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
680 20 20 20 20 00 00 00 00 00 00 00 00 10 14 09 00 ............
690 00 00 00 00 00 00 00 00 30 30 30 30 37 36 20 20 ........000076
6a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
6b0 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 ........
6c0 10 15 09 00 00 00 00 00 00 00 00 00 30 30 31 30 ............0010
6d0 30 39 20 20 20 20 20 20 20 20 20 20 20 20 20 20 09
6e0 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 ....
6f0 00 00 00 00 10 16 09 00 00 00 00 00 00 00 00 00 ................
700 30 30 30 31 30 36 20 20 20 20 20 20 20 20 20 20 000106
710 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
720 00 00 00 00 00 00 00 00 10 17 09 00 00 00 00 00 ................
730 00 00 00 00 30 30 30 30 37 35 20 20 20 20 20 20 ....000075
740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
750 20 20 20 20 00 00 00 00 00 00 00 00 10 18 09 00 ............
760 00 00 00 00 00 00 00 00 30 30 30 31 30 37 20 20 ........000107
770 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
780 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 ........
790 10 19 09 00 00 00 00 00 00 00 00 00 30 30 30 31 ............0001
7a0 33 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 32
7b0 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 ....
7c0 00 00 00 00 10 1a 09 00 00 00 00 00 00 00 00 00 ................
7d0 30 30 31 30 34 39 20 20 20 20 20 20 20 20 20 20 001049
7e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7f0 00 00 00 00 00 00 00 00 10 1b 09 00 00 00 00 00 ................
800 00 00 00 00 30 30 31 30 34 37 20 20 20 20 20 20 ....001047
810 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
820 20 20 20 20 00 00 00 00 00 00 00 00 10 1c 09 00 ............
830 00 00 00 00 00 00 00 00 30 30 31 30 35 35 20 20 ........001055
840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
850 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 ........
860 10 1d 09 00 00 00 00 00 00 00 00 00 30 30 30 31 ............0001
870 35 36 20 20 20 20 20 20 20 20 20 20 20 20 20 20 56
880 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 00 ....
890 00 00 00 00 ....
root@pbs172:/dev/tape/by-id#
 
ok, it seems the forum software garbles that a bit, can you redirect the output into a file and attach that? sorry, i could have mentioned that first...
Code:
sg_raw -r 64k /dev/tape/by-id/scsi-ADICA0C0607908_LLA B8 10 00 00 FF FF 01 FF FF FF 00 00 2> output.txt
 
Ok was worried, try again. I tried a variation of that, guess I did not have the > in the right place
 

Attachments

  • output.txt
    10.4 KB · Views: 3
Last edited:
Thank you sir, did just that. Also was reading your post on pbs-dev

But another issue has popped up. Unable to barcode tape, with one drive. Maybe related?

Will wait for update, post new thread if it is still present. I think I have enough PBS format tapes to rotate it out (like I should be using it like this to have 4 weeks worth).
 
Various commands and result

root@pbs172:~# proxmox-tape drive list
┌────────┬────────────────────────────────────┬─────────┬────────┬─────────────┬────────────┐
│ name │ path │ changer │ vendor │ model │ serial │
╞════════╪════════════════════════════════════╪═════════╪════════╪═════════════╪════════════╡
│ drive0 │ /dev/tape/by-id/scsi-F09C7CF004-sg │ ADIC │ IBM │ ULTRIUM-TD4 │ F09C7CF004 │
└────────┴────────────────────────────────────┴─────────┴────────┴─────────────┴────────────┘
root@pbs172:~#



root@pbs172:~# proxmox-tape barcode-label
Error: unable to get (default) drive name
root@pbs172:~#

root@pbs172:~# proxmox-tape changer status
Error: unable to get (default) changer name
root@pbs172:~#

root@pbs172:~# proxmox-tape status
Error: unable to get (default) drive name
root@pbs172:~#

pmtx status --changer ADIC --output-format json-pretty

{
"Ok": {
"drives": [
{
"loaded_slot": null,
"status": "Empty",
"drive_serial_number": "F09C7CF004",
"vendor": "IBM",
"model": "ULTRIUM-TD4",
"element_address": 256
}
],
"slots": [
{
"import_export": false,
"status": {
"VolumeTag": "000153"
},
"element_address": 4096
},
{
"import_export": false,
"status": {
"VolumeTag": "000156"
},
"element_address": 4097
},
{
"import_export": false,
"status": {
"VolumeTag": "001009"
},
"element_address": 4098
},
{
"import_export": false,
"status": {
"VolumeTag": "001055"
},
"element_address": 4099
},
{
"import_export": false,
"status": {
"VolumeTag": "001049"
},
"element_address": 4100
},
{
"import_export": false,
"status": {
"VolumeTag": "001047"
},
"element_address": 4101
},
{
"import_export": false,
"status": {
"VolumeTag": "000149"
},
"element_address": 4102
},
{
"import_export": false,
"status": {
"VolumeTag": "000107"
},
"element_address": 4103
},
{
"import_export": false,
"status": {
"VolumeTag": "000063"
},
"element_address": 4104
},
{
"import_export": false,
"status": {
"VolumeTag": "000041"
},
"element_address": 4105
},
{
"import_export": false,
"status": {
"VolumeTag": "000132"
},
"element_address": 4106
},
{
"import_export": false,
"status": {
"VolumeTag": "000146"
},
"element_address": 4107
},
{
"import_export": false,
"status": {
"VolumeTag": "000039"
},
"element_address": 4108
},
{
"import_export": false,
"status": {
"VolumeTag": "000075"
},
"element_address": 4109
},
{
"import_export": false,
"status": {
"VolumeTag": "000076"
},
"element_address": 4110
},
{
"import_export": false,
"status": {
"VolumeTag": "000106"
},
"element_address": 4111
},
{
"import_export": false,
"status": {
"VolumeTag": "000147"
},
"element_address": 4112
},
{
"import_export": false,
"status": {
"VolumeTag": "000148"
},
"element_address": 4113
},
{
"import_export": false,
"status": {
"VolumeTag": "000034"
},
"element_address": 4114
},
{
"import_export": false,
"status": {
"VolumeTag": "000011"
},
"element_address": 4115
},
{
"import_export": false,
"status": {
"VolumeTag": "000021"
},
"element_address": 4116
},
{
"import_export": false,
"status": "Empty",
"element_address": 4117
},
{
"import_export": false,
"status": "Empty",
"element_address": 4118
},
{
"import_export": false,
"status": "Empty",
"element_address": 4119
},
{
"import_export": false,
"status": "Empty",
"element_address": 4120
},
{
"import_export": false,
"status": "Empty",
"element_address": 4121
},
{
"import_export": false,
"status": "Empty",
"element_address": 4122
},
{
"import_export": false,
"status": "Empty",
"element_address": 4123
},
{
"import_export": false,
"status": "Empty",
"element_address": 4124
},
{
"import_export": false,
"status": "Empty",
"element_address": 4125
},
{
"import_export": true,
"status": "Empty",
"element_address": 16
},
{
"import_export": true,
"status": "Empty",
"element_address": 17
},
{
"import_export": true,
"status": "Empty",
"element_address": 18
},
{
"import_export": true,
"status": "Empty",
"element_address": 19
},
{
"import_export": true,
"status": "Empty",
"element_address": 20
},
{
"import_export": true,
"status": "Empty",
"element_address": 21
}
],
"transports": [
{
"status": "Empty",
"element_address": 1
}
]
}
}


After issuing "label media" via GUI

2021-04-21T08:07:05-04:00: TASK ERROR: erase failed - Illegal Request, Additional sense: Invalid command operation code

root@pbs172:~# proxmox-tape barcode-label
Error: unable to get (default) drive name
root@pbs172:~#
 
In full disclosure, I'm still feeling "??" This config is slightly different, gui wise it might look the same. Tape library has 2 drive bays, using second one this time, unlike before was using the first one (top)

Going to clear the partition on the libary and reconfigure to the top bay. Reboot everything. I don't want to say its something like this, but I will feel better having gave it shot.
 
Error: unable to get (default) drive name
yeah you have to give it the name of the drive if the changer has multiple ones with '--drive DRIVENAME'
or export it with 'export PROXMOX_TAPE_DRIVE=DRIVENAME'
 
Gotcha, I remember doing that with 2 drives. But drive 0 is always default correct?

Anyway, duplicated error after re-config

erase failed - Illegal Request, Additional sense: Invalid command operation code

but no default drive...

root@pbs172:/dev/tape/by-id# proxmox-tape barcode-label
Error: unable to get (default) drive name
root@pbs172:/dev/tape/by-id#


Reason I go thru this is because once the control drive was replaced but not updated in the tape library config, weirdness ensued
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!