Skip to content

Btape multiple tapes fill test issue #2002

@kabassanov

Description

@kabassanov

Bareos component version

23.0.5~pre146.7e91df1c0

Steps to reproduce

Hello,
I'm translating/updating discussion 1997 post. Logs posted here don't take in account this morning "Maximum File Size" modification. Briefly, after the first tape has been filled, 1000 blocks on the second tape are announced to be written, but they are not on the tape. It seems that only one block is on it (the first manual rb in btape does not trigger any error, but the next one does). It could be related to #2001 (if the end of session label is written at position 0 in the first file and not in the second one).

06:58:06 Flush block, write EOF
Wrote block=17000000, file,blk=17839,385 VolBytes=17,825,790,951,424 rate=121.7 MB/s
Wrote block=17005000, file,blk=17844,620 VolBytes=17,831,033,831,424 rate=121.6 MB/s
31-Oct 06:59 btape JobId 0: End of Volume "TestVolume1" at 17844:713 on device "Drive-2" (/dev/nst/tape1). Write of 1048576 bytes got -1.
31-Oct 06:59 btape JobId 0: Re-read of last block succeeded.
btape: stored/btape.cc:2643-0 Last block at: 17844:712 this_dev_block_num=713
btape: stored/btape.cc:2672-0 End of tape 17844:0. Volume Bytes=17,831,131,348,992. Write rate = 121.6 MB/s
31-Oct 06:59 btape JobId 0: End of medium on Volume "TestVolume1" Bytes=17,831,131,348,992 Blocks=17,005,092 at 31-Oct-2024 06:59.
31-Oct 06:59 btape JobId 0: 3307 Issuing autochanger "unload slot 1, drive 1" command.
...
31-Oct 07:05 btape JobId 0: 3304 Issuing autochanger "load slot 2, drive 1" command.
31-Oct 07:05 btape JobId 0: 3305 Autochanger "load slot 2, drive 1", status is OK.
Wrote Volume label for volume "TestVolume2".
31-Oct 07:06 btape JobId 0: Moving to end of data on volume "TestVolume2"
31-Oct 07:06 btape JobId 0: Warning: For Volume "TestVolume2":
The number of files mismatch! Volume=1 Catalog=0
Correcting Catalog
31-Oct 07:06 btape JobId 0: New volume "TestVolume2" mounted on device "Drive-2" (/dev/nst/tape1) at 31-Oct-2024 07:06.
btape: stored/btape.cc:2243-0 Wrote 1000 blocks on second tape. Done.
Done writing 0 records ...
Wrote End of Session label.
btape: stored/btape.cc:2310-0 Wrote state file last_block_num1=712 last_block_num2=47
btape: stored/btape.cc:2331-0

07:06:22 Done filling tapes at 2:49. Now beginning re-read of first tape ...
btape: stored/btape.cc:2413-0 Enter do_unfill
31-Oct 07:06 btape JobId 0: 3307 Issuing autochanger "unload slot 2, drive 1" command.
31-Oct 07:07 btape JobId 0: 3304 Issuing autochanger "load slot 1, drive 1" command.
31-Oct 07:09 btape JobId 0: 3305 Autochanger "load slot 1, drive 1", status is OK.
31-Oct 07:09 btape JobId 0: Ready to read from volume "TestVolume1" on device "Drive-2" (/dev/nst/tape1).
Rewinding.
Reading the first 10'000 records from 0:0.
10'000 records read now at 1:313
Reposition from 1:313 to 17844:712
Reading block 712.

The last block of the first tape matches.

31-Oct 07:10 btape JobId 0: 3307 Issuing autochanger "unload slot 1, drive 1" command.
31-Oct 07:12 btape JobId 0: 3304 Issuing autochanger "load slot 2, drive 1" command.
31-Oct 07:12 btape JobId 0: 3305 Autochanger "load slot 2, drive 1", status is OK.
31-Oct 07:13 btape JobId 0: Ready to read from volume "TestVolume2" on device "Drive-2" (/dev/nst/tape1).
Reposition from 0:0 to 0:1
Reading block 1.
Error reading block: ERR=stored/block.cc:1025 Read zero bytes at 0:0 on device "Drive-2" (/dev/nst/tape1).

btape: stored/btape.cc:2340-0 do_unfill failed.

Expected results

Test success...

Actual results

See above.

Environment

- OS: 
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Relevant log output

A little bit difficult to log 18TB tape filling process...

Relevant traces output

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

bugThis addresses a bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions