sa: write returns 0 = LEOM?
Dustin J. Mitchell
dustin at zmanda.com
Thu Jun 17 00:14:42 UTC 2010
On Wed, Jun 16, 2010 at 6:31 PM, Matthew Jacob <mj at feral.com> wrote:
> That is, I believe, a specific feature of Solaris (EOM detection triggers a
> zero write, but allows for trailer records). I seem to recall helping
> architect this back in 1996.
Gotcha. My plan is to introduce support for EOM detection
platform-by-platform, as I can research and verify the behavior of
that platform's tape driver.
> Yes, I remember this code. I remember on doing test readbacks that the
> residual reported was in fact incorrect- the data had actually been written.
> But this was really a long while back (at least 8 years ago).
I don't dispute this at all. I'm often surprised when a tape drive
*does* do what it claims to do!
>> 1. What could cause a write syscall to return 0?
>>
>
> I'll try and look into this.
>
> Do you happen to know whether the device you experienced this on was set in
> fixed block or variable block mode?
I will ask. I know that Amanda always operates *as if* it was in
fixed block mode (which is to say, it always reads and writes with
identically-sized buffers), so the underlying driver configuration
usually doesn't matter. I'll let you know what I find out.
> Can't you write until you get a hard failure, back up one record (which, of
> course, you've hung onto), write a trailer label and then ask for a new
> tape?
Historically, Amanda has not trusted tape drives at physical EOM - or
any time, really. This strategy has paid off, but as technologies
have advanced it may be time to trust a bit more. Also, I was under
the impression that most (or at least some) drives would not let you
BSR in write mode.
Thanks for looking into this!
Dustin
--
Open Source Storage Engineer
http://www.zmanda.com
More information about the freebsd-scsi
mailing list