1748104 Members
4771 Online
108758 Solutions
New Discussion юеВ

tar: cannot close error

 
SOLVED
Go to solution
Don Mallory
Trusted Contributor

tar: cannot close error

Hi all,

I'm in the process of restoring a large number of older archive tapes (and some very recent ones) and refreshing the media (converting to new media and consolidating a large number of tapes to a small number...)

One of the errors I have come across a couple of times is:

tar: Cannot close ./dir1/fir2/filex

In a couple of cases, the media is new and the drive has not had any problems with other tapes to date (some are DLT4 tapes, the drive is a DLT7000, others are 8mm DAT format and have more problems)

I really need to be able to restore these. I have determined that if I do a tar xvf /dev/rmt/6mn exact/path/and/filename, I can skip the offending file and restore the following one, but I can't do it in a stream.

So, my question is, is there any way to force tar to skip past these bad blocks?

Thanks,
Don
3 REPLIES 3
Frank Slootweg
Honored Contributor

Re: tar: cannot close error

I quickly searched for this error in our Knowledge DataBases. This seems to be a NFS issue. I assume you are trying to restore (for example) ./dir1/fir2/filex to a NFS-mounted directory. If so, try a local directory an see if the problem goes away.
Upstate Rob
Occasional Advisor

Re: tar: cannot close error

The correct answer was about NFS.  I got multiple errors taking a tar file that I had stored elsewhere and moved it back via ftp in binary and tar -tvf seemed to work.  Well it turns out that since my working location was on NFS, I had numerous write errors to the subdirectory when using tar -xvf FILE.tar.  Once I moved that FILE to /tmp and did it there, tar -xvf worked perfectly and all the way.  Then the files could be read.

Another Simple Solution to a Complex Problem