Operating System - HP-UX
1833493 Members
2893 Online
110052 Solutions
New Discussion

Help: rm: <file> not removed. No such file or directory.

 
Marcin_4
New Member

Help: rm: <file> not removed. No such file or directory.

Hi,

We are seeing this strange error during our software builds:

rm: file.tmp not removed. No such file or directory

It's intermittent and it usually manifests itself during large loads when the nodes are very busy. Seems like a request to remove a file is sent but the requestor never receives a message back that the file was removed and it complains.

Somebody told me that it might have to do with the timeout setting on the particular file system. Does anyone know more about this?

Martin
9 REPLIES 9
hpuxrox
Respected Contributor

Re: Help: rm: <file> not removed. No such file or directory.

Marcin,

I doubt this error is due to file system timeout. At first glance it appears to me that either the file was never created or was removed. Resolution would be to fix the script or program code.

MANOJ SRIVASTAVA
Honored Contributor

Re: Help: rm: <file> not removed. No such file or directory.

Hi Marcin

I dont think there is anything to do with time out stuff , if rm says not removed that menas there is no file with that name and that is it . Or may be you are gving the commnad too soon before the file.tmp is getting regenerated.


Manoj Srivastava
Sachin Patel
Honored Contributor

Re: Help: rm: <file> not removed. No such file or directory.

I doubt it that it is timeout problem. because even if you are removing file remotly once you issue a command it will not die til it finished.

Check the script or program for bug.

Sachin
Is photography a hobby or another way to spend $
Marcin_4
New Member

Re: Help: rm: <file> not removed. No such file or directory.

How can this be a bug in the script if the problem is intermittent??? The builds are run every day for the past 5 years and the scripts haven't changed. The only thing that has changed was the hardware and size of loads.

Like I said, it only happens with large software builds (which take few hours to compile using 10 HPUX B2000 nodes) which means there is either some timeout or caching issue.

We've seen a similar problem before where a file would be written, then modified and some nodes in the pool would not see the change until few minutes later (during a heavy load on the whole system). It that case there was a patch mismatch between the nodes.

I'll update this thread when we resolve this problem. I just though that someone might have seen this before.

Martin
harry d brown jr
Honored Contributor

Re: Help: rm: <file> not removed. No such file or directory.

Martin,

The error message, actually just a WARNING:

rm: file.tmp not removed. No such file or directory

Is saying that the FILE named "file.tmp" is not available to be removed. It could be that the file named "file.tmp" is being removed by some other process, say maybe a CRON? It could also be that your script is running so fast that the FILESYSTEM has not had a chance to update the directory. If you could post the PORTION of your scripts that deal with the file named "file.tmp", maybe we could assist in correcting the script?

live free or die
harry
Live Free or Die
Deepak Extross
Honored Contributor

Re: Help: rm: <file> not removed. No such file or directory.

Hi,
In all probablity, your file.tmp is either not being created or being deleted by another process.
You can suppress this warning using the "rm -f" option.
Niraj Kumar Verma
Trusted Contributor

Re: Help: rm: <file> not removed. No such file or directory.

Hi,

I havd the similar problem.

Finally I found the file name
what I was creating, was with extra space

"file.tmp "

I tried removing
# rm "file.tmp "

and it worked ....

I thought this info maybe useful to u.

-Niraj
Niraj.Verma@philips.com
Sukant Naik
Trusted Contributor

Re: Help: rm: <file> not removed. No such file or directory.

Hi Marcin,

Just one thought.

Are you getting any errors like you have reached the maximum limit for nfile. You might be hitting the nfile max limit and there is no way the system can create move inodes for you. Because of which, the file might not be getting created in your script and then rm will obiviously give an error.

This is just a suggestion..Try increasing the nfile parameter.

-Sukant
Who dares he wins
K.Vijayaragavan.
Respected Contributor

Re: Help: rm: <file> not removed. No such file or directory.

Hi,

I would like to mention below just a blind thought that may or may not help you.


Does your script defines a variable called (for example) file = test.txt .

And has an entry some thing like,

cat example.txt > $file.txt.

If so , ensure that the "$" is specified as specified above. or ensure that the value for the variable is properly set or the set value is present .(ie. the actual file is present).


Regards,

K.Vijayaragavan
"Let us fine tune our knowledge together"