0

I have a problem with one server and I really don't know what happen, so I will appreciate any help/suggestion. On one partition have 42GB space. yesterday i saw that this partition is full 100% so i cleaned some old files and cleared about 12GB. Today everything seems good untill before 1 hour when i check and the partition was again full on 100%.

While looked what to delete the free space is back again like yesterday and this 12GB are here now again.

Yesterday:

/dev/               42GB   29GB   12GB  72% /smth

Before 1 hour:

/dev/               42GB   42GB        100% /smth

Now:

/dev/               42GB   29GB   12GB  72% /smth

The problem is here in /smth. I'm not rly familiar with Linux/unix still learning and will appreciate any help. What can i check or ? There is procceses wich are run non-stop and write in log files data.

If you guys need some more info just ask me.

5
  • Wait a moment...you're deleting files since 2 days, and you have no idea what causes the bloat?! What did you delete?
    – Bobby
    Jul 25, 2012 at 12:21
  • No, no.. I deleted old files from 2005-2010 year .. and only log files Jul 25, 2012 at 12:22
  • You need to clarify your question. You deleted 12GB, it worked, and then it was full again. But then you post the df -h line where 12GB is free? Isn't that how it should be? Or was that line from the day before? Are you wondering why the disk keeps filling up? I can't find out exactly what you are asking, try to clarify. Jul 25, 2012 at 12:24
  • @DanielAndersson as i said i deleted 12GB yesterday. Then today the space was again full on 100%. After 1 hours(now) i get again this 12Gb from somewhere. I know that is filling again. I wondering where those 12GB goes and then back again. This is from now df -h.. before 1 hour /dev/smth was 100% Jul 25, 2012 at 12:28
  • 1
    Well...looking at the directories should help you, what gets bloated? What does write to it?
    – Bobby
    Jul 25, 2012 at 12:42

1 Answer 1

1

If a file is opened somewhere, then even if you delete it by rm it will remain on disk until it is closed. Thus, if you e.g. have a program that is writing to a giant log file, just deleting the file might not give you back the disk space until the program also closes the file.

Read about unlink for more information on the topic.

7
  • Wouldn't the output of df reflect that?
    – Bobby
    Jul 25, 2012 at 12:34
  • @Bobby: Yes, but from the post it seems df was not checked after deleting the 12GB, it was just assumed to have been cleaned. The day after, df was checked and the partition seemed full. Later it seemed that 12GB was available. If the program closed the file in between the last two checks, it would explain the situation. Jul 25, 2012 at 12:36
  • @DanielAndersson i checked after deletion i got 12GB. Then i check today before 1 hour how is the space and was 100% full. And now is again 12GB but i didn't delete anything today. Jul 25, 2012 at 12:38
  • @DanielAndersson i also thinked about some file which is open like u said but i deleted only old files and i don't think that the 3+ years files are still open. I really have big log files but they backup every 24 hours and start log in new files. And thats what i do yesterday is to delete old logs from system. Older than 3 years Jul 25, 2012 at 12:42
  • @JasonPaddle: The next time it fills up, try du -am /smth | sort -n to see if you find some suspicious files. It is difficult to give better tips since it could depend on specific software running on the machine, and it is not practical (time-wise) for you to explain everything that goes on on your server. The unlink issue is the only one I spontaneously thought of. Jul 25, 2012 at 12:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .