3

Regardless of what data I write to my LTO-4 tape drive /dev/nsa0, writing is very slow (less than 1 MB/s) and the tape is constantly being wound back and forth in a shoe-shine pattern. No speed problem occurs when reading or erasing (with mt erase) tapes. It appears that this problem occurs since I tried to enable SMART monitoring on the tape drive using smartctl.

  • What block size are you using when writing? – Mark Plotnick Oct 15 '17 at 0:25
  • @MarkPlotnick 1 MB using a kernel with patched MAXPHYS. The effect is independent of block size. – FUZxxl Oct 15 '17 at 0:26
4

It is possible that the buffering mode has been set to “unbuffered.” This is a special feature of LTO tape drives, forcing them to return from a WRITE command only after the data has been written to the tape. This stops any streaming from happening and causes the observed effects.

Unfortunately FreeBSD does not provide the mt drvbuffer 1 command from Linux to turn buffering back on, but it is possible to manually send an appropriately crafted MODE SELECT command to the drive to turn buffering back on:

camcontrol cmd /dev/nsa0 -c '15 10 00 00 04 00' -o 4 '0 0 10 0'

If you have more than one tape drive, replace /dev/nsa0 with an appropriate device file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.