cancel
Showing results for 
Search instead for 
Did you mean: 

have problem with tar -xvf

Tung_1
Advisor

have problem with tar -xvf

Normaly I use tar to backup and recovery, and copy in HP-UX, but sometime command tar -xvf run very slowly, yesterday I tar -xvf a directory about 1G but the tar command run in 5 hours (it is not the same in every situation). Who can explain it to me ?
Thanks.
15 REPLIES
Ganesan R
Honored Contributor

Re: have problem with tar -xvf

Hi,

There are certain things you need to check it.

First one is to check the drive. It might have some issue. Try to clean the drive or replace it if possible.

Second one is, media could be defective. Check with new media.

Third one is I/O bottleneck.
Best wishes,

Ganesh.
R.K. #
Honored Contributor

Re: have problem with tar -xvf

Hello Tung,

We can do some low level troubleshooting at first to check if there is no hardware issue:

* Check the media, OLD media takes much more time. So you can try taking backup on a new media to ensure this.
* Can try cleaning the tape drive through cleaning tapes.
* If this delay in backup is repeating again and again, try using different tape drive.
Thats all from my side.

Regds,
R.K.
Don't fix what ain't broke
Aneesh Mohan
Honored Contributor

Re: have problem with tar -xvf

apart from the Media and Drive checking ,please check the SCSI terminator too.

Aneesh
Tung_1
Advisor

Re: have problem with tar -xvf

Thank you for reply me, but in this situation I only tar a directory from file system (hard disk) not from tape.
sujit kumar singh
Honored Contributor

Re: have problem with tar -xvf

Hi


might be at that time some other IO processes had been having on the disk also that we can suspect to have caused that muchof delay .. assuming that the disk is OK.

can you please give whole of the tar command that you might be using.

regards
sujit
Tung_1
Advisor

Re: have problem with tar -xvf

It is very simple, only:
#tar -xvf /mydirectory.tar
Ganesan R
Honored Contributor

Re: have problem with tar -xvf

Hi,

Could you check tar patch level?. If it is old, install the latest tar patch.

# swlist -l patch |grep -i tar
Best wishes,

Ganesh.
Tung_1
Advisor

Re: have problem with tar -xvf

Hi Ganesan, this is out put:
# Auxiliary-Opt.LANG-STARTUP B.11.11.16 Family of Startup crt0.o files
# PHCO_28992 1.0 tar(1) cumulative patch

What is lastest version of tar command ?
Sani
Frequent Advisor

Re: have problem with tar -xvf

Hi,

Please provide the commands u are using

1) command to take tar backup
2) command to restore tar backup.
Tung_1
Advisor

Re: have problem with tar -xvf

Hi Sani, I use tar like cp command, I have 02 HP-UX 11i v1 server and I want copy 1 directory from Server01 to Server02. I use tar to hold the user, group, permision of this directory not change.

Server01: #tar cvf - ./mydir | gzip > mydir.tar.gz
#rcp mydir.tar.gz Server02:/xxx

Server02: #gunzip mydir.tar.gzip
#tar -xvf mydir.tar
Ganesan R
Honored Contributor

Re: have problem with tar -xvf

Hi,

The patch which you are having is quit old released on 2003. The latest tar cumulative patch is PHCO_36587.

Install this one along with dependencies and see the performance. Hopefully that may solve the issue.
Best wishes,

Ganesh.
Sani
Frequent Advisor

Re: have problem with tar -xvf

Hi Tung ,

as u told it is not the same in every situation , you need to check the utilization of the server at that time.

Steven Schweda
Honored Contributor

Re: have problem with tar -xvf

> Server01: #tar cvf - ./mydir | gzip > mydir.tar.gz
> #rcp mydir.tar.gz Server02:/xxx
>
> Server02: #gunzip mydir.tar.gzip
> #tar -xvf mydir.tar

Not the method I'd use. How many large
temporary files do you want? (You don't
_need_ any.)

( cd /src/path ; tar cf - stuff | gzip ) | \
remsh server2 ' ( cd /dst/path ; gunzip | tar xf - ) '

Variations:

If "/dst/path" doesn't exist, add
"mkdir -p /dst/path ; " before the "cd".

Substitute "ssh" for "remsh"

Add a "v" to one of the "tar" commands".
(With "v" on both "tar" commands, the noise
can be more confusing than helpful.)

> Who can explain it to me ?

Probably no one. Not enough info.
BIHAN
Frequent Advisor

Re: have problem with tar -xvf

Steven Schweda writes :
...
( cd /src/path ; tar cf - stuff | gzip ) | \
remsh server2 ' ( cd /dst/path ; gunzip | tar xf - ) '
...

This is ok but if you have a problem when "cd somewhere" you will untar you files in the wrong directory or send files from a wrong directory or both (dangerous).


so better use && to test the return code

( cd /src/path && tar cf - stuff | gzip ) | \
remsh server2 ' ( cd /dst/path && gunzip | tar xf - ) '



Tung_1
Advisor

Re: have problem with tar -xvf

Thanks guys, maybe i found the answer for my question, it is some paramater when i use SAM to mount a filesystem.
vxfslog,mincache=dsync,blkclear,nodatainlog,largefiles,rw,suid 0 2

After i remount by command is ok.