Hi Adrian!
I just finished implementing the EOM fix. On SPACE(EOM) a READ
POSITION(LONG_FORMAT) is
done and current file number is set to the number of filemarks since BOT
which is what we need.
on a 10 file taoe (LTO6) both commands
mt fsf 64
mt eom
now return a current file number of 10.
no additional changes to mt like adding a locate command are needed,
Though adding LOCATE might also be an option to be added separately for
mt even if it does not help with bacula at all as bacula uses the MT
ioctls directly and not via scripts.
Thanks for the hint anyway.
Frank
On 03/20/19 21:09, Adrian Bocaniciu wrote:
On Wed, 20 Mar 2019 20:08:17 +0100
Frank Kardel <kar...@netbsd.org> wrote:
This seems to be a long standing deficiency of the driver. Looking at
the SCSI spec it is recommended to issue a READ POSITION command
get the current position. Looking at the spec and code it should be
possible to handle the SP_EOM case better with respect to the position
information
I suggest that you should look at what FreeBSD does for the command:
mt locate -e
I have not attempted to use NetBSD with a tape, but I am using FreeBSD with an LTO-7
drive and "mt locate -e" works flawlessly.
I always follow that command in my scripts with a "mt rdspos", to verify that it worked
correctly, by comparing the result with the last written position on that tape (the position after
"mt locate -e" should be the position read after writing the previous last file + 1).
Best regards !