Skip to content

docs: add tape speed test, tapestat & sg_logs in troubleshooting#2537

Merged
BareosBot merged 5 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/master/docs-tapedrive-howto-debug
Feb 23, 2026
Merged

docs: add tape speed test, tapestat & sg_logs in troubleshooting#2537
BareosBot merged 5 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/master/docs-tapedrive-howto-debug

Conversation

@bruno-at-bareos
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos commented Feb 5, 2026

  • add section about how to test raw tape speed, to avoid reports
    using compressible data (/dev/zero) and not feeding large drive
    buffer.
  • add example how to use tapestat to monitor tape speed
  • add example of sg_logs output to diagnose tape drive and media
    hardware errors.

Fix issue#2534

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Required backport PRs have been created
  • Correct milestone is set

@bruno-at-bareos bruno-at-bareos added documentation This PR changes only documentation bug This addresses a bug labels Feb 5, 2026
@bruno-at-bareos bruno-at-bareos self-assigned this Feb 5, 2026
@bruno-at-bareos bruno-at-bareos linked an issue Feb 5, 2026 that may be closed by this pull request
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/docs-tapedrive-howto-debug branch from f4c320a to a6ae7da Compare February 5, 2026 14:51
@arogge arogge requested review from pstorz and sebsura February 10, 2026 10:36
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comments. I hope they make sense.

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/docs-tapedrive-howto-debug branch from fb4d427 to 7d87133 Compare February 11, 2026 13:07
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 13, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds extensive troubleshooting content to the manual: tape speed testing and monitoring, comprehensive sg_logs and tapestat examples for drives and autoloaders, expanded autochanger/mtx diagnostics and timing guidance, and detailed restore/bootstrap/catalog recovery procedures (no code or API changes).

Changes

Cohort / File(s) Summary
Troubleshooting Documentation Expansion
docs/manuals/source/Appendix/Troubleshooting.rst
Added ~743 lines: TapeSpeedTesting (MaximumFileSize, incompressible-data tests), tapestat and sg_logs examples for drives and autoloaders, Autochanger/mtx diagnostics and timing guidance (load_sleep, timing tests), expanded Restore procedures (pruned-job regex restores, bootstrap/catalog rebuilds), numerous typo fixes and section harmonization.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I nibble logs and hum a tape‑time tune,

I measure blocks beneath the moon,
I coax the changer, wait and test,
I stitch the catalog and do my best,
A nimble hop to keep backups in bloom.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: adding tape speed test, tapestat, and sg_logs documentation to troubleshooting.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into master
Description check ✅ Passed The PR description includes a clear summary of changes above the template and checks all required items in the author checklist.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@docs/manuals/source/Appendix/Troubleshooting.rst`:
- Around line 428-431: Fix the typos and grammar in the sg_logs guidance: change
“detailled” to “detailed”, “informations” to “information”, and remove the
duplicate “the” in “the the SCSI” so the sentence reads clearly (referencing the
:command:`sg_logs --all /dev/sgX` usage, the :file:`/dev/sgX` SCSI generic
device and :command:`lsscsi -g` hint); apply the same corrections to the
repeated occurrence noted (also applies to the other occurrence referenced).
🧹 Nitpick comments (2)
docs/manuals/source/Appendix/Troubleshooting.rst (2)

379-388: Make units consistent (GiB vs G) and tighten wording.

You switch between “200 GiB” and “200G” in the same guideline. That can confuse readers when configuring MaximumFileSize. Consider sticking to one unit format and spacing for bandwidth (e.g., “400 MB/s”).

✏️ Proposed wording/units cleanup
-   For LTO-7 a value of 200 GiB should work pretty good.
+   For LTO-7 a value of 200 GiB should work well.
@@
-   Modern tape drives have internal buffers of 1 GiB and more and a write speed of 400MB/s.
-   With :config:option:`sd/device/MaximumFileSize = 200G`, such a tape drive will write a file mark
+   Modern tape drives have internal buffers of 1 GiB and more and a write speed of 400 MB/s.
+   With :config:option:`sd/device/MaximumFileSize = 200 GiB`, such a tape drive will write a file mark

417-419: Standardize inline command formatting.

Use the existing :command: role to keep formatting consistent (especially for tapestat and the interval).

✏️ Suggested formatting update
-You can monitor performance operations of your tape drive using the :command:`tapestat 1` during a
-job to see how well your tape drive is keeping up with the data rate. The `1` is the interval that `tapestat` waits between updating the output.
+You can monitor performance operations of your tape drive using the :command:`tapestat 1` during a
+job to see how well your tape drive is keeping up with the data rate. The :command:`1` is the interval that :command:`tapestat` waits between updating the output.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
docs/manuals/source/Appendix/Troubleshooting.rst (4)

1208-1210: ⚠️ Potential issue | 🟠 Major

Fix invalid RST directive syntax.

The .. index:: directive has a stray backtick, which can break doc builds.

🛠️ Proposed fix
-.. index::`
+.. index::
    single: mtx-changer load

1234-1235: ⚠️ Potential issue | 🟡 Minor

Correct “paramenter” typos.

Spelling errors reduce clarity in a troubleshooting section.

✏️ Proposed fix
-   :strong:`load_sleep` paramenter in the config file :file:`/etc/bareos/mtx-changer.conf`. You can
+   :strong:`load_sleep` parameter in the config file :file:`/etc/bareos/mtx-changer.conf`. You can
@@
-   works, then you should configure the :strong:`load_sleep` paramenter in the config file
+   works, then you should configure the :strong:`load_sleep` parameter in the config file

Also applies to: 1253-1254


1291-1306: ⚠️ Potential issue | 🟡 Minor

Fix grammar and missing space in the restore section.

There are subject/verb agreement issues and a missing space after a period.

✏️ Proposed fix
-It is possible to configure Bareos in a way, that job information are still stored in the Bareos
-catalog, while the individual file information are already pruned.
+It is possible to configure Bareos in a way, that job information is still stored in the Bareos
+catalog, while the individual file information is already pruned.
@@
-   There were no files inserted into the tree, so file selection
-   is not possible.Most likely your retention policy pruned the files
+   There were no files inserted into the tree, so file selection
+   is not possible. Most likely your retention policy pruned the files

1736-1738: ⚠️ Potential issue | 🟡 Minor

Fix “probate” typo in restore guidance.

This looks like “appropriate”.

✏️ Proposed fix
-#. Start and stop the Bareos Director using the probate |dir| configuration files so that it can
+#. Start and stop the Bareos Director using the appropriate |dir| configuration files so that it can
🤖 Fix all issues with AI agents
In `@docs/manuals/source/Appendix/Troubleshooting.rst`:
- Around line 417-420: Update the wording for the tapestat and sg_logs
descriptions to be concise and correct: replace awkward phrases like
"performance operations" with "performance" and "errors counters" with "error
counters", rephrase the tapestat example to "You can monitor tape drive
performance during a job with :command:`tapestat 1` — the 1 is the update
interval" and apply the same tightening to the related lines referenced (sg_logs
description) so both entries use clear, grammatical wording and consistent
phrasing for intervals and counters.

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/docs-tapedrive-howto-debug branch from 46074dd to b75e490 Compare February 16, 2026 08:47
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/manuals/source/Appendix/Troubleshooting.rst (1)

1291-1293: ⚠️ Potential issue | 🟡 Minor

Fix singular “information” grammar.

“Information” is singular here.

