This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mt and tar fail on LTO-5 drives


On Aug 20 10:29, Corinna Vinschen wrote:
> On Aug 19 21:10, bartels wrote:
> > On 08/19/2013 07:12 PM, Corinna Vinschen wrote:
> > >
> > >It would be interesting to see the OS error codes.  If you run tar under
> > >strace, the trace output should contain a line like
> > >
> > >   [...] write: Win32 error XXXX
> > >
> > >or
> > >
> > >   [...] close: Win32 error XXXX
> > >
> > >The value of XXXX is what I'm curious about.
> > 
> > Here is the error:
> > 
> >  15692 21364024 [main] tar 5700 mtinfo_drive::error: write: Win32 error 1100
> 
> ERROR_END_OF_MEDIA.  The OS really thinks the medium is at its end...
> 
> ...or the *partition* is at its end.  Something occured to me this
> morning.  Are you using used tapes, rather than fresh ones?  Are the
> tapes you're using partitioned, by any chance, maybe because LTFS
> partitions the tape in two partitions, one for the files and one for
> metadata?
> 
> This would explain the low capacity you see in mt status output.  If the
> tape is partitioned, the capacity returned by GetTapeParameters is not
> the size of the entire tape, but the size of the current partition(*).
> And partition 0 is probably the metadata partition.
> 
> This also explains why you get a supposedly early ERROR_END_OF_MEDIA.
> The partition is just not bigger.
> 
> Try this:
> 
>   $ mt -f /dev/nst0 setpartition 0
>   $ mt -f /dev/nst0 status 2
>   $ mt -f /dev/nst0 setpartition 1
>   $ mt -f /dev/nst0 status 2

Make that

    $ mt -f /dev/nst0 setpart 0
    $ mt -f /dev/nst0 status 2
    $ mt -f /dev/nst0 setpart 1
    $ mt -f /dev/nst0 status 2

I wrote the setpart and mkpart commands before mt on Linux had them and
naturally they are now using different strings.  I'll have another look
into mt to make it more compatible with mt on Linux.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgp11iD84plPj.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]