I can't run bare-os.sd

973 views
Skip to first unread message

Tomasz Michno

unread,
Mar 25, 2017, 8:54:40 PM3/25/17
to bareos-users
Hello!

Sorry for my english i am not good enough!
I'm not hiding that I'm just starting to get to know BareOS!

I'm installed on XenServer 7.1 as VM CentOS 7. To XenServer is connect tape library TL3100 and inside is one Drive IBM Ultrium 5.
On CentOS is BareOS 16.2.4. I'm redirect PCI ports from XS to VM (PCI PassThrough). I cant run bare-os.sd

Status on VM:

[root@BRZE-BareOS autochanger]# lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01)
00:02.0 VGA compatible controller: Device 1234:1111
00:03.0 SCSI storage controller: XenSource, Inc. Xen Platform Device (rev 02)
00:05.0 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel Host Adapter (rev 03)
00:06.0 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel Host Adapter (rev 03)

[root@BRZE-BareOS autochanger]# 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 device]# dmesg | grep 3:0:0
[169037.229006] scsi 3:0:0:0: Sequential-Access IBM ULT3580-HH5 G9N1 PQ: 0 ANSI: 6
[169037.244229] scsi 3:0:0:1: Medium Changer IBM 3573-TL E.20 PQ: 0 ANSI: 5
[169037.502748] scsi 3:0:0:0: Attached scsi generic sg1 type 1
[169037.502799] scsi 3:0:0:1: Attached scsi generic sg2 type 8
[169037.524809] st 3:0:0:0: Attached scsi tape st0
[169037.524823] st 3:0:0:0: st0: try direct i/o: yes (alignment 4 B)
[169037.546896] ch 3:0:0:1: [ch0] type #1 (mt): 0x1+1 [medium transport]
[169037.546899] ch 3:0:0:1: [ch0] type #2 (st): 0x1000+23 [storage]
[169037.546900] ch 3:0:0:1: [ch0] type #3 (ie): 0x10+1 [import/export]
[169037.546901] ch 3:0:0:1: [ch0] type #4 (dt): 0x101+1 [data transfer]
[169037.567576] ch 3:0:0:1: [ch0] dt 0x101:
[169037.567579] ch 3:0:0:1: [ch0] ID/LUN unknown
[169037.567581] ch 3:0:0:1: [ch0] INITIALIZE ELEMENT STATUS, may take some time ...
[169037.581512] ch 3:0:0:1: [ch0] ... finished
[169037.581515] ch 3:0:0:1: Attached scsi changer ch0
[188453.769695] scsi 3:0:0:0: Sequential-Access IBM ULT3580-HH5 G9N1 PQ: 0 ANSI: 6
[188453.784937] st 3:0:0:0: Attached scsi tape st0
[188453.784939] st 3:0:0:0: st0: try direct i/o: yes (alignment 4 B)
[188453.785000] st 3:0:0:0: Attached scsi generic sg1 type 1
[188453.789834] scsi 3:0:0:1: Medium Changer IBM 3573-TL E.20 PQ: 0 ANSI: 5
[188453.839759] ch 3:0:0:1: [ch0] type #1 (mt): 0x1+1 [medium transport]
[188453.839762] ch 3:0:0:1: [ch0] type #2 (st): 0x1000+23 [storage]
[188453.839764] ch 3:0:0:1: [ch0] type #3 (ie): 0x10+1 [import/export]
[188453.839765] ch 3:0:0:1: [ch0] type #4 (dt): 0x101+1 [data transfer]
[188577.872338] ch 3:0:0:1: [ch0] dt 0x101: READ ELEMENT STATUS failed
[188577.872342] ch 3:0:0:1: [ch0] INITIALIZE ELEMENT STATUS, may take some time ...
[188577.873579] ch 3:0:0:1: [ch0] ... finished
[188577.873581] ch 3:0:0:1: Attached scsi changer ch0
[188577.874033] ch 3:0:0:1: Attached scsi generic sg2 type 8


[root@BRZE-BareOS autochanger]# cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 01 Lun: 00
Vendor: QEMU Model: QEMU DVD-ROM Rev: 0.10
Type: CD-ROM ANSI SCSI revision: 05
Host: scsi3 Channel: 00 Id: 00 Lun: 00
Vendor: IBM Model: ULT3580-HH5 Rev: G9N1
Type: Sequential-Access ANSI SCSI revision: 06
Host: scsi3 Channel: 00 Id: 00 Lun: 01
Vendor: IBM Model: 3573-TL Rev: E.20
Type: Medium Changer ANSI SCSI revision: 05


