Why I dont see tapes and autochanger

765 views
Skip to first unread message

Tomasz Michno

unread,
Mar 26, 2017, 7:19:39 PM3/26/17
to bareos-users
Hello!

I've got a problem with storage (BareOS 16.2.4 --> CentOS 7.3.1611 --> XenServer 7.1)

WEB-UI do not showing Autochanger and tapes in IBM Library.

[root@BRZE-BareOS bareos-sd.d]# lsscsi -g
[1:0:1:0] cd/dvd QEMU QEMU DVD-ROM 0.10 /dev/sr0 /dev/sg0
[3:0:0:0] tape IBM ULT3580-HH5 G9N1 /dev/st0 /dev/sg1
[3:0:0:1] mediumx IBM 3573-TL E.20 /dev/sch0 /dev/sg2
[root@BRZE-BareOS bareos-sd.d]#


[root@BRZE-BareOS bareos-sd.d]# mtx -f /dev/tape/by-id/scsi-1IBM_3573-TL_00L2U78BW629_LL0 status
Storage Changer /dev/tape/by-id/scsi-1IBM_3573-TL_00L2U78BW629_LL0:1 Drives, 24 Slots ( 1 Import/Export )
Data Transfer Element 0:Full (Storage Element 1 Loaded):VolumeTag = BB0044L5
Storage Element 1:Empty
Storage Element 2:Full :VolumeTag=BB0043L5
Storage Element 3:Full :VolumeTag=BB0042L5
Storage Element 4:Full :VolumeTag=BB0041L5
Storage Element 5:Full :VolumeTag=BB0027L5
Storage Element 6:Full :VolumeTag=BB0026L5
Storage Element 7:Full :VolumeTag=BB0028L5
Storage Element 8:Full :VolumeTag=BB0037L5
Storage Element 9:Full :VolumeTag=BB0036L5
Storage Element 10:Full :VolumeTag=BB0030L5
Storage Element 11:Full :VolumeTag=BB0029L5
Storage Element 12:Full :VolumeTag=BB0032L5
Storage Element 13:Full :VolumeTag=BB0040L5
Storage Element 14:Full :VolumeTag=BB0039L5
Storage Element 15:Full :VolumeTag=BB0038L5
Storage Element 16:Full :VolumeTag=BB0031L5
Storage Element 17:Full :VolumeTag=BB0033L5
Storage Element 18:Full :VolumeTag=BB0034L5
Storage Element 19:Full :VolumeTag=BB0035L5
Storage Element 20:Full :VolumeTag=BB0024L5
Storage Element 21:Full :VolumeTag=BB0025L5
Storage Element 22:Full :VolumeTag=CLNU58L1
Storage Element 23:Full :VolumeTag=BB0045L5
Storage Element 24 IMPORT/EXPORT:Empty

*status slots storage=Tape
Connecting to Storage daemon File at BRZE-BareOS:9103 ...
3306 Issuing autochanger "slots" command.
Device "3573-TL" has 24 slots.
Connecting to Storage daemon File at BRZE-BareOS:9103 ...
3306 Issuing autochanger "listall" command.
Slot | Volume Name | Status | Media Type | Pool |
------+------------------+-----------+----------------+--------------------------|
1*| BB0044L5 | ? | ? | ? |
2*| BB0043L5 | ? | ? | ? |
3*| BB0042L5 | ? | ? | ? |
4*| BB0041L5 | ? | ? | ? |
5*| BB0027L5 | ? | ? | ? |
6*| BB0026L5 | ? | ? | ? |
7*| BB0028L5 | ? | ? | ? |
8*| BB0037L5 | ? | ? | ? |
9*| BB0036L5 | ? | ? | ? |
10*| BB0030L5 | ? | ? | ? |
11*| BB0029L5 | ? | ? | ? |
12*| BB0032L5 | ? | ? | ? |
13*| BB0040L5 | ? | ? | ? |
14*| BB0039L5 | ? | ? | ? |
15*| BB0038L5 | ? | ? | ? |
16*| BB0031L5 | ? | ? | ? |
17*| BB0033L5 | ? | ? | ? |
18*| BB0034L5 | ? | ? | ? |
19*| BB0035L5 | ? | ? | ? |
20*| BB0024L5 | ? | ? | ? |
21*| BB0025L5 | ? | ? | ? |
22*| CLNU58L1 | ? | ? | ? |
23*| BB0045L5 | ? | ? | ? |
24@| ? | ? | ? | ? |


My configuration:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/etc/bareos/bareos-dir.d/pool/Full_Tape.conf

Pool {
Name = Full_Tape
Pool Type = Backup
Recycle = yes
Recycle Pool = Scratch
AutoPrune = yes
Storage = Tape
Volume Retention = 365 days
# Maximum Volume Bytes = 50G
Maximum Volumes = 100
# Label Format = "Full-"
}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/etc/bareos/bareos-dir.d/storage/Tape.conf

Storage {
Name = Tape
Address = BRZE-BareOS
Password = "b1xMf6sWp5K/wA5TKmVQLdQNBMvqgXW4IRqcBoRdmsfb"
Device = 3573-TL
Media Type = LTO5
#Media Type = ULT3580-HH5
}

/etc/bareos/bareos-dir.d/storage/File.conf

Storage {
Name = File
Address = BRZE-BareOS
Password = "b1xMf6sWp5K/wA5TKmVQLdQNBMvqgXW4IRqcBoRdmsfb"
Device = FileStorage
Media Type = File
}

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/etc/bareos/bareos-sd.d/autochanger/3573-TL.conf

Autochanger {
Name = 3573-TL
# adapt this, to match your storage loader
Changer Device = /dev/tape/by-id/scsi-1IBM_3573-TL_00L2U78BW629_LL0
#Changer Device = /dev/sg2

# an Autochanger can contain multiple drive devices
#Device = tapedrive-0
#Device = tapedrive-1
Device = ULT3580-HH5

Changer Command = "/usr/lib/bareos/scripts/mtx-changer %c %o %S %a %d"
}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/etc/bareos/bareos-sd.d/device/ULT3580-HH5.conf

Device {

Name = ULT3580-HH5
DeviceType = tape

# default:0, only required if the autoloader have multiple drives.
#DriveIndex = 0

# if only one drive is available, this is normally /dev/nst0.
# However, it is advised to access it via id (/dev/tape/by-id/...).
ArchiveDevice = /dev/tape/by-id/scsi-32004000e11168106-nst
#ArchiveDevice = /dev/nst0

# arbitrary string that descripes the the storage media.
# Bareos uses this to determine, which device can be handle what media.
MediaType = LTO5
#MediaType = ULT3580-HH5

# enable "Check Labels" if tapes with ANSI/IBM labels
# should be preserved
Check Labels = yes

AutoChanger = yes # default: no
AutomaticMount = yes # default: no
MaximumFileSize = 20GB # default: 1000000000 (1GB)
}


/etc/bareos/bareos-sd.d/device/FileStorage.conf

Device {
Name = FileStorage
Media Type = File
Archive Device = /var/lib/bareos/storage
LabelMedia = yes; # lets Bareos label unlabeled media
Random Access = yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
Description = "File device. A connecting Director must have the same Name and MediaType."
}


xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

And sometimes I do not know what the correct syntax should be:

MediaType = LTO5, MediaType = LTO-5 or Media Type = ULT3580-HH5

Auochanger missing.png

Damiano Verzulli

unread,
Mar 27, 2017, 6:01:01 AM3/27/17
to bareos...@googlegroups.com
So your hardware infrastructure can _CORRECTLY_ recognize the physical tapes inside your T/L. This is good, as it's an (obvious) requirements for BareOS to properly work.

Let's step over.

You're going, now, to ask BareOS, via the "status slot" command issued in "bconsole", what BareOS knows about such tapes:

*status slots storage=Tape


The good news is that BareOS _recognize_ there are physical tapes:
...but... the bad news is that BareOS knows _NOTHING_ about those tapes, with the only exception of the "external label" passed him from the barcode reader (more or less).

That's why, in the output above, you see a question mark in the "Status", "media Type" and "Pool" columns.

If you think carefully to this.... you see that it's _correct_. At this point, BareOS still _DON'T_ have any information about those tapes inside his own catalog (aka: the DB used by the Director to handle all of his activities).

This is shown, in the output above, by the "*" character shown right after the Slot id.

And... this is the very reason why here:

    http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-25500019.13

you can read:

	19.13 Use bconsole to display Autochanger content
	[...]
	If you see a * near the slot number, you have to run update slots command to synchronize autochanger content
	with your catalog.


HTH :-)


Bye,
DV


P.S.: Let me take this opportunity to point you this FUNDAMENTAL concept: BareOS is _REALLY_ powerfull. Much... much more than a common user might guess. But the barriers that need to be "jumped" to start using it in an effective manner, are _VERY_HIGH_. That' why here:
    http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-50001.2
is clearly reported: "if you are new to Unix systems or do not have offsetting experience with a sophisticated backup package, the Bareos project does not recommend using Bareos as it is much more difficult to setup and use than tar or dump". So, please, if you really need (and want) all of the feature of a sophisticated backup infrastructure that BareOS can provide... be ready to "read", to "study", to "experiment" and... to "struggle" (...and to report here about your progress) :-)

P.P.S.: your way to "document" your POSTs, on this list, is really detailed. Thanks for this :-)

--
Damiano Verzulli
e-mail: damiano....@gmail.com
---
possible?ok:while(!possible){open_mindedness++}
---
"...I want to serve my diskless Beowulf nodes via iSCSI with LVM over 
RAID5 on IDE disks ..."
			Oliver Xymoron (mlist.linux.scsi)


Tomasz Michno

unread,
Mar 27, 2017, 8:06:20 AM3/27/17
to bareos-users
Damiano! So should I let go -maybe you're right (but not yet)?

*update slots scan storage=Tape
Connecting to Storage daemon Tape at BRZE-BareOS:9103 ...


3306 Issuing autochanger "slots" command.
Device "3573-TL" has 24 slots.

Connecting to Storage daemon Tape at BRZE-BareOS:9103 ...
3306 Issuing autochanger "list" command.
Connecting to Storage daemon Tape at BRZE-BareOS:9103 ...
3902 Cannot mount Volume on Storage Device ""ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)" because:
Requested Volume "" on "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst) is not a Bareos labeled Volume, because: ERR=block.c:1021 Read zero bytes at 0:0 on device "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst).
No VolName for Slot=1 InChanger set to zero.
Connecting to Storage daemon Tape at BRZE-BareOS:9103 ...
3307 Issuing autochanger "unload slot 1, drive 0" command.
3304 Issuing autochanger "load slot 2, drive 0" command.
3305 Autochanger "load slot 2, drive 0", status is OK.
block.c:1021 Read zero bytes at 0:0 on device "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst).
block.c:1003 Read error on fd=4 at file:blk 0:0 on device "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst). ERR=Input/output error.
3902 Cannot mount Volume on Storage Device ""ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)" because:
Requested Volume "" on "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst) is not a Bareos labeled Volume, because: ERR=block.c:1003 Read error on fd=4 at file:blk 0:0 on device "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst). ERR=Input/output error.
No VolName for Slot=2 InChanger set to zero.
Connecting to Storage daemon Tape at BRZE-BareOS:9103 ...
3307 Issuing autochanger "unload slot 2, drive 0" command.
3304 Issuing autochanger "load slot 3, drive 0" command.
3305 Autochanger "load slot 3, drive 0", status is OK.
block.c:1003 Read error on fd=4 at file:blk 0:0 on device "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst). ERR=Input/output error.
block.c:1003 Read error on fd=4 at file:blk 0:0 on device "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst). ERR=Input/output error.
3902 Cannot mount Volume on Storage Device ""ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)" because:
Requested Volume "" on "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst) is not a Bareos labeled Volume, because: ERR=block.c:1003 Read error on fd=4 at file:blk 0:0 on device "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst). ERR=Input/output error.
No VolName for Slot=3 InChanger set to zero.

