Bareos 20 with Ubuntu server 20.04

107 views
Skip to first unread message

Robert

unread,
Dec 18, 2020, 12:36:22 PM12/18/20
to bareos...@googlegroups.com
Hi everybody,
I used previous versions of Bareos on my Ubuntu server (16.04) installation and was quite happy with
it. In summer I moved to new Ubuntu 20.04 and was desperately waiting for an appropriate update of
Bareos - until yesterday.
I installed the fresh Bareos 20 release w/o any issue and migrated my working /etc/bareos setup to my new server
but everytime the connected LTO was tried to be accessed I get the following error message:

Connecting to Storage daemon LTO at 192.168.0.254:9103 ...
stored/dev.cc:245 /dev/tape/by-id/scsi-1IBM_ULTRIUM-TD1_1391028290-nst has an unknown device type 2

    Device "My-LTO" requested by DIR could not be opened or does not exist.
3999 Device My-LTO not found or could not be opened.

I checked on equal Name/Device and MediaType settings of the director and the storage daemon.

Here's my SD LTO device config:

Device {                                                                                                                                                           
 Name = My-LTO                                                                                                                                                    
 DeviceType = Tape                                                                                                                                                
 MediaType = LTO-1                                                                                                                                                
 Archive Device = /dev/tape/by-id/scsi-1IBM_ULTRIUM-TD1_1391028290-nst                                                                                            
 AutomaticMount = yes
 AlwaysOpen = yes                                                                                                                                                 
 RemovableMedia = yes                                                                                                                                             
 RandomAccess = no                                                                                                                                                
 AutoChanger = no                                                                                                                                                 
 Spool Directory = /srv/data0/backup/spool                                                                                                                        
 Maximum Spool Size = 20G                                                                                                                                         
}

Currently I'm running out of ideas what's going on here and I appreciate any help to solve that issue.

Many thanks in advance and best regards,
Robert

DUCARROZ Birgit

unread,
Dec 18, 2020, 2:12:26 PM12/18/20
to Robert, bareos...@googlegroups.com
Hi,

what can you see when trying
cat /dev/tape/by-id/

?

Do you have ITDT tool installed? Can you try to check the LTO with
/opt/ITDT_LINUX/ITDT/itdt
U
1

?

What's the output of the following commands:

lsscsi -g
mt -f /dev/st0 status
/bin/mt -f /dev/tape/by-id/scsi-xxxxxxx-nst eject

?

Regards,
Birgit
> --
> You received this message because you are subscribed to the Google
> Groups "bareos-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to bareos-users...@googlegroups.com
> <mailto:bareos-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/bareos-users/1981989980.1272466.1608312934143%40mail.yahoo.com
> <https://groups.google.com/d/msgid/bareos-users/1981989980.1272466.1608312934143%40mail.yahoo.com?utm_medium=email&utm_source=footer>.

Robert@yahoomail

unread,
Dec 19, 2020, 4:58:12 AM12/19/20
to DUCARROZ Birgit, bareos...@googlegroups.com
Hi Birgit,
thanks for your quick reply. I forgot to mention, that a simple

tar cvf /dev/nst0 <file>
and also a
tar cvf /dev/tape/by-id/scsi-1IBM_ULTRIUM-TD1_1391028290-nst <file>

is working without any issue. But anyway, here are the answers to your questions:

1)
ro...@192.168.0.254:~# ll /dev/tape/by-id/
total 0
lrwxrwxrwx 1 root root  9 Dez 19 10:26 scsi-1391028290 -> ../../st0
lrwxrwxrwx 1 root root 10 Dez 19 10:26 scsi-1391028290-nst -> ../../nst0
lrwxrwxrwx 1 root root  9 Dez 19 10:26 scsi-1IBM_ULTRIUM-TD1_1391028290 -> ../../st0
lrwxrwxrwx 1 root root 10 Dez 19 10:26 scsi-1IBM_ULTRIUM-TD1_1391028290-nst -> ../../nst0

2)
ITDT tool is not installed and as already said, the tar commands directly addressing the LTO tape
are working without any issue. The same drive was also working flawless with previous Ubuntu 16.04
and Bareos 19.2.

3)
ro...@192.168.0.254:~# lsscsi -g
[7:0:3:0]    tape    IBM      ULTRIUM-TD1      4561  /dev/st0 /dev/sg10

ro...@192.168.0.254:~# mt -f /dev/st0 status
drive type = 114
drive status = 1073742848
sense key error = 0
residue count = 0
file number = 0
block number = 0

ro...@192.168.0.254:~# /bin/mt -f /dev/tape/by-id/scsi-1IBM_ULTRIUM-TD1_1391028290-nst eject
ejects the tape as expected

Hope this helps for further analysis.

