Hello, Bacula requires the information from the tape driver as a security measure. The tape driver knows if the tape has been moved (operator intervention ...) and Bacula does not know if the tape has been repositioned by some other means.
The only way I know to be 100% sure that Bacula does not write in the wrong place on the tape is to use the existing technique. I prefer security over some minor speed improvements. All modern tape drives can quickly space to the end of the tape and correctly report the position. There were previously many drives that could not do this -- I think FreeBSD still cannot, so Bacula has code to do its own counting, but it is slower than modern Linux tape drivers. The problem with making changes to Bacula's low level code is that you have to test it on a pile of operating systems, with a pile of different tape drivers. I did that 10-12 years ago, and it was painful enough that I wouldn't like to do it again. You are, however, free to keep your own changed version if it works for you. Best regards, Kern On 07/03/2013 01:30 PM, Mariusz Mazur wrote: > According to the docs and sd's tape-handling code, neither MTEOM nor > FSF(0xffff…) will get used to quickly forward a tape to its end of data unless > there's a working MTIOCGET ioctl that does EOF tracking. The reasoning being, > that bacula uses files internally to track written data, so in order for > append to tape to result in correct catalog entries, bacula must be using > correct file numbers. > > But considering backup tapes are typically exclusively used by a given backup > system, isn't it the case that bacula knows *exactly* how many files there are > on a given tape without having to rely on the tape drive doing the counting? > > When I do a 'list volumes' in bconsole, one of the listed colums is > 'volfiles'. Is there any reason why that value can't be used after a > MTEOM/FSF(0xfff…) for any further writes? > > Or even a safer version for the paranoid: > > maxf=get_volfiles() > fsf(maxf) > read() > > If there's actual data there, abort (or rewind and do a fsf(1) loop), cause > something's wrong. If read() indicates end of tape, we're ok. I can't think of > a reason why it wouldn't be safe and I'm pretty sure that it would be a tad > faster, then a looped fsf(1). > > Comments? > > --mmazur > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Bacula-devel mailing list > Bacula-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-devel > ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel