cancel
Showing results for 
Search instead for 
Did you mean: 

hpux tar to tape

 
SOLVED
Go to solution
Highlighted
PeterCh
Occasional Advisor

hpux tar to tape

Hi,
I am tarring 2GB files to tape but they are getting slower over time. For example in

January 2008:
Sat Jan 12 04:16:18 SST 2008
tar -cvf <2GB file with bs=20k> /dev/rmt/2mn
23014+178610 records in
23014+178610 records out
Sat Jan 12 04:26:35 SST 2008

October 2008:
Tue Oct 14 04:15:07 SST 2008
tar -cvf <2GB file with bs=20k> /dev/rmt/2mn
8816+401760 records in
8816+401760 records out
Tue Oct 14 04:41:59 SST 2008

So in Jan it takes just over 10min, but in Oct it is almost 27 min. Also the records in/out # is much larger. Would anyone have any idea what the records in/out numbers represent (and why they are increasing)and why it is taking longer to tar the same file to tape? Thanks!
5 REPLIES 5
Highlighted
Johnson Punniyalingam
Honored Contributor

Re: hpux tar to tape

Hi PeterCh,

Usually tar command d'not help supports backing up file size more than 2GB "me had this issue when i'm trying doing Cold Oracle DB backup" I quickly moved to "fbackup" ..

now everthing seems to be okies .. :)

Its Just my experience only

Thanks,
Best Regards,
Johnson
Problems are common to all, but attitude makes the difference
Highlighted
Dennis Handly
Acclaimed Contributor

Re: hpux tar to tape

>I am tarring 2GB files to tape
>tar -cvf <2GB file with bs=20k> /dev/rmt/2mn
>23014+178610 records in

How are you doing it? It seems you are using dd(1) somewhere?
Highlighted
PeterCh
Occasional Advisor

Re: hpux tar to tape

Yes that is correct.

The actual command is:

tar -cvf - | remsh dd of=/dev/rmt/2mn bs=20k 1
Highlighted
Dennis Handly
Acclaimed Contributor
Solution

Re: hpux tar to tape

>The actual command is:
tar -cvf - | remsh dd of=/dev/rmt/2mn bs=20k 1

This is going to cause you problems.

>23014+178610 records in
>23014+178610 records out

This says you have 23014 full blocks and 178610 partial blocks both read and written. See dd(1) DIAGNOSTICS.

Partial blocks to a tape is bad news.
But the most important thing besides performance and space on the tape, can you even read your tape?
Whether with tar directly or with dd then tar??

8816+401760 records in
8816+401760 records out

Now it is worse! Perhaps because of the blocksize being written with remsh is smaller??

It seems you want to experiment with something like:
tar -cvf - | remsh dd of=/dev/rmt/2mn ibs=8k obs=20k

In the above case, tar is writing 512. The pipe is providing 8 Kb and dd is reblocking to 20 Kb.

You can make tar blocks bigger:
tar -cvbf 16 - ...
Highlighted
PeterCh
Occasional Advisor

Re: hpux tar to tape

Thank you for your interesting reply! I will try to investigate further. The records in/out is always different too for each backup.

We have been using the same database backup script for quite a while now and have restored the files to another server with no problem, so the backup seems to be ok.