View Issue Details

IDProjectCategoryView StatusLast Update
0001034bareos-corestorage daemonpublic2019-12-12 13:27
Reporterarogge Assigned Toarogge  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSRHELOS Version7
Product Version17.2.7 
Summary0001034: Read error on tape may be misinterpreted as end-of-tape
DescriptionWhen an i/o error on a tape occurs immediately after an end-of-file mark, the sd interprets this as end-of-tape.

At least during a migration job this can lead to data-loss: the copying of the data ends at the reading error and the job simply skips the rest of the tape and terminates successfully.
Steps To Reproduce1. set up a Tape Pool with MHVTL and make sure you can migrate a job from and to this pool.
2. set "use volume once" on the Tape Pool.
3. set "Maximum File Size" on the Device to a small value
4. take a backup that is larger than the Maximum File Size you have set
5. patch d_read() in stored/backends/generic_tape_device.c to emulate a read error after a specific number of blocks have been read.
6. migrate backup job to tape pool
7. migrate backup job from tape pool ensuring a read error happens immediately after an end-of-file. The message will be something like: "Error: block.c:1006 Read error on fd=5 at file:blk 1:0 on device "dte0" (/dev/nst0). ERR=Input/output error. You will need to fiddle around with your reading error to happen at the right position.
TagsNo tags attached.

Relationships

related to 0001153 closedarogge Release Bareos 17.2.8 
child of 0000984 closedjoergs Release bareos-17.2.8 
child of 0001040 closedpstorz Release bareos-18.2.5 

Activities

arogge_adm

arogge_adm

2019-01-15 11:41

administrator   ~0003175

Fix committed to bareos dev branch with changesetid 10803.
arogge_adm

arogge_adm

2019-01-15 14:45

administrator   ~0003176

Fix committed to bareos dev branch with changesetid 10805.
arogge_adm

arogge_adm

2019-01-23 11:08

administrator   ~0003205

Fix committed to bareos bareos-18.2 branch with changesetid 10929.
arogge_adm

arogge_adm

2019-01-23 11:23

administrator   ~0003206

Fix committed to bareos bareos-17.2 branch with changesetid 10930.

Related Changesets

bareos: dev 2be266a8

2019-01-15 12:29

arogge_adm

Ported: N/A

Details Diff
stored: do not treat read error as EoT by default

Fixes 0001034: Read error on tape may be misinterpreted as end-of-tape
Previously stored treated a read-error immediately
following an end-of-file mark on a tape as end-of-tape
instead of an error.
This patch makes stored raise an error in this case,
but allows to switch back to the previous behaviour on
a per-device basis using the new configuration option
"Eof On Error Is Eot".
Affected Issues
0001034
mod - src/stored/backends/generic_tape_device.c Diff File
mod - src/stored/block.c Diff File
mod - src/stored/bls.c Diff File
mod - src/stored/btape.c Diff File
mod - src/stored/dev.h Diff File
mod - src/stored/label.c Diff File
mod - src/stored/read_record.c Diff File
mod - src/stored/stored_conf.c Diff File
mod - src/stored/stored_conf.h Diff File

bareos: dev 03c881a2

2019-01-15 12:29

arogge_adm

Ported: N/A

Details Diff
stored: do not treat read error as EoT by default

Fixes 0001034: Read error on tape may be misinterpreted as end-of-tape
Previously stored treated a read-error immediately
following an end-of-file mark on a tape as end-of-tape
instead of an error.
This patch makes stored raise an error in this case,
but allows to switch back to the previous behaviour on
a per-device basis using the new configuration option
"Eof On Error Is Eot".
Affected Issues
0001034
mod - core/src/stored/backends/generic_tape_device.cc Diff File
mod - core/src/stored/block.cc Diff File
mod - core/src/stored/bls.cc Diff File
mod - core/src/stored/btape.cc Diff File
mod - core/src/stored/dev.h Diff File
mod - core/src/stored/label.cc Diff File
mod - core/src/stored/read_record.cc Diff File
mod - core/src/stored/stored_conf.cc Diff File
mod - core/src/stored/stored_conf.h Diff File

bareos: bareos-18.2 c9f3c364

2019-01-15 12:29

arogge_adm


Committer: franku

Ported: N/A

Details Diff
stored: do not treat read error as EoT by default

Fixes 0001034: Read error on tape may be misinterpreted as end-of-tape.

Previous storagedaemons treated a read-error immediately following
an end-of-file mark on a tape as end-of-tape instead of an error.

This patch makes storagedaemons raise an error in this case, but
allows to switch back to the previous behaviour on a per-device
basis using the new configuration directive "Eof On Error Is Eot".
Affected Issues
0001034
mod - core/src/stored/backends/generic_tape_device.cc Diff File
mod - core/src/stored/block.cc Diff File
mod - core/src/stored/bls.cc Diff File
mod - core/src/stored/btape.cc Diff File
mod - core/src/stored/dev.h Diff File
mod - core/src/stored/label.cc Diff File
mod - core/src/stored/read_record.cc Diff File
mod - core/src/stored/stored_conf.cc Diff File
mod - core/src/stored/stored_conf.h Diff File

bareos: bareos-17.2 22b8eca5

2019-01-15 12:29

arogge_adm


Committer: franku

Ported: N/A

Details Diff
stored: do not treat read error as EoT by default

Fixes 0001034: Read error on tape may be misinterpreted as end-of-tape.

Previous storagedaemons treated a read-error immediately following
an end-of-file mark on a tape as end-of-tape instead of an error.

This patch makes storagedaemons raise an error in this case, but
allows to switch back to the previous behaviour on a per-device
basis using the new configuration directive "Eof On Error Is Eot".

Documented new configuration directive.
Affected Issues
0001034
mod - src/stored/backends/generic_tape_device.c Diff File
mod - src/stored/block.c Diff File
mod - src/stored/bls.c Diff File
mod - src/stored/btape.c Diff File
mod - src/stored/dev.h Diff File
mod - src/stored/label.c Diff File
mod - src/stored/read_record.c Diff File
mod - src/stored/stored_conf.c Diff File
mod - src/stored/stored_conf.h Diff File

Issue History

Date Modified Username Field Change
2019-01-15 10:08 arogge New Issue
2019-01-15 10:08 arogge Status new => assigned
2019-01-15 10:08 arogge Assigned To => arogge
2019-01-15 11:41 arogge_adm Changeset attached => bareos dev 2be266a8
2019-01-15 11:41 arogge_adm Note Added: 0003175
2019-01-15 11:41 arogge_adm Status assigned => resolved
2019-01-15 11:41 arogge_adm Resolution open => fixed
2019-01-15 14:45 arogge_adm Changeset attached => bareos dev 03c881a2
2019-01-15 14:45 arogge_adm Note Added: 0003176
2019-01-23 11:08 franku Changeset attached => bareos bareos-18.2 c9f3c364
2019-01-23 11:08 arogge_adm Note Added: 0003205
2019-01-23 11:23 franku Changeset attached => bareos bareos-17.2 22b8eca5
2019-01-23 11:23 arogge_adm Note Added: 0003206
2019-01-23 11:31 stephand Relationship added child of 0000984
2019-01-31 10:08 arogge_adm Relationship added child of 0001040
2019-01-31 10:22 arogge_adm Status resolved => closed
2019-12-12 13:27 arogge Relationship added related to 0001153