Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!mit-eddie!apollo!tonyd From: tonyd@apollo.uucp (Tony Drogaris) Newsgroups: comp.sys.apollo Subject: Re: tar to an Ultrix VAX Message-ID: <36a5d932.3ea3@apollo.uucp> Date: Thu, 13-Aug-87 14:10:00 EDT Article-I.D.: apollo.36a5d932.3ea3 Posted: Thu Aug 13 14:10:00 1987 Date-Received: Sat, 15-Aug-87 09:50:17 EDT References: <15554@teknowledge-vaxc.ARPA> Reply-To: tonyd@apollo.UUCP (Tony Drogaris) Organization: Apollo Computer, Chelmsford, MA Lines: 31 Keywords: fails across ethernet In article <15554@teknowledge-vaxc.ARPA> mkhaw@teknowledge-vaxc.ARPA (Michael Khaw) writes: >I try to do the following from a DN3000 running SR 9.2.5, Domain/IX 9.2, >and TCP 9.2(?): > > tar cBf - src_dir | rsh vax 'cd dest_dir; tar xBf -' > >I get a checksum error from the remote tar. This will happen (at least occasionally) with any pair of machines. The frequency of occurence depends upon the relative speeds of the machines and the network connection. The problem is that the network connection is not guaranteed to pass any particular blocksize atomically and tar expects to read entire blocks in one read. ie., the read call in tar looks like: if (read(f, buf, blksize) != blksize) { /* barf with checksum error */ } The network socket will return whatever data it has. If it's less than blksize bytes, too bad. The solution is to use dd to feed tar whatever size blocks it wants: tar cBf - src_dir | rsh vax 'cd dest_dir; dd | tar xf -' (If you want, you can block between dd and tar by using dd's obs=xxx option.) -- Tony Drogaris UUCP: ...{attunix,uw-beaver,decvax!wanginst}!apollo!tonyd Apollo Computer ARPA: apollo!tonyd@eddie.mit.edu INTERNET: tonyd@apollo.com