[root@BRZE-BareOS /]# mtx -f /dev/sg2 status
Storage Changer /dev/sg2:1 Drives, 24 Slots ( 1 Import/Export )
Data Transfer Element 0:Empty
Storage Element 1:Full :VolumeTag=BB0044L5
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
[root@BRZE-BareOS /]# mtx -f /dev/sg1 inquiry
Product Type: Tape Drive
Vendor ID: 'IBM '
Product ID: 'ULT3580-HH5 '
Revision: 'G9N1'
Attached Changer API: No
[root@BRZE-BareOS /]# mtx -f /dev/sg2 inquiry
Product Type: Medium Changer
Vendor ID: 'IBM '
Product ID: '3573-TL '
Revision: 'E.20'
Attached Changer API: No

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

On CentOS is installed Bareos-Dir,Sd,Fd

I have (in location) /etc/bareos/bareos-dir.d/storage files File.conf and Tape.conf with the same password (It is correct?)

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

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

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

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

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

Device = ULT3580-HH5

Changer Command = "/usr/lib/bareos/scripts/mtx-changer %c %o %S %a %d"
}

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

/etc/bareos/bareos-sd.d/device/ULT3580-HH8.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/sg1

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

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

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

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."
}


xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

[root@BRZE-BareOS autochanger]# systemctl restart bareos-sd
Job for bareos-sd.service failed because the control process exited with error code. See "systemctl status bareos-sd.service" and "journalctl -xe" for details.
[root@BRZE-BareOS autochanger]# systemctl status bareos-sd
● bareos-sd.service - Bareos Storage Daemon service
Loaded: loaded (/usr/lib/systemd/system/bareos-sd.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Sun 2017-03-26 01:37:28 CET; 18s ago
Docs: man:bareos-sd(8)
Process: 27882 ExecStart=/usr/sbin/bareos-sd (code=exited, status=1/FAILURE)
Main PID: 10127 (code=exited, status=15)

Mar 26 01:37:27 BRZE-BareOS systemd[1]: bareos-sd.service: control process exited, code=exited status=1
Mar 26 01:37:27 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 01:37:27 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 01:37:27 BRZE-BareOS systemd[1]: bareos-sd.service failed.
Mar 26 01:37:28 BRZE-BareOS systemd[1]: bareos-sd.service holdoff time over, scheduling restart.
Mar 26 01:37:28 BRZE-BareOS systemd[1]: start request repeated too quickly for bareos-sd.service
Mar 26 01:37:28 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 01:37:28 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 01:37:28 BRZE-BareOS systemd[1]: bareos-sd.service failed.
[root@BRZE-BareOS autochanger]# btape
Tape block granularity is 1024 bytes.
▒f▒Wbtape: ERROR TERMINATION at parse_conf.c:292
Config error: Keyword "ChargerDevice" not permitted in this resource.
Perhaps you left the trailing brace off of the previous resource.
: line 4, col 17 of file /etc/bareos/bareos-sd.d/autochanger/3573-TL.conf
Charger Device = /dev/tape/by-id/scsi-1IBM_3573-TL_00L2U78BW629_LL0
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I hope for your understanding, and I'm wainting for help.

Damiano Verzulli

unread,
Mar 26, 2017, 2:51:37 AM3/26/17
to bareos...@googlegroups.com
Il 26/03/2017 01:54, Tomasz Michno ha scritto:
Hello!
[...]
I'm not hiding that I'm just starting to get to know BareOS!
Hi Tomas. Welcome in.


Status on VM:

[root@BRZE-BareOS autochanger]# lspci
[...]
00:03.0 SCSI storage controller: XenSource, Inc. Xen Platform Device (rev 02)
[...]

[root@BRZE-BareOS autochanger]# lsscsi -g
[...]
[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


You're running a very similar setup, as one of my bareos (v. 13.2.2) box (a phisical "IBM System x3655"):

[root@bareos ~]# lspci
[...]
17:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)
22:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)
[...]

[root@bareos ~]# lsscsi -g
[...]
[3:0:0:0]    tape    IBM      ULT3580-HH5      D8D5  /dev/st1   /dev/sg7
[3:0:0:1]    mediumx IBM      3573-TL          8.50  /dev/sch1  /dev/sg8
[4:0:0:0]    tape    IBM      ULT3580-HH5      D8D5  /dev/st0   /dev/sg5
[4:0:0:1]    mediumx IBM      3573-TL          8.50  /dev/sch0  /dev/sg6
[...]


[root@BRZE-BareOS device]# dmesg | grep 3:0:0
[169037.229006] scsi 3:0:0:0: Sequential-Access IBM      ULT3580-HH5      G9N1 PQ: 0 ANSI: 6
[169037.244229] scsi 3:0:0:1: Medium Changer    IBM      3573-TL          E.20 PQ: 0 ANSI: 5
[169037.502748] scsi 3:0:0:0: Attached scsi generic sg1 type 1
[169037.502799] scsi 3:0:0:1: Attached scsi generic sg2 type 8
[169037.524809] st 3:0:0:0: Attached scsi tape st0
[...]
[169037.581515] ch 3:0:0:1: Attached scsi changer ch0


[root@bareos ~]# dmesg | grep [34]:0:0
scsi 2:3:0:0: Enclosure         IBM-ESXS VSC7160          1.06 PQ: 0 ANSI: 3
scsi 4:0:0:0: Sequential-Access IBM      ULT3580-HH5      D8D5 PQ: 0 ANSI: 6
[...]
scsi 4:0:0:1: Medium Changer    IBM      3573-TL          8.50 PQ: 0 ANSI: 5
[...]
ses 2:3:0:0: Attached Enclosure device
st 4:0:0:0: Attached scsi tape st0
[...]
ch 4:0:0:1: Attached scsi changer ch0
[...]
scsi 3:0:0:0: Sequential-Access IBM      ULT3580-HH5      D8D5 PQ: 0 ANSI: 6
[...]
st 3:0:0:0: Attached scsi tape st1
[...]
st 3:0:0:0: Attached scsi generic sg7 type 1
scsi 3:0:0:1: Medium Changer    IBM      3573-TL          8.50 PQ: 0 ANSI: 5
[...]
ch 3:0:0:1: Attached scsi changer ch1
[...]

As you can see, our box is attached  to two distinct LTO-5 SAS tape-drives, enclosed within a single IBM T/L (as the T/L is driven by the drive, the O/S recognize two distinct devices related to the same T/L).



[root@BRZE-BareOS autochanger]# cat /proc/scsi/scsi
Attached devices:
[...]
Host: scsi3 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM      Model: ULT3580-HH5      Rev: G9N1
  Type:   Sequential-Access                ANSI  SCSI revision: 06
Host: scsi3 Channel: 00 Id: 00 Lun: 01
  Vendor: IBM      Model: 3573-TL          Rev: E.20
  Type:   Medium Changer                   ANSI  SCSI revision: 05

[root@bareos ~]# cat /proc/scsi/scsi
Attached devices:
[...]
Host: scsi4 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM      Model: ULT3580-HH5      Rev: D8D5
  Type:   Sequential-Access                ANSI  SCSI revision: 06
Host: scsi4 Channel: 00 Id: 00 Lun: 01
  Vendor: IBM      Model: 3573-TL          Rev: 8.50
  Type:   Medium Changer                   ANSI  SCSI revision: 05
Host: scsi3 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM      Model: ULT3580-HH5      Rev: D8D5
  Type:   Sequential-Access                ANSI  SCSI revision: 06
Host: scsi3 Channel: 00 Id: 00 Lun: 01
  Vendor: IBM      Model: 3573-TL          Rev: 8.50
  Type:   Medium Changer                   ANSI  SCSI revision: 05

Let me insist stating that scsi4:0:0:1 and scsi3:0:0:1 refers to the very same phisical T/L.



As the general architecture, our box is similar to your, as it runs DIR + SD + FD (although on [ancient/working] bareos 13.2.2)

Here are our main config item:

=> BareOS SD ( /etc/bareos/bareos-sd.conf )
Autochanger {
  Name = LTO3-DT
  Changer Device = /dev/tape/by-id/scsi-1IBM_3573-TL_00L2U78L8691_LL0
  Device = LTO3-DT-D0
  Device = LTO3-DT-D1
  Changer Command = "/etc/bareos/scripts/mtx-changer %c %o %S %a %d"
}
[...]
Device {
  Name = LTO3-DT-D0
  Drive Index = 0
  Media Type = DT-LTO-3
  Archive Device = /dev/tape/by-id/scsi-35000e11136884001-nst
  AutomaticMount = yes;               # when device opened, read it
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  Autochanger = yes
  Labelmedia = no
  Maximum Concurrent Jobs = 1
}

