1753873 Members
7548 Online
108809 Solutions
New Discussion юеВ

Re: GNU tar

 
SOLVED
Go to solution
Jestin John Chacko
Regular Advisor

Re: GNU tar

Dear ,


This is the actual output i am getting.
# /usr/local/bin/tar -cvf /dev/rmt/11mn /u01
/usr/local/bin/tar: Removing leading `/' from member names
/u01/
/u01/lost+found/
/u01/ASMT_PROD_17032009.dmp
# tar -tvf /dev/rmt/11mn
Tar: blocksize = 0; broken pipe?
# mt -f /dev/rmt/11mn rew
# tar -tvf /dev/rmt/11mn
rwxr-xr-x 0/0 0 Mar 19 12:54 2009 u01/
rwxr-xr-x 0/0 0 Jan 2 18:38 2008 u01/lost+found/
rw-rw-rw- 0/3 0 Mar 18 15:35 2009 u01/ASMT_PROD_17032009.dmp
directory checksum error
#
#


#
#
# mt -f /dev/rmt/11mn rew
# tar -xvf /dev/rmt/11mn /u02/
directory checksum error


i had tried with a small file but its working properly only problem is with this file which is nearly 18 gb
Dennis Handly
Acclaimed Contributor

Re: GNU tar

># tar -xvf /dev/rmt/11mn /u02/
>directory checksum error
>only problem is with this file which is nearly 18 gb

And you're sure it isn't a problem with the tape?
Can you put the tarfile on disk? If that fails, you may want to use a supported PAX-ENH instead of gtar.
OldSchool
Honored Contributor

Re: GNU tar

"# /usr/local/bin/tar -cvf /dev/rmt/11mn /u01
/usr/local/bin/tar: Removing leading `/' from member names
/u01/
/u01/lost+found/
/u01/ASMT_PROD_17032009.dmp
# tar -tvf /dev/rmt/11mn


OK, so you used GNU tar to write the tape and probably the *normal* tar to read it? And expected this to work?

what happens when you do:

/usr/local/bin/tar -tvf /dev/rmt/11mn

?

For what its worth, I usually rename GNU tar to gtar and then add /usr/local/bin to the path....which lets me select which tar by name.
OldSchool
Honored Contributor
Solution

Re: GNU tar

and you also *didn't* rewind the tape after writing...

normally you would use /dev/rmt/11m which would rewind on completion. Unless you omitted a step in your example, you wrote the tape, left it at the end of the archive and then tried to read it. nothing to read, so it dies.
Steven Schweda
Honored Contributor

Re: GNU tar

> And expected this to work?

Amazing, isn't it?

> and you also *didn't* rewind [...]

Ask me why I always ask to see the actual
commands used. Go ahead, ask me. I dare
you.
Dennis Handly
Acclaimed Contributor

Re: GNU tar

>OldSchool: you also *didn't* rewind the tape after writing.

Sure jestin did, the second and third time. :-)
Only the first time was there a "broken pipe?" message.
Jestin John Chacko
Regular Advisor

Re: GNU tar

Dear.



1>is it necessary to rewind the tape before and after creation of an archive in tape,if so why we are using that?

2>is the same thing applicable while extracting files to a directory from a tape.

3>what is the correct format to rewind the tape?
is it mt -f rew
Dennis Handly
Acclaimed Contributor

Re: GNU tar

>1) is it necessary to rewind the tape before and after creation of an archive in tape, if so why we are using that?

As OldSchool said, it depends on whether you use a no rewind tape device.

If you just put in the tape, you don't need to rewind. If you are finished you should rewind, so it ejects faster.

>2) is the same thing applicable while extracting files to a directory from a tape.

The same issues. If you just wrote a no rewind tape, you need to rewind.

>3) what is the correct format to rewind the tape?
is it mt -f rew

Yes, mt(1) says that.
Jestin John Chacko
Regular Advisor

Re: GNU tar

Now i had successfully taken the backup of 18Gb and i had restored it.thanks to all especially to u dear dennis
Jestin John Chacko
Regular Advisor

Re: GNU tar

After installing the GNU tar along with its dependencies(libiconv&gettext)the default path should be provided

/usr/local/bin/tmp -cvf dir
for backup

/usr/local/bin/tmp -tvf for viewing

enter the current directory to which the data should be restored and provide
/usr/local/bin/tmp -xvf


for any help provide

/usr/local/bin/tmp --help