How to deal with Tar error ?


 
Thread Tools Search this Thread
Operating Systems AIX How to deal with Tar error ?
# 1  
Old 05-30-2016
How to deal with Tar error ?

Hello Folks,

while making a tar file, got this error

Code:
root@clodb:/clodbvg>/opt/freeware/bin/tar cvf -  /oradata | gzip > /clodbvg/bkp_30MAY16.tgz 

/opt/freeware/bin/tar: Removing leading `/' from member names
/oradata/
/oradata/JAVA/
/oradata/JAVA/.toc
/oradata/JAVA/Java131.rte
/oradata/JAVA/Java131.rte.tar
/oradata/Stage11i/
/oradata/lost+found/
/oradata/proddata/
/oradata/proddata/XDOD.dbf
/oradata/proddata/XDOX.dbf
/opt/freeware/bin/tar: /oradata/proddata/applsysd02.dbf: Read error at byte 4767080960, reading 10240 bytes: There is an input or output error.
/oradata/proddata/applsysd03.dbf
/oradata/proddata/applsysd04.dbf
/oradata/proddata/applsysd05.dbf
/oradata/proddata/applsysx01.dbf
/oradata/proddata/applsysx02.dbf


how to troubleshoot this problem? because when I restored the tar file, oracle doesn't work, because applsysd02.dbf contains some tables required by oracle. any suggestions?

Code:
root@clodb:/oradata>du -sg /oradata/proddata/applsysd02.dbf
6.74    /oradata/proddata/applsysd02.dbf

# 2  
Old 05-30-2016
You restored from this when tar told you the backup was bad? You intentionally restored a bad backup over good files?

I don't suppose you have a backup of the backup, do you?
# 3  
Old 05-30-2016
@filosophizer:

Can you clarify the problem?

Is this the following your procedure so far?

  1. You restored the backup from above created tar-file(with the shown read error)
  2. Your oracle-DB does not work after restore
  3. Now you want to fix the problem(=non-functional-oracle-db) that arose from the tar-recovery


Code:
Read error at byte 4767080960, reading 10240 bytes: There is an input or output error.

Whatever the other issue may be: This message means you probably have a bad storage device(hard disk) which should be replaced and probably better sooner than later.

Last edited by stomp; 05-30-2016 at 07:13 PM..
# 4  
Old 05-31-2016
as always:

Code:
# oslevel -s
# rpm -q tar
# lsuser -a fsize fsize_hard root

# 5  
Old 05-31-2016
Agent.KGB

Code:
root@clodb:/oradata>oslevel -s
6100-05-01-1016

root@clodb:/oradata>rpm -q tar
tar-1.14-2

root@clodb:/oradata>/opt/freeware/bin/tar
/opt/freeware/bin/tar: You must specify one of the `-Acdtrux' options
Try `/opt/freeware/bin/tar --help' for more information.

root@clodb:/oradata>/opt/freeware/bin/tar --version
tar (GNU tar) 1.14
Copyright (C) 2004 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public License;
see the file named COPYING for details.
Written by John Gilmore and Jay Fenlason.

root@clodb:/oradata>lsuser -a fsize fsize_hard root
root fsize=-1 fsize_hard=-1

root@clodb:/oradata>

@stomp
yes, I want to migrate oracle vg (including filesystems) from internal disk to SAN disk, for that reason I used tar to make a tar file of all the filesystems in oraclevg and then untar them on SAN Disk, however, due to error/bad sector in one of the oracle main files which is applsysd02.dbf, after untar (unzip) it doesn't work because the tar/zip was not completely done for applsysd02.dbf, so some tables are missing.

This internal disk cannot be replaced because
1- part of vios
2- storage pool -- assigned to lpar

@corona688

I am trying to make a backup of the good files, which failed because of one file applsysd02.dbf which is over bad sector/whatever the issue is.



Possible Solutions:
1- Would copying the file in question applsysd02.dbf to another filesystem and then taking backup help ?
# 6  
Old 05-31-2016
My first question is what Oracle product is this?

Oracle databases usually have running processes which keep the dB files open all the time so you must use the defined Oracle dB shutdown command to stop those processes and close the dB files before you can run a backup. Additionally, some Oracle products also come with their own Oracle backup utilities so you don't use OS based utilities.

If Oracle processes have the dB open then that could be causing your error.
# 7  
Old 05-31-2016
Quote:
Originally Posted by filosophizer
while making a tar file, got this error
Code:
root@clodb:/clodbvg>/opt/freeware/bin/tar cvf -  /oradata | gzip > /clodbvg/bkp_30MAY16.tgz 
/opt/freeware/bin/tar: /oradata/proddata/applsysd02.dbf: Read error at byte 4767080960, reading 10240 bytes: There is an input or output error.


how to troubleshoot this problem?
OK, first things first: this is NOT a "tar error"! This is tar complaining that it can't read a file properly. So the error is with the file somehow (undetermined: everything from a corrupt file system to some problem with the file itself, maybe some DB process still running and locking the file while tar was working on it), not with tar. It is only natural that your database stopped working once you restored such a faulty backup.

I'd first try to find out what is wrong with the file. The following command will do nothing to correct anything but might shed light upon what is wrong (don't do it while the DB is running!):

Code:
dd if=/oradata/proddata/applsysd02.dbf of=/dev/null bs=1024

If this command works your file is OK and it might have been a temporary condition (like the DB stilll running). If this produces an error you will see where exactly in the file the problem is (because you read it in 1k-chunks).

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Tar error

do you have idea what is the limit to zip the file. + tar -cvf - today.txt tar: Size of today.txt >= 8GB. Not dumped. (3 Replies)
Discussion started by: ramkumar15
3 Replies

2. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

3. Shell Programming and Scripting

How to deal with .tar.gz files in Linux?x

Dear all, there are more than 10 files with .tar.gz extension in my folder i didnt want to extract them i just want to run the query to fetch my necessary data from all the files. but when i run the command it untar the files in that folder. gunzip -c abc.tar.gz | tar -xf - | grep REC |... (0 Replies)
Discussion started by: jojo123
0 Replies

4. Programming

How to deal with this error: floating constant exponent has no digits

A conditional statement cause it: if(strlen(str) < n1+1) { ------- } (7 Replies)
Discussion started by: cdbug
7 Replies

5. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

6. Linux

tar error exit delayed form pervious error

Hi when use "tar cpvzf /dev/st0 --exclude=/proc --exclude-/lost+found --exclude=/mnt --exclude=/media --exclude=/sys /" to tape, get the following message "tar: error exit delayed form pervious error", What is the mean ? Please suggest some solution for these errors. thx (1 Reply)
Discussion started by: chayato
1 Replies

7. Solaris

Error while using tar

Hi, WHile decompressing the files, i get the error tar: directory checksum error. After decompressing when i check the size of file, it is less than the original file. Due to this error, there is loss of data. How can this error be removed? Thanks in advance. (7 Replies)
Discussion started by: agarwal
7 Replies

8. AIX

Tar error

When Im trying to untar a file I get an error message tar: 0511-169 A directory checksum error on media; 804399248 not equal to 46325. What can I do to untar my file Thanks (3 Replies)
Discussion started by: joemad
3 Replies

9. UNIX for Advanced & Expert Users

Error in tar

Hi i am facing one problem with one file dxagent.ss, this file has most of the binary contents. when i m running following command on unix machine tar xpf dxagent.ss output should be: removing leading '/' from members name. and should create 'usr' and 'var' directory. but i am getting some... (5 Replies)
Discussion started by: yogini nemade
5 Replies

10. Solaris

TAR error

When I tried to decompress using TAR the following error was popped up.. tar: blocksize = 0 ..Can anyone tell me wht this means and how to rectify this error... (3 Replies)
Discussion started by: hemin_pm
3 Replies
Login or Register to Ask a Question