[...]


I must label the tapes and add to pool?

*label storage=Tape slot=1-24 label pool=Full_Tape barcodes

Tomasz Michno

unread,
Mar 27, 2017, 4:23:06 PM3/27/17
to bareos-users
1. *status slots storage=Tape
2. *label storage=Tape slot=1-24 label pool=Full_Tape barcodes
3. For one tape in slot 23 I use Cleaning Prefix
4. Again label storage=Tape slot=23 pool=Clean_Tape barcodes

And now:
*status slots storage=Tape
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Connecting to Storage daemon File at BRZE-BareOS:9103 ...


3306 Issuing autochanger "slots" command.
Device "3573-TL" has 24 slots.

Connecting to Storage daemon File at BRZE-BareOS:9103 ...
3306 Issuing autochanger "listall" command.
Slot | Volume Name | Status | Media Type | Pool |
------+------------------+-----------+----------------+--------------------------|

1 | BB0045L5 | Append | LTO5 | Full_Tape |
2 | BB0043L5 | Append | LTO5 | Full_Tape |
3 | BB0042L5 | Append | LTO5 | Full_Tape |
4 | BB0041L5 | Append | LTO5 | Full_Tape |
5 | BB0027L5 | Append | LTO5 | Full_Tape |
6 | BB0026L5 | Append | LTO5 | Full_Tape |
7 | BB0028L5 | Append | LTO5 | Full_Tape |
8 | BB0037L5 | Append | LTO5 | Full_Tape |
9 | BB0036L5 | Append | LTO5 | Full_Tape |
10 | BB0030L5 | Append | LTO5 | Full_Tape |
11 | BB0029L5 | Append | LTO5 | Full_Tape |
12 | BB0032L5 | Append | LTO5 | Full_Tape |
13 | BB0040L5 | Append | LTO5 | Full_Tape |
14 | BB0039L5 | Append | LTO5 | Full_Tape |
15 | BB0038L5 | Append | LTO5 | Full_Tape |
16 | BB0031L5 | Append | LTO5 | Full_Tape |
17 | BB0033L5 | Append | LTO5 | Full_Tape |
18 | BB0034L5 | Append | LTO5 | Full_Tape |
19 | BB0035L5 | Append | LTO5 | Full_Tape |
20 | BB0024L5 | Append | LTO5 | Full_Tape |
21 | BB0025L5 | Append | LTO5 | Full_Tape |


22*| CLNU58L1 | ? | ? | ? |

23%| BB0044L5 | Append | LTO5 | Full_Tape |


24@| ? | ? | ? | ? |

xxxxxxxxxxxxxxxxxxxxxxxxxxxx
What is this status marked "%" at position 23 and "@" at 24?
xxxxxxxxxxxxxxxxxxxxxxxxxxxx

*list media pool=Full_Tape
Using Catalog "MyCatalog"
+---------+------------+-----------+---------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+---------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten | Storage |
+---------+------------+-----------+---------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+---------+
| 6 | BB0043L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 2 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 7 | BB0042L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 3 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 8 | BB0041L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 4 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 9 | BB0027L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 5 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 10 | BB0026L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 6 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 11 | BB0028L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 7 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 12 | BB0037L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 8 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 13 | BB0036L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 9 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 14 | BB0030L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 10 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 15 | BB0029L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 11 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 16 | BB0032L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 12 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 17 | BB0040L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 13 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 18 | BB0039L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 14 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 19 | BB0038L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 15 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 20 | BB0031L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 16 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 21 | BB0033L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 17 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 22 | BB0034L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 18 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 23 | BB0035L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 19 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 24 | BB0024L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 20 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 25 | BB0025L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 21 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 27 | BB0045L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 1 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
| 28 | BB0044L5 | Append | 1 | 199 | 0 | 31,536,000 | 1 | 23 | 1 | LTO5 | 0000-00-00 00:00:00 | Tape |
+---------+------------+-----------+---------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+---------+

