3

I am trying to speed test some new LTO tape drives but cannot seem to send data to the tape via dd for any block size above 327,680 bytes. I must have a 1M blocksize for my application.

[root@host]# mt -f /dev/nst0 status
BOT ONLINE IM_REP_EN
[root@host]# dd if=/dev/zero of=/dev/nst0 bs=327679
<this transfers data fine>
[root@host]# dd if=/dev/zero of=/dev/nst0 bs=327680
<this transfers data fine>
[root@host]# dd if=/dev/zero of=/dev/nst0 bs=327681
Device or resource busy

I have spent many hours trying to debug this. Rebuilt kernels, updated drivers and firmware.

REVELATION: The results of running a dmesg shows that there is a bufsize somewhere that is set at the exact critical value that I am seeing my blocksize wall at.

[root@host]# dmesg | grep bufsize
[    9.114532] st: Version 20160209, fixed bufsize 327680, s/g segs 64

Anyone know where I can change this bufsize value?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
TNKaf
  • 31
  • 2
  • Perhaps you might pass some argument to the module providing that driver. – Basile Starynkevitch May 31 '17 at 15:14
  • Hmm. I was indeed thinking there would be a module parameter I could alter to change this value. Perhaps some value I could set via $modprobe but I'm not sure what value this could be – TNKaf May 31 '17 at 15:19
  • Are you able to get the sources of the st driver? "fixed bufsize" reads to me like compiled in... – ridgy May 31 '17 at 20:52
  • On FreeBSD you need to recompile the kernel to raise the maximal buffer size (configuration variable `MAXPHYS`). But note that the maximum buffer size may be further limited by what your controller can do. – FUZxxl Apr 03 '18 at 14:59

0 Answers0