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
*status slots storage=Tape
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
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)
*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
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?
[...] 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
*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?
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".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
}