LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   No space left on device and df shows 50% available (http://www.linuxquestions.org/questions/linux-general-1/no-space-left-on-device-and-df-shows-50-available-786978/)

Ladowny 02-04-2010 10:26 AM

No space left on device and df shows 50% available
 
Hi

I've run across a strange problem - I get "No space left on device" errors, but df -h for that partition shows
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 32G 13G 18G 41% /

I'm using ext3 partition on Debian

I'm not uploading 18 Gig file or anything, just ordinary small files are uploaded and I keep deleting old stuff. I've already deleted 10Gig and the problem persists. I have rebooted the machine, forcing fsck
Code:

shutdown -rF now
Any suggestions ?

EricTRA 02-04-2010 10:43 AM

Hello,

Can you run in a terminal:
Code:

df -i
and post the output here?

Kind regards,

Eric

Ladowny 02-04-2010 11:03 AM

Thanks, looks like this is the issue

Code:

Filesystem            Inodes  IUsed  IFree IUse% Mounted on
/dev/sda1            4194304 4194292      12  100% /

Never had this problem before. How can I increase number of inodes or remove some. I've removed the losts of small files, shouldn't number of free inodes increase ?

michaelk 02-04-2010 11:10 AM

To elaborate on EricTRA's post a data structure called an inode is associated with each file. Its possible if you have lots and lots of small files to run out of inodes but still have available free space on the filesystem. If this is the case the only way to add inodes is to reformat the filesystem. Since sda1 is your / partition reformatting is probably not desirable.

EricTRA 02-04-2010 11:32 AM

Hello,

As far as I know, deleting files should free up the inodes related to them. If they don't then you might have to run fsck to see if it reports any errors and try to fix them with fsck. Have a look at the man page for fsck:
Code:

man fsck
Kind regards,

Eric

Ladowny 02-04-2010 11:47 AM

I found a client uploading lots of small files, some zero size.

So problem solved. I am deleting them, did not pay attention to this directory before, just inherited these servers and still discovering new issues

Thanks for you feedbacks, really helpful.

EricTRA 02-04-2010 11:48 AM

That might be the culprid ;) Even 0 size files take up inodes. I'd tap him on the fingers!

Kind regards,

Eric


All times are GMT -5. The time now is 04:50 AM.