Many thanks and best regards,
Robert

Am 18.12.20 um 20:12 schrieb 'DUCARROZ Birgit' via bareos-users:

DUCARROZ Birgit

unread,
Dec 19, 2020, 12:02:23 PM12/19/20
to Robert@yahoomail, bareos...@googlegroups.com
Hi Robert,

I'm not using Bareos 20, and I see the config file is a bit different,
but did you check if everything it is ok with the spaces between the =
and also within the denominations?

For example "MediaType = Tape" or "Media Type = Tape"

(my config from version 18.2):

Device {
Name = LTO7-Tape-Drive
Drive Index = 0
Media Type = Tape
Archive Device = /dev/tape/by-id/scsi-xxxxx-nst
LabelMedia = yes;
AutomaticMount = yes;
RemovableMedia = yes;
AlwaysOpen = no;
RandomAccess = no;
#Spool Directory = $SPOOLDIR
Maximum Concurrent Jobs = 1
}


Storage {
Name = Tape
Address = $HOSTNAME
SDPort = 9103
Password = $DIRPASS
Device = LTO7-Tape-Drive
Maximum Concurrent Jobs = 1
Media Type = Tape
Autochanger = no
}



Other point: Did you check that "Media Type" in Device matches with
"Media Type" in Storage and also that "Name" in Device matches with
"Device =" in Storage?

And what about the SDPort?

What happens if you comment out DeviceType?

Other point: I see you use /dev/st0. What happens if you use /dev/nst0,
which seems be scsi-1391028290-nst in your case

?

Regards,
Birgit

Robert@yahoomail

unread,
Dec 21, 2020, 9:41:39 AM12/21/20
to DUCARROZ Birgit, bareos...@googlegroups.com
Hi Birgit,
I checked multiple times on name matching and I also aligned my setup on your
config:

Device {
  Name = My-LTO
  Drive Index = 0
  Media Type = Tape
  Archive Device = /dev/tape/by-id/scsi-1IBM_ULTRIUM-TD1_1391028290-nst
  LabelMedia = yes
  AutomaticMount = yes
  AlwaysOpen = no
  RemovableMedia = yes
  RandomAccess = no
  Spool Directory = /srv/data0/backup/spool
  Maximum Spool Size = 20G
  Maximum Concurrent Jobs = 1
}

Storage {
  Name = LTO
  Address = 192.168.0.254
  SDPort = 9103
  Password = $PASS
  Device = My-LTO
  Media Type = Tape
  Maximum Concurrent Jobs = 1
  AutoChanger = no
}

but I'm always ending up with an error message by requesting a simple mount in bconsole:

Connecting to Storage daemon LTO at 192.168.0.254:9103 ...
stored/dev.cc:245 /dev/tape/by-id/scsi-1IBM_ULTRIUM-TD1_1391028290-nst has an unknown device type 2

     Device "My-LTO" requested by DIR could not be opened or does not exist.
3999 Device My-LTO not found or could not be opened.

Thanks and best regards,
Robert

Am 19.12.20 um 18:02 schrieb DUCARROZ Birgit:

DUCARROZ Birgit

unread,
Dec 21, 2020, 10:36:09 AM12/21/20
to Robert@yahoomail, bareos...@googlegroups.com
Please can you try *exactly* like this (just modify the hostname and set
your password):

/etc/bareos/bareos-dir.d/storage/Tape.conf
Storage {
Name = Tape
Address = hostname, no IP address here (do not use "localhost" here).
SDPort = 9103
Password = $DIRPASS
Device = LTO7-Tape-Drive
Maximum Concurrent Jobs = 1
Media Type = Tape
Autochanger = no
}

chown bareos.bareos /etc/bareos/bareos-dir.d/storage/Tape.conf
chmod 640 /etc/bareos/bareos-dir.d/storage/Tape.conf

cat /etc/bareos/bareos-sd.d/device/TapeStorage.conf
Device {
Name = LTO7-Tape-Drive
Drive Index = 0
Media Type = Tape
Archive Device = scsi-1391028290-nst
LabelMedia = yes;
AutomaticMount = yes;
RemovableMedia = yes;
AlwaysOpen = no;
RandomAccess = no;
#Spool Directory = $SPOOLDIR
Maximum Concurrent Jobs = 1
}

chown bareos.bareos /etc/bareos/bareos-sd.d/device/TapeStorage.conf
chmod 640 /etc/bareos/bareos-sd.d/device/TapeStorage.conf

(Then restart bareos services)
?

Kind regards,
Birgit

Robert@yahoomail

unread,
Dec 21, 2020, 11:26:31 AM12/21/20
to DUCARROZ Birgit, bareos...@googlegroups.com
Hi Birgit,
I copied and updated the given Configs accordingly but the error remains:

Connecting to Storage daemon Tape at <hostname>:9103 ...
stored/dev.cc:245 /dev/tape/by-id/scsi-1391028290-nst has an unknown device type 2

     Device "LTO7-Tape-Drive" requested by DIR could not be opened or does not exist.
3999 Device LTO7-Tape-Drive not found or could not be opened.

Meanwhile I observed that the connection to the database backend is not working.
I need to solve that one before going on with this issue. I'll come back to you once I fixed it.

Many thanks and best regards,
Robert

Am 21.12.20 um 16:36 schrieb DUCARROZ Birgit:

Robert@yahoomail

unread,
Dec 22, 2020, 11:58:24 AM12/22/20
to DUCARROZ Birgit, bareos...@googlegroups.com
Hi Birgit,
the good thing is, that I got my PostgreSQL backend now up and running and the Bareos test script is passing
without any issue:

====================================================================================================================================================================> Testing bareos-sd...
Done.

====================================================================================================================================================================> Testing bareos-fd...
Done.

==================================================================================================================================================================== > Testing bareos-dir...
Done.
==================================================================================================================================================================

Restart all services now? (sleeping some seconds, so you might interrupt)
[ ################################# ] 100 %
No running jobs found, continuing...

Restarting bareos services...
Done.

and I'm able to run FileStorage w/o any issue. So, in principle Bareos is up and running.
Nevertheless, the bad thing is, that the tape/LTO error has not vanished with the database fix:

Connecting to Storage daemon LTO at server:9103 ...
stored/dev.cc:245 /dev/tape/by-id/scsi-1IBM_ULTRIUM-TD1_1391028290-nst has an unknown device type 2

     Device "My-LTO" requested by DIR could not be opened or does not exist.
3999 Device My-LTO not found or could not be opened.

I'm still not able to access my tape by Bareos. I checked more than once whether the Na...@SD.Device
matches Dev...@DIR.Storage, otherwise Bareos wouldn't find the correct Archive Device given in the SD.Device
section.

Perhaps there's really something going wrong in Bareos 20 which wasn't caught during validation/verification.

Best regards, have a merry Christmas and please stay healthy,
Robert

Am 21.12.20 um 17:26 schrieb 'Robert@yahoomail' via bareos-users:

DUCARROZ Birgit

unread,
Dec 22, 2020, 12:28:39 PM12/22/20
to Robert@yahoomail, bareos...@googlegroups.com
Hi Robert,


Another thing to try would to be to change your FDPort into 9102

Another test would be to activate the debug level:

bareos-dir -t -d100


Maybe you can find some help on the following sites:
-
https://docs.bareos.org/Appendix/Troubleshooting.html#section-debug-messages
-
https://askubuntu.com/questions/680416/bacula-device-filestorage-requested-by-dir-could-not-be-opened-or-does-not-exi

Kind regards,
Birgit

Robert@yahoomail

unread,
Dec 22, 2020, 1:01:00 PM12/22/20
to DUCARROZ Birgit, bareos...@googlegroups.com
Hi Birgit,
the hint with the -d100 was really good. After starting bareos-sd in command-line
mode, I get the following message after access to the tape drive:

bareos-sd (90): stored/dir_cmd.cc:298-0 Message channel init completed.
bareos-sd (100): stored/dir_cmd.cc:1021-0 ok=1 drive=-65536 slot=0
bareos-sd (100): stored/sd_backends.cc:112-0 InitBackendDevice: checking backend /usr/lib/bareos/backends/libbareossd-tape.so
bareos-sd (100): stored/sd_backends.cc:117-0 InitBackendDevice: backend does not exist /usr/lib/bareos/backends/libbareossd-tape.so

Is there a file/library missing? I installed from the web-site http://download.bareos.org/bareos/release/20/xUbuntu_20.04/

Best regards,
Robert

Am 22.12.20 um 18:28 schrieb 'DUCARROZ Birgit' via bareos-users:

Robert@yahoomail

unread,
Dec 22, 2020, 1:32:10 PM12/22/20
to DUCARROZ Birgit, bareos...@googlegroups.com
Hi Birgit,
finally I fixed the issue. Indeed there's a package missing and was not installed with the
script provided in the documentation. I downloaded the
bareos-storage-tape_20.0.0-1_amd64.deb
and I installed it manually with "apt install ./bareos-storage-tape_20.0.0-1_amd64.deb"
Now the tape access is possible and works w/o any issue. I can't say why this specific package was
not installed. As already said, I used the script described in the manual.

Thanks for your support and best regards,
Robert

Am 22.12.20 um 19:00 schrieb Robert@yahoomail:
Reply all
Reply to author
Forward
0 new messages