ii bareos 16.2.4-3+deb9u1 ii
bareos-bat 16.2.4-3+deb9u1
....
Kaiu Simmer suggested
"
Looks like Bareos considers the tape (or the tape device) as
readonly. I'm stuck here. It's best to send this output to the
mailing list again, including your bareos version number. And mention
the error codes directly in the the subject line like
"3999 Device "/dev/nst0" not found or could not be opened" vs
"OPEN_READ_ONLY"
"
This debug from labeled operation
"
root@desk1:/home/Maciej# /usr/sbin/bareos-sd -f -d 150 -v
bareos-sd (100): parse_conf.c:151-0 config file =
/etc/bareos/bareos-sd.conf
bareos-sd (100): lex.c:356-0 glob /etc/bareos/bareos-sd.conf: 1 files
bareos-sd (100): lex.c:250-0 open config file:
/etc/bareos/bareos-sd.conf
bareos-sd (90): stored_conf.c:772-0 Inserting Director res:
bareos-storage-mon
bareos-sd (90): stored_conf.c:772-0 Inserting Device res: LTO3
bareos-sd (100): lex.c:356-0 glob /etc/bareos/bareos-sd.conf: 1 files
bareos-sd (100): lex.c:250-0 open config file:
/etc/bareos/bareos-sd.conf
bareos-storage-sd (100): jcr.c:141-0 read_last_jobs seek to 192
bareos-storage-sd (100): jcr.c:148-0 Read num_items=6
bareos-storage-sd (8): crypto_cache.c:55-0 Could not open crypto
cache file. /var/lib/bareos/bareos-sd.9103.cryptoc ERR=Nie ma takiego
pliku ani katalogu
bareos-storage-sd (10): socket_server.c:112-0 stored: listening on
port 9103
bareos-storage-sd (100): bnet_server_tcp.c:170-0 Addresses
host[ipv4;0.0.0.0;9103]
bareos-storage-sd (90): stored.c:651-0 calling init_dev
/var/lib/bareos/storage
bareos-storage-sd (100): dev.c:394-0 init_dev: tape=0
dev_name=/var/lib/bareos/storage
bareos-storage-sd (100): dev.c:396-0 dev=/var/lib/bareos/storage
dev_max_bs=0 max_bs=0
bareos-storage-sd (10): stored.c:653-0 SD init done
/var/lib/bareos/storage
bareos-storage-sd (100): block.c:127-0 created new block of blocksize
64512 (dev->device->label_block_size) as dev->max_block_size is zero
bareos-storage-sd (90): stored.c:651-0 calling init_dev /dev/nst0
bareos-storage-sd (100): sd_backends.c:113-0 init_backend_dev:
testing backend /usr/lib/bareos/backends/libbareossd-tape.so
bareos-storage-sd (100): dev.c:394-0 init_dev: tape=1 dev_name=/dev/nst0
bareos-storage-sd (100): dev.c:396-0 dev=/dev/nst0 dev_max_bs=0 max_bs=0
bareos-storage-sd (10): stored.c:653-0 SD init done /dev/nst0
bareos-storage-sd (100): block.c:127-0 created new block of blocksize
64512 (dev->device->label_block_size) as dev->max_block_size is zero
bareos-storage-sd (20): stored.c:672-0 calling first_open_device
"LTO3" (/dev/nst0)
bareos-storage-sd (120): device.c:266-0 start open_output_device()
bareos-storage-sd (129): device.c:285-0 Opening device.
bareos-storage-sd (100): dev.c:562-0 open dev: type=2 dev_name="LTO3"
(/dev/nst0) vol= mode=OPEN_READ_ONLY
bareos-storage-sd (100): dev.c:581-0 call open_device
mode=OPEN_READ_ONLY
bareos-storage-sd (100): generic_tape_device.c:49-0 Open dev: device
is tape
bareos-storage-sd (100): generic_tape_device.c:60-0 Try open "LTO3"
(/dev/nst0) mode=OPEN_READ_ONLY
bareos-storage-sd (100): generic_tape_device.c:88-0 Rewind after open
bareos-storage-sd (100): generic_tape_device.c:996-0 In
set_os_device_parameters
bareos-storage-sd (100): generic_tape_device.c:1002-0 Set block size
to zero
bareos-storage-sd (100): generic_tape_device.c:1018-0 MTSETDRVBUFFER
bareos-storage-sd (100): generic_tape_device.c:144-0 open dev: tape 4
opened
bareos-storage-sd (100): dev.c:589-0 preserve=0xf88a8db6 fd=4
bareos-storage-sd (129): device.c:291-0 open dev "LTO3" (/dev/nst0) OK
bareos-storage-sd (100): dev.c:503-0 setting minblocksize to 64512,
maxblocksize to label_block_size=64512, on device "LTO3" (/dev/nst0)
bareos-storage-sd (100): label.c:76-0 Enter read_volume_label res=0
device="LTO3" (/dev/nst0) vol= dev_Vol=*NULL* max_blocksize=64512
bareos-storage-sd (130): label.c:140-0 Big if statement in
read_volume_label
bareos-storage-sd (130): label.c:152-0 Could not unserialize Volume
label: ERR=label.c:870 Expecting Volume Label, got FI=0 Stream=0
len=64412
bareos-storage-sd (100): label.c:173-0 No volume label - bailing out
bareos-storage-sd (150): label.c:287-0 return 3
bareos-storage-sd (110): socket_server.c:79-0 Conn: Hello Director
bareos-dir calling
bareos-storage-sd (110): socket_server.c:97-0 Got a DIR connection at
11-sty-2018 11:13:53
bareos-storage-sd (50): cram-md5.c:68-0 send: auth cram-md5
<1193113693.1515665633@bareos-storage-sd> ssl=0
bareos-storage-sd (100): cram-md5.c:123-0 cram-get received: auth
cram-md5 <1045243833.1515665633@bareos-dir> ssl=0
bareos-storage-sd (99): cram-md5.c:143-0 sending resp to challenge:
W4+CK/h5b//pR6+st/RdgA
bareos-storage-sd (90): dir_cmd.c:282-0 Message channel init completed.
bareos-storage-sd (110): socket_server.c:79-0 Conn: Hello Director
bareos-dir calling
bareos-storage-sd (110): socket_server.c:97-0 Got a DIR connection at
11-sty-2018 11:13:59
bareos-storage-sd (50): cram-md5.c:68-0 send: auth cram-md5
<1146513242.1515665639@bareos-storage-sd> ssl=0
bareos-storage-sd (100): cram-md5.c:123-0 cram-get received: auth
cram-md5 <1632047325.1515665639@bareos-dir> ssl=0
bareos-storage-sd (99): cram-md5.c:143-0 sending resp to challenge:
f6tjYk/CskQ+ez/+yH+2wC
bareos-storage-sd (90): dir_cmd.c:282-0 Message channel init completed.
bareos-storage-sd (100): dir_cmd.c:941-0 ok=1 drive=0 slot=0
bareos-storage-sd (110): socket_server.c:79-0 Conn: Hello Director
bareos-dir calling
bareos-storage-sd (110): socket_server.c:97-0 Got a DIR connection at
11-sty-2018 11:45:11
bareos-storage-sd (50): cram-md5.c:68-0 send: auth cram-md5
<217412457.1515667511@bareos-storage-sd> ssl=0
bareos-storage-sd (100): cram-md5.c:123-0 cram-get received: auth
cram-md5 <1846222570.1515667511@bareos-dir> ssl=0
bareos-storage-sd (99): cram-md5.c:143-0 sending resp to challenge:
tX+gxA/Hjh/WW7kL18+KRB
bareos-storage-sd (90): dir_cmd.c:282-0 Message channel init completed.
"
W dniu środa, 10 stycznia 2018 11:14:18 UTC+1 użytkownik Maciej
Piasecki napisał:
I can't writing in my Ultrim 960
"Bareos requires the nst devices so / dev / nst0 instead of / dev /
st0. Shoe"
I tested all devices
"I'm not sure, if this solves the problem. You also get the btape test
program. Have you installed the bareos-storage-tape package?"
Of course
I testing configuration with dir (debian) and file
In email is attached config
from console...
root@desk1:/etc/amanda# less /etc/bareos/bareos-sd.conf
root@desk1:/etc/amanda# btape -v -c /etc/bareos/bareos-sd.conf LTO3
Tape block granularity is 1024 bytes.
btape: butil.c:274-0 Using device: "LTO3" for writing.
.
.
<long waiting>
.
.
^C
root@desk1:/etc# ^C
root@desk1:/etc# ^C
root@desk1:/etc# ^C
root@desk1:/etc# ^C
root@desk1:/etc# ^C
root@desk1:/etc# btape -v -c /etc/bareos/bareos-sd.conf LTO3
Tape block granularity is 1024 bytes.
btape: butil.c:274-0 Using device: "LTO3" for writing.
^C
root@desk1:/etc#
root@desk1:/etc# dmesg |grep nst
[ 7.135053] xc2028 2-0061: creating new instance
root@desk1:/etc# dmesg |grep st0
[ 0.894625] scsi host0: ahci
[ 5.756608] st 6:0:3:0: Attached scsi tape st0
[ 5.756612] st 6:0:3:0: st0: try direct i/o: yes (alignment 512 B)
[ 6.252610] st 6:0:3:0: [st0] Block limits 1 - 16777215 bytes.
root@desk1:/etc#
root@desk1:/etc#
Scanning SCSI subsystem for new devices
Scanning host 0 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning for device 0 0 0 0 ...
OLD: Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: KINGSTON SV300S3 Rev: BBF0
Type: Direct-Access ANSI SCSI revision: 05
Scanning host 1 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning for device 1 0 0 0 ...
OLD: Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: WDC WD10EZRX-00A Rev: 1A01
Type: Direct-Access ANSI SCSI revision: 05
Scanning host 2 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 3 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning for device 3 0 0 0 ...
OLD: Host: scsi3 Channel: 00 Id: 00 Lun: 00
Vendor: PIONEER Model: BD-RW BDR-207M Rev: 1.21
Type: CD-ROM ANSI SCSI revision: 05
Scanning host 4 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 5 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 6 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning for device 6 0 3 0 ...
OLD: Host: scsi6 Channel: 00 Id: 03 Lun: 00
Vendor: HP Model: Ultrium 3-SCSI Rev: G66D
Type: Sequential-Access ANSI SCSI revision: 03
My SD config in file (for test - default in Debian config is
directory from files)
-------------
#
# Default Bareos Storage Daemon Configuration file
#
# For Bareos release 12.4.4 (12 June 2013) -- suse SUSE Linux
Enterprise Server 11 (x86_64)
#
# You may need to change the name of your tape drive
# on the "Archive Device" directive in the Device
# resource. If you change the Name and/or the
# "Media Type" in the Device resource, please ensure
# that dird.conf has corresponding changes.
#
Storage { # definition of myself
Name = bareos-storage-sd
Maximum Concurrent Jobs = 20
# remove comment in next line to load plugins from specified
directory
# Plugin Directory = /usr/lib64/bareos/plugins
}
#
# List Directors who are permitted to contact Storage daemon
#
Director {
Name = bareos-dir
Password = "ZknJYcTKtHNuCCmc7c827hQVKWT5RKyEhw+tI7PTJ7nv"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the storage daemon
#
Director {
Name = bareos-storage-mon
Password = "ZknJYcTKtHNuCCmc7c827hQVKWT5RKyEhw+tI7PTJ7nv"
Monitor = yes
}
#
# Note, for a list of additional Device templates please
# see the directory <bareos-source>/examples/devices
# Or follow the following link:
#
http://bareos.svn.sourceforge.net/viewvc/bareos/trunk/bareos/examples/devices/
#
#
# Devices supported by this Storage daemon
# To connect, the Director's bareos-dir.conf must have the
# same Name and MediaType.
#
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;
}
#
# An autochanger device with two drives
#
#Autochanger {
# Name = Autochanger
# Device = Drive-1
# Device = Drive-2
# Changer Command = "/usr/lib/bareos/scripts/mtx-changer %c %o %S
%a %d"
# Changer Device = /dev/sg0
#}
#Device {
# Name = Drive-1 #
.....
#Device {
# Name = Drive-2 #
# Drive Index = 1
# Media Type = DLT-8000
...
#
# A Linux or Solaris LTO-2 tape drive
#
#Device {
# Name = LTO-2
# Media Type = LTO-2
....
#
# A Linux or Solaris LTO-3 tape drive
#
Device {
Name = LTO3
Media Type = LTO-3
Archive Device = /dev/st0
AutomaticMount = yes; # when device opened, read it
AlwaysOpen = yes;
RemovableMedia = yes;
RandomAccess = no;
Maximum File Size = 4GB
Changer Command = "/usr/lib/bareos/scripts/mtx-changer %c %o %S
%a %d"
# Changer Device = /dev/sg0
AutoChanger = no
# Enable the Alert command only if you have the mtx package loaded
# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
# If you have smartctl, enable this, it has more info than tapeinfo
# Alert Command = "sh -c 'smartctl -H -l error %c'"
}
#
# A Linux or Solaris LTO-4 tape drive
#
#Device {
# Name = LTO-4
# Media Type = LTO-4
....
#
# A FreeBSD tape drive
#
#Device {
# Name = DDS-4
# Description = "DDS-4 for FreeBSD"
....
#
# Send all messages to the Director,
# mount messages also are sent to the email address
#
Messages {
Name = Standard
director = bareos-dir = all
}