Device {
  Name = LTO3-DT-D1
  Drive Index = 1
  Media Type = DT-LTO-3
  Archive Device = /dev/tape/by-id/scsi-35000e11136884004-nst
  AutomaticMount = yes;               # when device opened, read it
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  Autochanger = yes
  Labelmedia = no
  Maximum Concurrent Jobs = 1
}

=> BareOS DIR ( /etc/bareos/bareos-dir.conf )
[...]
Storage {
  Name = TAPE_DOPPIO
  Media Type = DT-LTO-3
  Device = LTO3-DT
  Address = 10.0.49.35
  SDPort = 9103
  Password = [...]
  Autochanger = yes
  Maximum Concurrent Jobs = 2  
  Allow Compression = no
}
[...]

Having said all the above, let me add that:
  • we're not running/using WEB-UI: all our activities runs through "bconsole"
  • we carefully scratch down our own configurations. So, tipically, we remove all the stuff included in the RPMs and put down our own CFG files. This means...
  • we don't use the same approach as the 16.2 release. Altough we DO heavily use "@include", we rely on it to store client config data in an ordered way (from our-point-of-view, obviously);

Let me also add that:

  • we're 110% satisfied about bareos. As a backup platform, It's rock-solid and well-engineered. We won't consider other solutions, unless strictly required/needed (see below);
  • we're currently experiencing some problems (our main mail-server store 5TB of data and... backupping them [directly from the FD] tooks lot of time]. Anyway, this is the price that we are paying for a missing tuning (we're currently reinstalling the whole bareos infrastructure, with a dedicated DIR+MySQL and different/external SD-boxes and employing on-disk backups with copy/move jobs to tape. Hopefully things will run slightly faster. This, on 16.2.... that I started installing last week)


Back to your message:

[...]
▒f▒Wbtape: ERROR TERMINATION at parse_conf.c:292
Config error: Keyword "ChargerDevice" not permitted in this resource.
Perhaps you left the trailing brace off of the previous resource.
            : line 4, col 17 of file /etc/bareos/bareos-sd.d/autochanger/3573-TL.conf
  Charger Device = /dev/tape/by-id/scsi-1IBM_3573-TL_00L2U78BW629_LL0

from the (working) config snippet I cut/pasted above, you can see that my Autochanger directive include this:
  Changer Device = /dev/tape/by-id/scsi-1IBM_3573-TL_00L2U78L8691_LL0
  Changer Command = "/etc/bareos/scripts/mtx-changer %c %o %S %a %d"

and.... it's writte "Changer"... and not "Charger" :-)

Probably this might help [you] :-)

Should you have other questions, feel free to ask.

Bye,
DV


P.S.: We strongly rely on XEN --in general--, but I never tought about PCI-redirecting the SCSI channel inside the VMs. This could be an option, for our upcoming plans. Thanks for pointing 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 26, 2017, 7:54:17 AM3/26/17
to bareos-users
Damiano -I thank you very much for a quick reply and help!

I don't know this system and how to use the console, so the assumption was that me and other users could use BareOS via WEB-UI.
Of course you have a right and I corrected my mistake (Charger Device)!


Currently I have:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

[root@BRZE-BareOS device]# btape /dev/tape/by-id/scsi-32004000e11168106-nst
Tape block granularity is 1024 bytes.
btape: butil.c:274-0 Using device: "/dev/tape/by-id/scsi-32004000e11168106-nst" for writing.
btape: btape.c:482-0 open device "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst): OK
*test

=== Write, rewind, and re-read test ===

I'm going to write 10000 records and an EOF
then write 10000 records and an EOF, then rewind,
and re-read the data to verify that it is correct.

This is an *essential* feature ...

btape: btape.c:1167-0 Wrote 10000 blocks of 64412 bytes.
btape: btape.c:614-0 Wrote 1 EOF to "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1183-0 Wrote 10000 blocks of 64412 bytes.
btape: btape.c:614-0 Wrote 1 EOF to "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1225-0 Rewind OK.
10000 blocks re-read correctly.
Got EOF on tape.
10000 blocks re-read correctly.
=== Test Succeeded. End Write, rewind, and re-read test ===

btape: btape.c:1294-0 Block position test
btape: btape.c:1306-0 Rewind OK.
Reposition to file:block 0:4
Block 5 re-read correctly.
Reposition to file:block 0:200
Block 201 re-read correctly.
Reposition to file:block 0:9999
Block 10000 re-read correctly.
Reposition to file:block 1:0
Block 10001 re-read correctly.
Reposition to file:block 1:600
Block 10601 re-read correctly.
Reposition to file:block 1:9999
Block 20000 re-read correctly.
=== Test Succeeded. End Write, rewind, and re-read test ===



=== Append files test ===

This test is essential to Bareos.

I'm going to write one record in file 0,
two records in file 1,
and three records in file 2

btape: btape.c:584-0 Rewound "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:614-0 Wrote 1 EOF to "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:614-0 Wrote 1 EOF to "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:614-0 Wrote 1 EOF to "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:482-0 open device "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst): OK
btape: btape.c:584-0 Rewound "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1438-0 Now moving to end of medium.
btape: btape.c:635-0 Moved to end of medium.
We should be in file 3. I am at file 3. This is correct!

Now the important part, I am going to attempt to append to the tape.

btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:614-0 Wrote 1 EOF to "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:584-0 Rewound "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
Done appending, there should be no I/O errors

Doing Bareos scan of blocks:
1 block of 64448 bytes in file 1
End of File mark.
2 blocks of 64448 bytes in file 2
End of File mark.
3 blocks of 64448 bytes in file 3
End of File mark.
1 block of 64448 bytes in file 4
End of File mark.
Total files=4, blocks=7, bytes = 451,136
End scanning the tape.
We should be in file 4. I am at file 4. This is correct!

The above Bareos scan should have output identical to what follows.
Please double check it ...
=== Sample correct output ===
1 block of 64448 bytes in file 1
End of File mark.
2 blocks of 64448 bytes in file 2
End of File mark.
3 blocks of 64448 bytes in file 3
End of File mark.
1 block of 64448 bytes in file 4
End of File mark.
Total files=4, blocks=7, bytes = 451,136
=== End sample correct output ===

If the above scan output is not identical to the
sample output, you MUST correct the problem
or Bareos will not be able to write multiple Jobs to
the tape.


=== Write, backup, and re-read test ===

I'm going to write three records and an EOF
then backup over the EOF and re-read the last record.
Bareos does this after writing the last block on the
tape to verify that the block was written correctly.

This is not an *essential* feature ...

btape: btape.c:584-0 Rewound "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:820-0 Wrote first record of 64412 bytes.
btape: btape.c:831-0 Wrote second record of 64412 bytes.
btape: btape.c:842-0 Wrote third record of 64412 bytes.
btape: btape.c:614-0 Wrote 1 EOF to "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:858-0 Backspaced over EOF OK.
btape: btape.c:863-0 Backspace record OK.
btape: btape.c:881-0
Block re-read correct. Test succeeded!
=== End Write, backup, and re-read test ===



=== Forward space files test ===

This test is essential to Bareos.

I'm going to write five files then test forward spacing

btape: btape.c:584-0 Rewound "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:614-0 Wrote 1 EOF to "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:614-0 Wrote 1 EOF to "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:614-0 Wrote 1 EOF to "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:614-0 Wrote 1 EOF to "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1926-0 Wrote one record of 64412 bytes.
btape: btape.c:1928-0 Wrote block to device.
btape: btape.c:614-0 Wrote 1 EOF to "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:584-0 Rewound "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1653-0 Now forward spacing 1 file.
We should be in file 1. I am at file 1. This is correct!
btape: btape.c:1665-0 Now forward spacing 2 files.
We should be in file 3. I am at file 3. This is correct!
btape: btape.c:584-0 Rewound "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1678-0 Now forward spacing 4 files.
We should be in file 4. I am at file 4. This is correct!

btape: btape.c:1696-0 Now forward spacing 1 more file.
We should be in file 5. I am at file 5. This is correct!

=== End Forward space files test ===


Ah, I see you have an autochanger configured.
To test the autochanger you must have a blank tape
that I can write on in Slot 1.

Do you wish to continue with the Autochanger test? (y/n): y


=== Autochanger test ===

