* speed up tape writes with /bin/buffer
@ 2001-07-18 19:06 John Doe
2001-07-18 19:15 ` Island Computers
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: John Doe @ 2001-07-18 19:06 UTC (permalink / raw)
To: axp-list
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.
Regards,
Robert
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: speed up tape writes with /bin/buffer
2001-07-18 19:06 speed up tape writes with /bin/buffer John Doe
@ 2001-07-18 19:15 ` Island Computers
2001-07-18 20:01 ` Tim Tuck
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Island Computers @ 2001-07-18 19:15 UTC (permalink / raw)
To: axp-list
John Doe
Thank God !
I thought you were Dead !
;0)
DT
----- Original Message -----
From: "John Doe" <devtty1@yahoo.com>
To: <axp-list@redhat.com>
Sent: Wednesday, July 18, 2001 3:06 PM
Subject: speed up tape writes with /bin/buffer
> 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.
>
> Regards,
> Robert
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>
>
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: speed up tape writes with /bin/buffer
2001-07-18 19:06 speed up tape writes with /bin/buffer John Doe
2001-07-18 19:15 ` Island Computers
@ 2001-07-18 20:01 ` Tim Tuck
2001-07-18 20:24 ` W Bauske
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Tim Tuck @ 2001-07-18 20:01 UTC (permalink / raw)
To: axp-list
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).
Whats the value of $TAPE_DEV ?
You should set it to the non-rewinding form ie: /dev/rmt/0lbn
This will leave you positioned at the end of the file once backup is
complete. You can continue to add file sets/tars/dumps etc until you run
out of tape.
"mt status" will report the position you are currently on and the file
you are current at the end off or in.
cheers
Tim
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: speed up tape writes with /bin/buffer
2001-07-18 19:06 speed up tape writes with /bin/buffer John Doe
2001-07-18 19:15 ` Island Computers
2001-07-18 20:01 ` Tim Tuck
@ 2001-07-18 20:24 ` W Bauske
2001-07-18 20:37 ` alvin
2001-07-19 7:16 ` Mike Tibor
4 siblings, 0 replies; 6+ messages in thread
From: W Bauske @ 2001-07-18 20:24 UTC (permalink / raw)
To: axp-list
Try adding '-b 128' to your old command and see if
that speeds it up a bit. Experiment with various values to
see what your drive will allow and which performs best.
Then you get your original append function back.
Wes
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.
>
> Regards,
> Robert
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: speed up tape writes with /bin/buffer
2001-07-18 19:06 speed up tape writes with /bin/buffer John Doe
` (2 preceding siblings ...)
2001-07-18 20:24 ` W Bauske
@ 2001-07-18 20:37 ` alvin
2001-07-19 7:16 ` Mike Tibor
4 siblings, 0 replies; 6+ messages in thread
From: alvin @ 2001-07-18 20:37 UTC (permalink / raw)
To: axp-list
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 ||
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: speed up tape writes with /bin/buffer
2001-07-18 19:06 speed up tape writes with /bin/buffer John Doe
` (3 preceding siblings ...)
2001-07-18 20:37 ` alvin
@ 2001-07-19 7:16 ` Mike Tibor
4 siblings, 0 replies; 6+ messages in thread
From: Mike Tibor @ 2001-07-19 7:16 UTC (permalink / raw)
To: axp-list
On Wed, 18 Jul 2001, 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
Others have already commented on using the norewind tape device, and
that's what I'd recommend too. One other thing I'd recommend is that if
the backup is being done over 10Mbit ethernet, you could probably use
compression depending on the cpu power of the host being backed up.
For example:
rsh $remote_host "mt compression 0"
gtar zcPvf - $FILELIST | rsh -l $username \
$remote_host /bin/buffer -o $TAPE_DEV
This would be more appropriate for relatively recent cpus over slower
ethernet.
Another way to shrink your backup window if you are stuck with a
relatively slow tape drive, is to output the data to files in a holding
area on disk and then flush them to tape using cat or dd. This way your
tape drive is less of a bottleneck.
Mike
--
Mike Tibor Univ. of Alaska Anchorage (907) 786-1001 voice
Network Technician Consortium Library (907) 786-6050 fax
tibor@lib.uaa.alaska.edu http://www.lib.uaa.alaska.edu/~tibor/
http://www.lib.uaa.alaska.edu/~tibor/pgpkey for PGP public key
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-07-19 7:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-18 19:06 speed up tape writes with /bin/buffer John Doe
2001-07-18 19:15 ` Island Computers
2001-07-18 20:01 ` Tim Tuck
2001-07-18 20:24 ` W Bauske
2001-07-18 20:37 ` alvin
2001-07-19 7:16 ` Mike Tibor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox