*BSD News Article 92910


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!worldnet.att.net!newsfeed.nacamar.de!news.apfel.de!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Tar not writing Multivolumes
Date: 5 Apr 1997 15:04:22 GMT
Organization: Private BSD site, Dresden
Lines: 47
Message-ID: <5i5plm$8jd@uriah.heep.sax.de>
References: <5i2fc9$2u9$1@otis.netspace.net.au>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:38549

mheath@netspace.net.au (Mark Heath) wrote:

> 
> i've tried to create a multi volume archive on disk using the following 
> tar command
> 
> tar cMf /dev/fd0 filetoarchive

First, you're making a very common but unfortunate mistake: you're
abusing the buffered device (/dev/fd0) for things where you should use
the raw device (/dev/rfd0).  There are basically three reasons for not
using buffered devices for raw data:

	. you have no guarantee when the data will actually be written,
	  since the writes are buffered,
	. you're blasting your filesystem buffer cache for no good
	  reason, and
	. writes on the buffered device succeed prematurely, so if
	  an error will be detected by the driver later on, the
	  application has already got a `good' status indication.

#3 is probably also what makes it impossible to write multi-volume
tar archives to a buffered device (i'm not sure, i've never tried
this).

Second, you haven't indicated which version of FreeBSD you're using.
The EOF handling in the floppy disk driver used to be broken for
years.  I've fixed it by:

revision 1.93
date: 1996/11/02 23:31:11;  author: joerg;  state: Exp;  lines: +36 -28
Fix the broken EOF handling in the floppy driver.  The most obvious
appearance of this bug was the malfunctioning -M option in GNU tar (it
worked only by explicitly specifying -L).

Reviewed by:    bde, and partially corrected according to his comments


Driver versions prior to this date always required the -L1440 option
to tar in order to read and write multi-volume archives correctly.

-- 
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. ;-)