btape test - block size differs

9 views
Skip to first unread message

Jürgen Bereuter

unread,
Sep 14, 2025, 2:47:16 PM (10 days ago) Sep 14
to bareos-users
Hi,
i started the test and fill in btape on omnios, self-build binaries. The fill command exits with an error, when it tries to read the last block on tape 1. 
To solve that problem, i discovered, that get "errors" in the basic test command in btape (the block size is different!). I have no minimal/maximal block size in the config file.

btape-test:

Now the important part, I am going to attempt to append to the tape.


btape: stored/btape.cc:1855-0 Wrote one record of 1048476 bytes.

btape: stored/btape.cc:1857-0 Wrote block to device.

btape: stored/btape.cc:619-0 Wrote 1 EOF to "tapedrive-0" (/dev/rmt/0bn)

btape: stored/btape.cc:600-0 Rewound "tapedrive-0" (/dev/rmt/0bn)

Done appending, there should be no I/O errors


Doing Bareos scan of blocks:

1 block of 1048512 bytes in file 1

End of File mark.

2 blocks of 1048512 bytes in file 2

End of File mark.

3 blocks of 1048512 bytes in file 3

End of File mark.

1 block of 1048512 bytes in file 4

End of File mark.

Total files=4, blocks=7, bytes = 7,339,584

End scanning the tape.

We should be in file 4. I am at file 4. This is correct!


The above Bareos scan should have output identical to what follows.

Please double check it ...

=== Sample correct output ===

1 block of 64448 bytes in file 1

End of File mark.

2 blocks of 64448 bytes in file 2

End of File mark.

3 blocks of 64448 bytes in file 3

End of File mark.

1 block of 64448 bytes in file 4

End of File mark.

Total files=4, blocks=7, bytes = 451,136

=== End sample correct output ===





btape-fill

btape (100): stored/autochanger.cc:256-0 load slot 1 status=0

btape (100): stored/autochanger.cc:263-0 After changer, status=0

btape (100): stored/dev.cc:919-0 close_dev "tapedrive-0" (/dev/rmt/3mbn)

btape (100): stored/dev.cc:922-0 device "tapedrive-0" (/dev/rmt/3mbn) already closed vol=

btape (100): stored/acquire.cc:106-0 dcr=1323070 dev=1327870

btape (100): stored/acquire.cc:107-0 MediaType dcr= dev=LTO

btape (100): stored/acquire.cc:137-0 Want Vol=TestVolume1 Slot=1

btape (100): stored/acquire.cc:149-0 MediaType dcr= dev=LTO

btape (100): stored/acquire.cc:214-0 MediaType dcr= dev=LTO

btape (100): stored/acquire.cc:232-0 DirGetVolumeInfo vol=TestVolume1

btape (100): stored/askdir.cc:712-0 Fake DirGetVolumeInfo

btape (100): stored/mount.cc:608-0 No swap_dev set

btape (100): stored/mount.cc:562-0 Must load "tapedrive-0" (/dev/rmt/3mbn)

btape (100): stored/autochanger.cc:139-0 autoload: slot=1 InChgr=1 Vol=TestVolume1

btape (100): stored/autochanger.cc:263-0 After changer, status=0

btape (100): stored/acquire.cc:266-0 stored: open vol=TestVolume1

btape (100): stored/dev.cc:538-0 open dev: type=tape archive_device_string="tapedrive-0" (/dev/rmt/3mbn) vol=TestVolume1 mode=OPEN_READ_ONLY

btape (100): stored/dev.cc:556-0 call OpenDevice mode=OPEN_READ_ONLY

btape (100): backends/generic_tape_device.cc:60-0 Open dev: device is tape

btape (100): backends/generic_tape_device.cc:69-0 Try open "tapedrive-0" (/dev/rmt/3mbn) mode=OPEN_READ_ONLY

btape (100): backends/generic_tape_device.cc:89-0 Rewind after open

btape (100): backends/generic_tape_device.cc:135-0 open dev: tape 3 opened

btape (100): stored/dev.cc:562-0 preserve= fd=3

btape (100): stored/acquire.cc:275-0 opened dev "tapedrive-0" (/dev/rmt/3mbn) OK

btape (100): stored/acquire.cc:285-0 calling read-vol-label

btape (100): stored/dev.cc:481-0 setting minblocksize to 64512, maxblocksize to label_block_size=64512, on device "tapedrive-0" (/dev/rmt/3mbn)

btape (100): stored/block.cc:140-0 created new block of blocksize 64512 (dev->max_block_size)

btape (100): stored/dev.cc:495-0 created new block of buf_len: 64512 on device "tapedrive-0" (/dev/rmt/3mbn)

btape (100): stored/label.cc:87-0 Enter ReadVolumeLabel res=0 device="tapedrive-0" (/dev/rmt/3mbn) vol=TestVolume1 dev_Vol=*NULL* max_blocksize=64512

btape (100): stored/label.cc:244-0 Call reserve_volume=TestVolume1

btape (100): stored/dev.cc:404-0 Device "tapedrive-0" (/dev/rmt/3mbn) has dev->device->max_block_size of 1048576 and dev->max_block_size of 64512, dcr->VolMaxBlocksize is 0

btape (100): stored/dev.cc:413-0 setting dev->max_block_size to dev->device_resource->max_block_size=1048576 on device "tapedrive-0" (/dev/rmt/3mbn) because dcr->VolMaxBlocksize is 0

btape (100): stored/dev.cc:454-0 set minblocksize to 0, maxblocksize to 1048576 on device "tapedrive-0" (/dev/rmt/3mbn)

btape (100): stored/dev.cc:462-0 created new block of buf_len: 1048576 on device "tapedrive-0" (/dev/rmt/3mbn)

btape (100): stored/block.cc:140-0 created new block of blocksize 1048576 (dev->max_block_size)

btape (100): stored/dev.cc:466-0 created new block of buf_len: 1048576 on device "tapedrive-0" (/dev/rmt/3mbn), freeing block

btape (100): stored/acquire.cc:291-0 Got correct volume.

12-Sep. 10:50 btape JobId 0: Ready to read from volume "TestVolume1" on device "tapedrive-0" (/dev/rmt/3mbn).

btape (100): stored/acquire.cc:387-0 dcr=1323070 dev=1327870

btape (100): stored/acquire.cc:388-0 MediaType dcr= dev=LTO

Rewinding.

Reading the first 10'000 records from 0:0.

10'000 records read now at 1:313

Reposition from 1:313 to 8:111124

btape (100): backends/generic_tape_device.cc:1266-0 Reposition from 1:313 to 8:111124

btape (100): backends/generic_tape_device.cc:1274-0 fsf 7

btape (100): backends/generic_tape_device.cc:404-0 fsf

btape (100): backends/generic_tape_device.cc:1279-0 wanted_file=8 at_file=8

btape (100): backends/generic_tape_device.cc:1293-0 fsr 111124

btape (100): backends/generic_tape_device.cc:621-0 fsr 111124

btape (100): backends/generic_tape_device.cc:634-0 FSF fail: ERR=I/O error

btape (100): backends/generic_tape_device.cc:592-0 DevGetOsPos

btape (100): backends/generic_tape_device.cc:636-0 Adjust from 8:0 to 8:111124

Reposition error. ERR=backends/generic_tape_device.cc:647 ioctl MTFSR 111124 error on "tapedrive-0" (/dev/rmt/3mbn). ERR=I/O error.

*tape: stored/btape.cc:2358-0 do_unfill failed.



Reply all
Reply to author
Forward
0 new messages