Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: st(4) and mt eom



On Mar 20, 11:13pm, Frank Kardel wrote:
} 
} 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.

     I looked at the FreeBSD's mt command source code and manpage.
There appear to be a bunch of "non-standard" extensions, such as
"locate".  Many of them look useful, and would probably be worth
acquiring.  However, many of them also need new ioctls() and
FreeBSD's SCSI stack is very different from NetBSD's SCSI stack,
so some porting work would be needed.

} On 03/20/19 21:09, Adrian Bocaniciu wrote:
} > On Wed, 20 Mar 2019 20:08:17 +0100
} > Frank Kardel <kardel%netbsd.org@localhost> 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 !
} >
} 
}-- End of excerpt from Frank Kardel




Home | Main Index | Thread Index | Old Index