GNU tar version 1.11.2. The -L option to tar is supposed to specify the length of the tape in K, but when the number is large (I was using 3145000 to specify a 3Gig tape) the user is prompted to mount a second volume too soon. A look at the source shows the tape_length variable to be a signed int, instead of unsigned. Fix: in /usr/src/gnu/usr.bin/tar/buffer.c changed "static long bytes_written = 0;" to "static unsigned long bytes_written = 0; " in /usr/src/gnu/usr.bin/tar/tar.h changed "TAR_EXTERN int tape_length;" to "TAR_EXTERN unsigned long tape_length;" How-To-Repeat: tar -c -v -M -L 3145000 -f /dev/rst0 . where "." is populated with some large files (in my case, 2 files of 64 Meg and 44 Meg). tar will ask for the 2nd volume to be written MUCH before having written 3gigs.
State Changed From-To: open->closed This is a duplicate of PR#3552. Please only submit bug reports once. Thanks.
As aloke@vicor-nb.com wrote: > GNU tar version 1.11.2. The -L option to tar is supposed to specify > the length of the tape in K, but when the number is large (I was > using 3145000 to specify a 3Gig tape) the user is prompted to mount > a second volume too soon. A look at the source shows the tape_length > variable to be a signed int, instead of unsigned. That won't help very much. Bumping the limit from 2 GB to 4 GB probably ain't worth the while. Either, it should be made a 64-bit entity at all (but that's probably quite a little more of work), or it's too small for many current tape drives already. Silly question: why do you want to specify -L at all? It is only required for broken hardware/drivers. The floppy disk driver used to be broken until FreeBSD 2.2 and required it, but to the best of my knowledge, the tape drivers were always able to correctly report EOF back to the caller. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Please close this PR. It is better described at http://www.freebsd.org/cgi/query-pr.cgi?pr=gnu/24903 Thanks Marc