*list storages
+-----------+--------------+-------------+
| StorageId | Name | AutoChanger |
+-----------+--------------+-------------+
| 1 | File | 0 |
| 2 | LTO-5 | 0 |
| 3 | IBM-Ultrium5 | 0 |
| 4 | Tape | 0 |
+-----------+--------------+-------------+
*
How I can remove Id 2 and 3 (I have only two files File.conf and Tape.conf in /etc/bareos/bareos-dir.d/storage/)?
Why at Id 4 Autocharger is 0?


Devices.png

Damiano Verzulli

unread,
Mar 27, 2017, 6:30:46 PM3/27/17
to bareos...@googlegroups.com
Il 27/03/2017 22:23, Tomasz Michno ha scritto:
[...]
3306 Issuing autochanger "listall" command.
 Slot |   Volume Name    |   Status  |  Media Type    |         Pool             |
------+------------------+-----------+----------------+--------------------------|
[...]
   21 |         BB0025L5 |    Append |           LTO5 |                Full_Tape |
   22*|         CLNU58L1 |         ? |              ? |                        ? |
   23%|         BB0044L5 |    Append |           LTO5 |                Full_Tape |
   24@|                ? |         ? |              ? |                        ? |
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
What is this status marked "%" at position 23 and "@" at 24?
xxxxxxxxxxxxxxxxxxxxxxxxxxxx

I just went through a quick search within the source code (namely: [...]/src/dird/ua_status.c) and.... if I correctly understood the code:

- "@" means the slot is an "IMPORT" slot (the slot you can use to LOAD/UNLOAD tapes, WITHOUT pulling out the whole magazine, while the library is working);
- "%" means the related tape is in the drive;
- "*" mens the slot it's hosting an unknown/unusable tape (BTW: in your previous post, you had plenty of "*").

....but I'm not a "C language" master :-), so don't trust the above :-)


 
*list storages
+-----------+--------------+-------------+
| StorageId | Name         | AutoChanger |
+-----------+--------------+-------------+
|         1 | File         |           0 |
|         2 | LTO-5        |           0 |
|         3 | IBM-Ultrium5 |           0 |
|         4 | Tape         |           0 |
+-----------+--------------+-------------+
*
How I can remove Id 2 and 3 (I have only two files File.conf and Tape.conf in /etc/bareos/bareos-dir.d/storage/)?
Why at Id 4 Autocharger is 0?

Unfortunately on my (old) Bareos there is NO "list storages" command. But.... in the catalog, I have:


mysql> select * from Storage;

+-----------+--------------+-------------+
| StorageId | Name         | AutoChanger |
+-----------+--------------+-------------+
|         1 | TAPE_DOPPIO  |           1 |
|         2 | TAPE_SINGOLO |           1 |
+-----------+--------------+-------------+

And this matches the reality: I've _TWO_ tape libraries: one with a single drive; another with two drives. Both of them are "autochanger".

The above also matches my "bareos-dir.conf", where I have two "storage" sections:

-----------------------------------
Storage {
  Name = TAPE_DOPPIO
  Media Type = DT-LTO-3
  Device = LTO3-DT
  [...]
  Autochanger = yes
}

# 09-06-14 solo TAPE_DOPPIO
Storage {
  Name = TAPE_SINGOLO
  Media Type = ST-LTO-3
  Device = LTO3-ST
  [...]
  Autochanger = yes
}
-----------------------------------


So, as for your output, if your "dir.conf" hosts only two "Storage" sections, my "guess" is that you've a "broken" catalog, that, for some reasons, got "corrupted"/"misaligned" with the "dir.conf".

Bye,
DV
Reply all
Reply to author
Forward
0 new messages