Dear Martin,

this actually did the trick. 

So I added

"fast-eom=0" to the stinit.def

and it works.

But it is interesting as, for me, this looks like switiching off the fast 
movement to the end of the medium and not to the edn of the data written - but 
anyway :-)

Still, do you have an idea, why maximum block size=128K is working, but 
anything bigger isn't? This should not be connected with fast-eom, right?

Best,

Christian



-----Original-Nachricht-----
Betreff: Re: AW: [Bacula-users] Problem with missing EOD/EOF on LTO-5 Tape
Datum: 2021-03-02T15:31:07+0100
Von: "Martin Simmons" <mar...@lispworks.com>
An: "Christian Lehmann" <lcompu...@t-online.de>

Good, that explains the ERR=Erfolg in Bacula.  I don't understand how it would
pass the btape tests though.

You either need to turn off fast-eod, probably by

mt -f /dev/nst0 stclearoptions fast-eod

or modify the Device resource of your bacula-sd.conf file to include:

Hardware End of File = no

If you use stclearoptions then it needs to be done on every reboot at least
(but also check for the stinit startup script, which might be doing it).

__Martin


>>>>> On Tue, 2 Mar 2021 14:59:57 +0100 (CET), Christian Lehmann said:
> 
> Hi Martin,
> 
> yes, you are right:
> 
> mt -f /dev/nst0 eod && mt -f /dev/nst0 status
> 
> SCSI 2 tape drive:
> File number=-1, block number=-1, partition=0.
> Tape block size 0 bytes. Density code 0x58 (LTO-5).
> Soft error count since last status=0
> General status bits on (9010000):
> EOD ONLINE IM_REP_EN
> 
> Best,
> 
> Christian
> 
> 
> 
> -----Original-Nachricht-----
> Betreff: Re: AW: [Bacula-users] Problem with missing EOD/EOF on LTO-5 Tape
> Datum: 2021-03-02T12:34:22+0100
> Von: "Martin Simmons" <mar...@lispworks.com>
> An: "Christian Lehmann" <lcompu...@t-online.de>
> 
> Hi Christian,
> 
> Yes, I think fast-eod will cause problems.
> 
> Please try (1) again with "status" instead of "tell" to see what "File number"
> it reports.  I suspect it will be -1 after the eod.  "Tell" reports the block
> number, not the file number.
> 
> __Martin
> 
> 
>>>>> On Mon, 1 Mar 2021 19:52:32 +0100, Christian Lehmann said:
> > 
> > Hi Martin,
> > 
> > thank you very much for your comments.
> > 
> > 1. mt -f /dev/nst0 eod && mt -f /dev/nst0 tell
> > At block 5360012.
> > 
> > 2. mt -f /dev/nst0 stshowoptions
> > The options set: buffer-writes async-writes read-ahead fast-eod can-bsr 
> > can-partitions scsi2logical
> > 
> > If I read this, somewhere in the documentation that the "fast-eod" might 
> > cause problems, because SCSI-driver might not keep track on the file number 
> > correctly. But I assume this is not the problem here as the result of (1) 
> > correctly reports a block number. Am I right?
> > 
> > Thank you very much in advance!
> > 
> > Best,
> > 
> > Christian
> > 
> > -----Ursprüngliche Nachricht-----
> > Von: Martin Simmons <mar...@lispworks.com> 
> > Gesendet: Freitag, 26. Februar 2021 22:43
> > An: bacula-users@lists.sourceforge.net
> > Betreff: Re: [Bacula-users] Problem with missing EOD/EOF on LTO-5 Tape
> > 
> > Yes, as Alan said, the driver is st.
> > 
> > It would be useful to try the mt eod test again, but follow it by:
> > 
> > mt -f /dev/nst0 status
> > 
> > to see what "File number" it reports.  This is very similar to what Bacula 
> > is doing just before the error.
> > 
> > Also, it would be useful to see the output from:
> > 
> > mt -f /dev/nst0 stshowoptions
> > 
> > __Martin
> > 
> > 
> > 
>>>>> On Fri, 26 Feb 2021 15:07:22 +0100 (CET), Christian Lehmann said:
> > > Importance: normal
> > > 
> > > Hi Martin,
> > > 
> > > just proceeded as proposed:
> > > 
> > > srv-fs-de1:~# lsscsi -d
> > > 
> > > [0:2:0:0]    disk    LSI      MR9280-16i4e     2.13  /dev/sda [8:0]
> > > [0:2:1:0]    disk    LSI      MR9280-16i4e     2.13  /dev/sdb [8:16]
> > > [1:0:0:0]    disk    ATA      Samsung SSD 850  2B6Q  /dev/sdc [8:32]
> > > [9:0:4:0]    tape    TANDBERG LTO-5 HH         Z629  /dev/st0 [9:0]
> > > 
> > > still
> > > ls -l /sys/dev/*/9:0/device/driver
> > > 
> > > tell not more information as before:
> > > 
> > > lrwxrwxrwx 1 root root 0 Feb 26 14:52 /sys/dev/char/9:0/device/driver 
> > > -> ../../../../../../../bus/scsi/drivers/st
> > > 
> > > srv-fs-de1:/sys/dev/char/9:0/device/driver# ls -lh total 0
> > > lrwxrwxrwx 1 root root    0 Feb 26 14:55 9:0:4:0 -> 
> > > ../../../../devices/pci0000:00/0000:00:1c.0/0000:03:00.0/host9/target9:0:4/9:0:4:0
> > > --w------- 1 root root 4.0K Feb 26 14:55 bind
> > > -rw-r--r-- 1 root root 4.0K Feb 26 14:55 debug_flag
> > > -r--r--r-- 1 root root 4.0K Feb 26 14:55 fixed_buffer_size
> > > -r--r--r-- 1 root root 4.0K Feb 26 14:55 max_sg_segs
> > > lrwxrwxrwx 1 root root    0 Feb 26 14:55 module -> ../../../../module/st
> > > -r--r--r-- 1 root root 4.0K Feb 26 14:55 try_direct_io
> > > --w------- 1 root root 4.0K Feb 26 14:55 uevent
> > > --w------- 1 root root 4.0K Feb 26 14:55 unbind
> > > -r--r--r-- 1 root root 4.0K Feb 26 14:55 version
> > > 
> > > srv-fs-de1:/sys/dev/char/9:0/device/driver/module/drivers# ls scsi:st
> > > 
> > > srv-fs-de1:/sys/dev/char/9:0/device/driver/module/drivers/scsi:st# cat 
> > > version [20160209]
> > > 
> > > So the driver is just "st" - so the standard tape driver, am I right?
> > > 
> > > Any idea how to get to know what went wrong?
> > > 
> > > If I use a previuosly written, but not full bacula tape (after stopping 
> > > storage daemon and ejecting the tape).
> > > 
> > > mt -f /dev/nst0 eod works fine and afterwards I also get the current 
> > > block number by using mt -f /dev/nst0 tell
> > > 
> > > 
> > > Best,
> > > 
> > > Christian
> > > 
> > > 
> > > -----Original-Nachricht-----
> > > Betreff: Re: [Bacula-users] Problem with missing EOD/EOF on LTO-5 Tape
> > > Datum: 2021-02-26T14:53:57+0100
> > > Von: "Martin Simmons" <mar...@lispworks.com>
> > > An: "bacula-users@lists.sourceforge.net" 
> > > <bacula-users@lists.sourceforge.net>
> > > 
> > > If you do:
> > > 
> > > lsscsi -d
> > > 
> > > then it will print the major:minor device numbers after /dev/st0.
> > > 
> > > Then:
> > > 
> > > ls -l /sys/dev/*/${major}:${minor}/device/driver/
> > > 
> > > might show the name of the driver (module).
> > > 
> > > __Martin
> > > 
> > > 
>>>>> On Thu, 25 Feb 2021 16:59:29 +0100 (CET), Christian Lehmann said:
> > > > 
> > > > Hi Martin,
> > > > 
> > > > thank you very much for your answer,
> > > > 
> > > > Unfortunately, nothing is logged in syslog or the messages.
> > > > 
> > > > I am running a linux machine, kernel version is 5.10.0-1-amd64 (debian).
> > > > 
> > > > Concerning the driver, Does this help?
> > > > 
> > > > srv-fs-de1:/var/log# lsscsi
> > > > [0:2:0:0]    disk    LSI      MR9280-16i4e     2.13  /dev/sda
> > > > [0:2:1:0]    disk    LSI      MR9280-16i4e     2.13  /dev/sdb
> > > > [1:0:0:0]    disk    ATA      Samsung SSD 850  2B6Q  /dev/sdc
> > > > [9:0:4:0]    tape    TANDBERG LTO-5 HH         Z629  /dev/st0
> > > > srv-fs-de1:/var/log# find /sys | grep drivers.*9:0:4
> > > > /sys/bus/scsi/drivers/st/9:0:4:0
> > > > 
> > > > Best,
> > > > 
> > > > Christian
> > > > 
> > > > 
> > > > -----Original-Nachricht-----
> > > > Betreff: Re: [Bacula-users] Problem with missing EOD/EOF on LTO-5 
> > > > Tape
> > > > Datum: 2021-02-24T12:42:33+0100
> > > > Von: "Martin Simmons" <mar...@lispworks.com>
> > > > An: "Christian Lehmann" <lcompu...@t-online.de>
> > > > 
> > > > That is a strange error.  ERR=Erfolg (Success) means that ioctl 
> > > > returned non-zero but didn't set any errno.
> > > > 
> > > > Is there anything logged in the syslog (e.g. /var/log/messages or 
> > > > the system console)?
> > > > 
> > > > Is this Linux?  Which kernel driver are you using for the tape?
> > > > 
> > > > __Martin
> > > > 
> > > > 
>>>>> On Tue, 23 Feb 2021 15:31:36 +0100 (CET), Christian Lehmann said:
> > > > > 
> > > > > Dear all,
> > > > >  
> > > > > I have just missed the errors:
> > > > >  
> > > > > so I was performing a backup (which is finished).
> > > > >  
> > > > > Do an umount and take out of the tape (including rewinding).
> > > > >  
> > > > > Put in this tape and mount it (no error)
> > > > >  
> > > > > starting a new short backup --> tape is forwarded to the 
> > > > > corresponding position creating this error:
> > > > >  
> > > > > 23-Feb 15:12 fritzie15-sd JobId 14182: Volume "LTO-5-Tape0004-128K" 
> > > > > previously written, moving to end of data.
> > > > > 23-Feb 15:14 fritzie15-sd JobId 14182: Error: Unable to position 
> > > > > to end of data on Tape device "LTO-5-128K" (/dev/nst0): 
> > > > > ERR=tape_dev.c:363 ioctl MTIOCGET error on "LTO-5-128K" (/dev/nst0). 
> > > > > ERR=Erfolg.
> > > > > 23-Feb 15:14 fritzie15-sd JobId 14182: Marking Volume 
> > > > > "LTO-5-Tape0004-128K" 
> > > > > in Error in Catalog.
> > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > > -----Original-Nachricht-----
> > > > > Betreff: [Bacula-users] Problem with missing EOD/EOF on LTO-5 Tape
> > > > > Datum: 2021-02-23T15:19:37+0100
> > > > > Von: "Christian Lehmann" <lcompu...@t-online.de>
> > > > > An: "bacula-users@lists.sourceforge.net" 
> > > > > <bacula-users@lists.sourceforge.net>
> > > > >  
> > > > >  
> > > > >  
> > > > > Hello everybody,
> > > > >  
> > > > > I have a problem with a single LTO-5 Tape drive (Tandberg LTO-5 HH).
> > > > > I do backups spanning multiple Tapes, changing them manually.
> > > > > So I configured the storage daemon that it is automatically 
> > > > > pushing out the tape as soon as it is full.
> > > > > So my users (and me) can see this and load a new/the next tape. 
> > > > > Than bacula automatically mounts it and continue with the backup. 
> > > > > This works fine.
> > > > > But problems arise as soon as I have a tape, which is not full and 
> > > > > I want to unload it (for example to label a new tape or to restart 
> > > > > bacula or the server). If I just restart tape is pushed out as 
> > > > > soon as bacula is shutting down or during the restart (it is also 
> > > > > rewinded as expected). The same happens, if I "unmount" the tape 
> > > > > using bconsole.
> > > > > But, as soon as I start a new backup, which wants to use this tape 
> > > > > and I mount it again, bacula cannot find the position to continue 
> > > > > with the backup (someone suggested that this might be due to a 
> > > > > missing EOD mark, but if I write this one manually by mt, this does 
> > > > > not change the behaviour).
> > > > >  
> > > > > btape testing is working fine, if I disable the automatic pushout 
> > > > > of the tape (as my tape drive is not able to get the tape back in 
> > > > > again by itself).
> > > > >  
> > > > > Any help/ideas is/are apreciated.
> > > > >  
> > > > > Thank you all in advance!
> > > > >  
> > > > > Christian
> > > > >  
> > > > > Here is my bacula-sd.conf:
> > > > >  
> > > > > Storage { # definition of myself
> > > > >   Name = fritzie15-sd
> > > > >   SDPort = 9103 # Director's port
> > > > >   WorkingDirectory = "/var/lib/bacula"
> > > > >   Pid Directory = "/var/run"
> > > > >   Maximum Concurrent Jobs = 20
> > > > >   # SDAddresses = {
> > > > >   # ipv4 = {addr = 127.0.0.1; port = 9103;}
> > > > >   # ipv4 = {addr = 141.67.100.240; port = 9103;}
> > > > >   # }
> > > > >   SDAddress = 141.67.101.230
> > > > > }
> > > > > #
> > > > > # List Directors who are permitted to contact Storage daemon # 
> > > > > Director {
> > > > >   Name = fritzie15-dir
> > > > >   Password = "Something-very secret"
> > > > > }
> > > > >  
> > > > >  
> > > > > Device {
> > > > >   Name = FileStorage
> > > > >   Media Type = File
> > > > >   Archive Device = /srv/ag_dudziak_backup1/bacula
> > > > >   LabelMedia = yes; # lets Bacula label unlabeled media
> > > > >   Random Access = Yes;
> > > > >   AutomaticMount = yes; # when device opened, read it
> > > > >   RemovableMedia = no;
> > > > >   AlwaysOpen = no;
> > > > >   Maximum Volume Size = 100G;
> > > > >   Maximum Concurrent Jobs = 2
> > > > > }
> > > > >  
> > > > >  
> > > > >  
> > > > > Device {
> > > > >   Name = LTO-5-128K
> > > > >   Archive Device = /dev/nst0
> > > > >   Device Type = Tape
> > > > >   Media Type = LTO-5-128K
> > > > >   Labelmedia = yes
> > > > >   Random Access = no
> > > > >   # AutomaticMount = no
> > > > >   AutomaticMount = yes
> > > > >   RemovableMedia = yes
> > > > >   AlwaysOpen = yes
> > > > >   Maximum Concurrent Jobs = 1
> > > > >   Maximum File Size = 400G
> > > > >   Maximum Changer Wait = 2h
> > > > >   Volume Poll Interval = 5min
> > > > >   Offline on Unmount = yes
> > > > >   # Offline on Unmount = no
> > > > >   Spool Directory = /srv/ag_dudziak/bacula-spool/LTO-5-1M
> > > > >   Maximum Block Size = 128K
> > > > > }
> > > > >  
> > > > > I sticked to the block size of 128K as anything bigger did not 
> > > > > work (even with btape).
> > > > >  
> > > > >  
> > > > > 
> > > > 
> > > > 
> > > 
> > > 
> > > _______________________________________________
> > > Bacula-users mailing list
> > > Bacula-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/bacula-users
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > Bacula-users mailing list
> > > Bacula-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/bacula-users
> > > 
> > 
> > 
> > _______________________________________________
> > Bacula-users mailing list
> > Bacula-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/bacula-users
> > 
> > 
> 
> 



_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to