View Issue Details

IDProjectCategoryView StatusLast Update
0001034bareos-core[All Projects] storage daemonpublic2019-01-31 10:22
ReporteraroggeAssigned Toarogge 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSRHELOS Version7
Product Version17.2.7 
Target VersionFixed in Version 
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.
bareos-master: impact
bareos-master: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action

Relationships

child of 0000984 assignedjoergs Release bareos-17.2.8 
child of 0001040 resolvedpstorz 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 11:29:48

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 11:29:48

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 11:29:48

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 11:29:48

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