✏️ Suggested edit
-It is possible to configure Bareos in a way, that job information are still stored in the Bareos
-catalog, while the individual file information are already pruned.
+It is possible to configure Bareos in a way that job information is still stored in the Bareos
+catalog, while the individual file information is already pruned.
🤖 Fix all issues with AI agents
In `@docs/manuals/source/Appendix/Troubleshooting.rst`:
- Around line 398-412: Update the example so the path and size labels match the
commands and outputs: change the code-block caption that currently mentions /tmp
to /var/tmp to match the dd/tar commands, and change the leading “10 GiB” label
to a consistent value (e.g., “≈10 GiB” or explicitly note the dd output shows
~9.7 GiB while tar reports ~11GiB) so the dd command (dd if=/dev/urandom
of=/var/tmp/random bs=1M count=10240) and the tar --totals output are described
consistently.

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/docs-tapedrive-howto-debug branch from b75e490 to 5a43028 Compare February 16, 2026 09:36
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/manuals/source/Appendix/Troubleshooting.rst (1)

402-409: Clarify /tmp size/tmpfs assumption for the 10 GiB test.

On many systems /tmp is not tmpfs or is size-limited; the example may fail or swap heavily. Consider noting “ensure /tmp has ≥10 GiB free or use /var/tmp/another filesystem.”

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/docs-tapedrive-howto-debug branch from 5a43028 to b59819a Compare February 16, 2026 12:41
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@docs/manuals/source/Appendix/Troubleshooting.rst`:
- Around line 1088-1089: Fix the incomplete sentence by making the action on
"detailed information" explicit: replace "To a certain extent the command might
help diagnose autoloader and detailed information about your autochanger." with
a complete form such as "To a certain extent, the command can help diagnose the
autoloader and provide detailed information about your autochanger." Ensure the
sentence includes an explicit verb for "detailed information" (e.g., "provide"
or "display") so it reads grammatically and clearly.
🧹 Nitpick comments (2)
docs/manuals/source/Appendix/Troubleshooting.rst (2)

403-404: Improve caption grammar for clarity.

The caption's grammar is awkward. Consider rephrasing for better readability.

✏️ Suggested improvement
-   :caption: write random data to tape with raw tools, considering /tmp being a memory tmpfs ensure
-             it has enough space to have the 10GiB output, or consider using another filesystem.
+   :caption: Write random data to tape with raw tools. If /tmp is a memory-based tmpfs, ensure
+             it has enough space for the 10GiB output, or use another filesystem.

1293-1294: Remove unnecessary comma.

The comma after "way" is not needed and disrupts the sentence flow.

✏️ Suggested fix
-It is possible to configure Bareos in a way, that job information is still stored in the Bareos
+It is possible to configure Bareos in a way that job information is still stored in the Bareos
 catalog, while the individual file information is already pruned.

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/docs-tapedrive-howto-debug branch from b59819a to b2eaa76 Compare February 16, 2026 15:04
@bruno-at-bareos bruno-at-bareos removed the request for review from sebsura February 23, 2026 09:00
@pstorz pstorz added this to the 26.0.0 milestone Feb 23, 2026
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

bruno-at-bareos and others added 5 commits February 23, 2026 09:57
In Troubleshooting chapter add the following sections:

- add section about how to test raw tape speed, to avoid reports
  using compressible data (/dev/zero) and not feeding large drive
  buffer.
- add example how to use tapestat to monitor tape speed
- add example of sg_logs output to diagnose tape drive and media
  hardware errors.

Fix bareos/issues#2534

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- fix typo
- apply formatting to section to stay numbered
- use 10 Gib example value to match LTO9 explanation

Co-authored-by: Philipp Storz <philipp.storz@bareos.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
(cherry picked from commit 3725222)
@BareosBot BareosBot force-pushed the dev/bruno/master/docs-tapedrive-howto-debug branch from 5eca056 to 08cb380 Compare February 23, 2026 09:57
@BareosBot BareosBot merged commit 411f92d into bareos:master Feb 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This addresses a bug documentation This PR changes only documentation requires backport to 25

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Howto diagnose your tape drive

3 participants