1846866 Members
3346 Online
110256 Solutions
New Discussion

tar cannot create

 
Shaji Nair_1
Occasional Advisor

tar cannot create

Hi,
I have a small issue while trying to untar a tar file. On some
particular files the tar is complaining cannot create the file. But i
am able to touch a file in the same director if i try to do it form
command line. I am able to untar the same archive on another mahcine
which is 10.20 at the same patch level. I have tired to set
the umask as the working machine umask and also i have tired to untar
the archinve under /tmp directory which is also giving the same
error.

Thanks and regards
Shaji Nair
15 REPLIES 15
Robert-Jan Goossens
Honored Contributor

Re: tar cannot create

Hi,

Could you provide some output off the tar command ?

Robert-jan.
Shaji Nair_1
Occasional Advisor

Re: tar cannot create

Hi,
Please see the example output
#tar xvf os.tar
x repository/bin/sysman, 1693 bytes, 4 tape blocks
x repository/bin/dzl_verify, 9645 bytes, 19 tape blocks
x repository/bin/dzl_version, 1157 bytes, 3 tape blocks
x repository/bin/gs, 2451876 bytes, 4789 tape blocks
tar: repository/bin/config_device - cannot create
x repository/bin/config_host, 566520 bytes, 1107 tape blocks
x repository/bin/config_server, 558376 bytes, 1091 tape blocks
x repository/bin/device_status, 530024 bytes, 1036 tape blocks
x repository/bin/list_host, 564912 bytes, 1104 tape blocks
x repository/bin/list_server, 558352 bytes, 1091 tape blocks
x repository/bin/probe, 510424 bytes, 997 tape blocks
harry d brown jr
Honored Contributor

Re: tar cannot create


Have you tried restoring as root?

live free or die
harry
Live Free or Die
Shaji Nair_1
Occasional Advisor

Re: tar cannot create

Hi,
Yes, i am doing everything as root.

Regards
Shaji
Shaji Nair_1
Occasional Advisor

Re: tar cannot create

Hi,
I can restore the same file individually from the archive. say tar xvf os.tar repository/bin/config_device is working. The problem is not happening for random files, it is the same files which is giving the error.

Regards
Shaji
Robert-Jan Goossens
Honored Contributor

Re: tar cannot create

Try tar xvof os.tar

Robert-Jan.
Shaji Nair_1
Occasional Advisor

Re: tar cannot create

Hi,
It is also not working, giving the same error.

--Shaji
MANOJ SRIVASTAVA
Honored Contributor

Re: tar cannot create

Hi Shaji


IS that file already exisitng and in use , do a ls -l repository/bin/config and checkf or the existence of the file , it amy be possible that the file is in use , so even tar doenst overwirte it becasue it cannot be deleted as it is in use . You can use fuser filenem to know the process controlling it .



Manoj Srivastava
Martin Robinson
Frequent Advisor

Re: tar cannot create

One possibility, which is NOT indicated by your sample output, is that it is possible for a tar archive to contain more than one copy of the same file. An archive can be appended to.

If the first file extracted has permission which do not permit overwriting, then second extraction of the same file will fail.

Do a tar tvf listing and look for two entries of your config_device listing.
tar tvf os.tar | grep config_device.

This will demonstrate the problem.
$ touch mtr
$ chmod 400 mtr
$ tar cf tar.tar mtr
$ tar rf tar.tar mtr
$ rm mtr
$ tar xvf tar.tar
x mtr, 0 bytes
tar: mtr - cannot create.
Shaji Nair_1
Occasional Advisor

Re: tar cannot create

I have done a check of the tar file to see whether there are multiple file, but there is only one occurance of this file, and on top of this the directory structure is getting created when i do a untar, it is not that i am untaring onto an existing directory structure. It has become a bit annoying for me now, i am taking long time to figure it out. I have asked for the HP software support to help me with the problem, i will update you with the solution. In the meantime any suggestions are welcome and i willing to tr it also.

-- Shaj
Carlos Fernandez Riera
Honored Contributor

Re: tar cannot create

could you post the result for tar tvf os.tar?
unsupported
Shaji Nair_1
Occasional Advisor

Re: tar cannot create

Please find the attached list of files (tar tvf output).

---Shaji
Carlos Fernandez Riera
Honored Contributor

Re: tar cannot create

I can see a list of tar xvf, but it is not reporting nothing about the file, except it can not be created. Can you say how many GB large is it? ;-)
unsupported
Shaji Nair_1
Occasional Advisor

Re: tar cannot create

It is only a 80MB file, and the list i have given is from the tar tvf output, not from xvf, you can see the xvf output on one of the reply i have given. I have just talked to the Engineer in HP looking into the issue and they have put a bit of informatiion. The problem is happening only on vxfs file system and not on hfs. If any of you have any experience like this on a vxfs filesystem please do update.
Tim D Fulford
Honored Contributor

Re: tar cannot create

The file could be a socket.

If you have access to te original do "ls -l" on the file IF the perms begin with an s it is a socket. e.g.
srw-rw-rw- root sys .....etc....

tar cannot create it. Most programs create socket files by themselves if they are not present and so it's "non-existance" may be OK

Tim
-