From: John Doe <devtty1@yahoo.com>
To: axp-list@redhat.com
Subject: SUMMARY: RE: speed up tape writes with /bin/buffer
Date: Thu, 19 Jul 2001 08:12:36 -0700 (PDT) [thread overview]
Message-ID: <20010719151236.38763.qmail@web14902.mail.yahoo.com> (raw)
Hello List!
Thank you to all who responded to my plea:
Wes
Tim
Alvin
Michal
You've been a great resource in a time of need.
Wes had a good suggestion. I tried "-b" before
moving to the new command and had optimized it,
but using the "buffer" command improved things
so dramatically that I'm trying to avoid the
old command. But thank you for the reality check.
Alvin gave me some info about tape layout that I did
not know and I will find it very useful in trying to
incorporate the solutions suggested.
Michal and Tim and Alvin all pointed to the need
to use the non-rewinding device, which I had tried.
I will be re-visiting the use of the nst0 device
in the hopes that my earlier attempts at using it
as a solution were somehow flawed (a new day, a
new perspective).
Following are the responses I've received so far.
If more come in today, I'll try to send an additional
summary later.
Regards,
Robert
(not the REAL John Doe)
Summary:
----------------------------------
Wes:
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.
----------------------------------
Tim:
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.
----------------------------------
Alvin:
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.
----------------------------------
Michal:
Write on a non-rewinding device an manipulate your
tape
explictily with 'mt' (positioning, writing marks,
rewinding).
You will get a bunch of separate archives but, once
again,
use mt on a non-rewinding tape device before recovery.
----------------------------------
Initial request:
==========================
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.
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
reply other threads:[~2001-07-19 15:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox