From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 3DF852F028 for ; Wed, 18 Jul 2001 16:36:45 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f6IKTt100355 for axp-list@listman.redhat.com; Wed, 18 Jul 2001 16:29:55 -0400 Received: from ml.comspec.com (IDENT:root@ml.comspec.com [192.139.80.27]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id f6IKTtg00351 for ; Wed, 18 Jul 2001 16:29:55 -0400 Received: from mercutio.iplink.net ([192.139.81.54]:263 "EHLO iplink.net") by ml.comspec.com with ESMTP id ; Wed, 18 Jul 2001 16:36:05 -0400 Message-ID: <3B55F36D.C85E2165@iplink.net> Date: Wed, 18 Jul 2001 16:37:01 -0400 From: alvin X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17-14 i686) X-Accept-Language: en MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: speed up tape writes with /bin/buffer References: <20010718190603.56143.qmail@web14901.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: John Doe wrote: > > Hello List, > > I am trying to write to a tape on a remote linux > box by using the following command: > > gtar cPvf - $FILELIST | rsh -l $username \ > $remote_host /bin/buffer -o $TAPE_DEV > > This works really well, reducing the amount of time > to backup by an order of magnitude (due to the use > of the /bin/buffer command). > > The old command was: > > gtar rPvf $username@$remote_host:$TAPE_DEV \ > $FILELIST > > Which took way too much time (but the "r" did > allow me to append to the existing data). > > My problem is this: > > After writing to the tape once, any subsequent > backups will overwrite the previous (the tape > has plenty of room for more files) since the > buffer command does not have the ability to > "append" to the tape archive. > > Is there a way to use the first command I listed > and have it "APPEND" to the tape rather than over > write it? > > I have tried to use the "no-rewind" option, but one > of the requirements of the script is that it rewind > the tape and re-read what is listed to verify that > all the files got backed up. This would be okay if > I could find a way to position the tape at the end > of the existing archives prior to writing to the tape, > but I've not been able to figure out how to position > the tape. > > I've used the "mt" command with "eod", but this didn't > seem to prevent the overwritting of existing files. > > Any suggestions would be appreciated and I will > summarize. first you will need to use a nonrewind device like /dev/nst0. Otherwise every time a program closes the file there will be a rewind done. One simple solution is to just use a norewind device and just do a sequence of tars with each one appending after the other. The other possiblity is to use mt to forward space to the next file mark. Generaly a tape is layed out like this SOT(start of tape) data FM(file mark) data FM(file mark) ... FM data FM FM EOT the 2 file marks in a row are concidered the end of data on the tape and the EOT is the physical end of tape. It has been a while and this is only a general direction. You will have to play a lot go get this working just right. streaming tapes usualy will only let you append to the tape at the point where you will find the two FMs in a row. Some will not even let you do that. you should be able to read a file(data) from the tape and then forward space over the file mark and then read the next file(data) and so on till you get a data read with 0 data. This means you have now found the 2 file marks in a row. You should be able to start writing from this point. >From the man page on mt you should be able to do somthing like: mt -f /dev/nst0 eod tar cf /dev/nst0 /blah/blah mt -f /dev/nst0 rewind But I have not tried this one in practice. -- Alvin Starr || voice: (416)785-4051 Interlink Connectivity || fax: (416)785-3668 alvin@iplink.net ||