3301 Issuing autochanger "loaded" command.
Slot 1 loaded. I am going to unload it.
3302 Issuing autochanger "unload 1 0" command.
unload status=OK 0
3303 Issuing autochanger "load 1 0" command.
3303 Autochanger "load 1 0" status is OK.
btape: btape.c:482-0 open device "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst): OK
btape: btape.c:1583-0 Rewound "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)
btape: btape.c:1590-0 Wrote EOF to "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst)

The test autochanger worked!!

*quit
[root@BRZE-BareOS device]# mtx -f /dev/s2 inquiry
cannot open SCSI device '/dev/s2' - No such file or directory
[root@BRZE-BareOS device]# mtx -f inquiry
[root@BRZE-BareOS autochanger]# mtx -f /dev/tape/by-id/scsi-1IBM_3573-TL_00L2U78BW629_LL0 inquiry
Product Type: Medium Changer
Vendor ID: 'IBM '
Product ID: '3573-TL '
Revision: 'E.20'
Attached Changer API: No
[root@BRZE-BareOS autochanger]# 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


But I still can't run bareos-sr

[root@BRZE-BareOS ~]# systemctl status bareos-sd
● bareos-sd.service - Bareos Storage Daemon service
Loaded: loaded (/usr/lib/systemd/system/bareos-sd.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Sun 2017-03-26 13:12:08 CEST; 35min ago
Docs: man:bareos-sd(8)
Process: 1792 ExecStart=/usr/sbin/bareos-sd (code=exited, status=1/FAILURE)

Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service: control process exited, code=exited status=1
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service failed.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service holdoff time over, scheduling restart.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: start request repeated too quickly for bareos-sd.service
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service failed.
[root@BRZE-BareOS ~]# systemctl restart bareos-sd
Job for bareos-sd.service failed because the control process exited with error code. See "systemctl status bareos-sd.service" and "journalctl -xe" for details.
[root@BRZE-BareOS ~]# journalctl -u bareos-sd
-- Logs begin at Sun 2017-03-26 13:05:11 CEST, end at Sun 2017-03-26 13:47:22 CEST. --
Mar 26 13:05:27 BRZE-BareOS systemd[1]: Starting Bareos Storage Daemon service...
Mar 26 13:05:27 BRZE-BareOS bareos-sd[988]: [52B blob data]
Mar 26 13:05:27 BRZE-BareOS bareos-sd[988]: Config error: Cannot open config file "/etc/bareos/bareos-sd.d/*/*.conf": Permission denied
Mar 26 13:05:27 BRZE-BareOS systemd[1]: bareos-sd.service: control process exited, code=exited status=1
Mar 26 13:05:27 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:05:27 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:05:27 BRZE-BareOS systemd[1]: bareos-sd.service failed.
Mar 26 13:05:27 BRZE-BareOS systemd[1]: bareos-sd.service holdoff time over, scheduling restart.
Mar 26 13:05:27 BRZE-BareOS systemd[1]: Starting Bareos Storage Daemon service...
Mar 26 13:05:27 BRZE-BareOS bareos-sd[1075]: [52B blob data]
Mar 26 13:05:27 BRZE-BareOS bareos-sd[1075]: Config error: Cannot open config file "/etc/bareos/bareos-sd.d/*/*.conf": Permission denied
Mar 26 13:05:27 BRZE-BareOS systemd[1]: bareos-sd.service: control process exited, code=exited status=1
Mar 26 13:05:27 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:05:27 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:05:27 BRZE-BareOS systemd[1]: bareos-sd.service failed.
Mar 26 13:05:27 BRZE-BareOS systemd[1]: bareos-sd.service holdoff time over, scheduling restart.
Mar 26 13:05:27 BRZE-BareOS systemd[1]: Starting Bareos Storage Daemon service...
Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service: control process exited, code=exited status=1
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service failed.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service holdoff time over, scheduling restart.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Starting Bareos Storage Daemon service...
Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service: control process exited, code=exited status=1
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service failed.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service holdoff time over, scheduling restart.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Starting Bareos Storage Daemon service...
Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service: control process exited, code=exited status=1
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service failed.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service holdoff time over, scheduling restart.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: start request repeated too quickly for bareos-sd.service
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:12:08 BRZE-BareOS systemd[1]: bareos-sd.service failed.
Mar 26 13:47:21 BRZE-BareOS systemd[1]: Starting Bareos Storage Daemon service...
Mar 26 13:47:21 BRZE-BareOS systemd[1]: bareos-sd.service: control process exited, code=exited status=1
Mar 26 13:47:21 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:47:21 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:47:21 BRZE-BareOS systemd[1]: bareos-sd.service failed.
Mar 26 13:47:21 BRZE-BareOS systemd[1]: bareos-sd.service holdoff time over, scheduling restart.
Mar 26 13:47:21 BRZE-BareOS systemd[1]: Starting Bareos Storage Daemon service...
Mar 26 13:47:21 BRZE-BareOS systemd[1]: bareos-sd.service: control process exited, code=exited status=1
Mar 26 13:47:21 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:47:21 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:47:21 BRZE-BareOS systemd[1]: bareos-sd.service failed.
Mar 26 13:47:21 BRZE-BareOS systemd[1]: bareos-sd.service holdoff time over, scheduling restart.
Mar 26 13:47:21 BRZE-BareOS systemd[1]: Starting Bareos Storage Daemon service...
Mar 26 13:47:21 BRZE-BareOS systemd[1]: bareos-sd.service: control process exited, code=exited status=1
Mar 26 13:47:21 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:47:21 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:47:21 BRZE-BareOS systemd[1]: bareos-sd.service failed.
Mar 26 13:47:22 BRZE-BareOS systemd[1]: bareos-sd.service holdoff time over, scheduling restart.
Mar 26 13:47:22 BRZE-BareOS systemd[1]: Starting Bareos Storage Daemon service...
Mar 26 13:47:22 BRZE-BareOS systemd[1]: bareos-sd.service: control process exited, code=exited status=1
Mar 26 13:47:22 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:47:22 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:47:22 BRZE-BareOS systemd[1]: bareos-sd.service failed.
Mar 26 13:47:22 BRZE-BareOS systemd[1]: bareos-sd.service holdoff time over, scheduling restart.
Mar 26 13:47:22 BRZE-BareOS systemd[1]: Starting Bareos Storage Daemon service...
Mar 26 13:47:22 BRZE-BareOS systemd[1]: bareos-sd.service: control process exited, code=exited status=1
Mar 26 13:47:22 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:47:22 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:47:22 BRZE-BareOS systemd[1]: bareos-sd.service failed.
Mar 26 13:47:22 BRZE-BareOS systemd[1]: bareos-sd.service holdoff time over, scheduling restart.
Mar 26 13:47:22 BRZE-BareOS systemd[1]: start request repeated too quickly for bareos-sd.service
Mar 26 13:47:22 BRZE-BareOS systemd[1]: Failed to start Bareos Storage Daemon service.
Mar 26 13:47:22 BRZE-BareOS systemd[1]: Unit bareos-sd.service entered failed state.
Mar 26 13:47:22 BRZE-BareOS systemd[1]: bareos-sd.service failed.
lines 36-73/73 (END)

xxxxxxxxxxxx
I haven't got permissions?

Config error: Cannot open config file "/etc/bareos/bareos-sd.d/*/*.conf": Permission denied

Damiano Verzulli

unread,
Mar 26, 2017, 8:20:37 AM3/26/17
to Tomasz Michno, bareos-users


Il 26 mar 2017 1:54 PM, "Tomasz Michno" <tomek....@gmail.com> ha scritto:
Damiano -I thank you very much for a quick reply and help!

You're welcome :-)


xxxxxxxxxxxx
I haven't got permissions?

Config error: Cannot open config file "/etc/bareos/bareos-sd.d/*/*.conf": Permission denied

Chances are high that.... you're working as "root" and the files you've created are owned by root. 

The BareOS director run as "bareos" (on CentOS 7). So it cannot properly manage/access such files.

So a simple "chown -R bareos /etc/bareos" should solve your problem.

But:
1 - I bet you already knows about file permission so.... I wonder the real point you are pointing with your question;

2 - my "chown" can surely be "restricted" to better suit your own environment.

Bye,
DB

Tomasz Michno

unread,
Mar 26, 2017, 1:23:37 PM3/26/17
to bareos-users, tomek....@gmail.com
You're right! It's works!

Damiano, once again, I thank you very much!!!

I have more questions, but I will post them in the next threads.

(Device "ULT3580-HH5" (/dev/tape/by-id/scsi-32004000e11168106-nst) open but no Bareos volume is currently mounted.)

Reply all
Reply to author
Forward
0 new messages