Elia Weiss
Elia Weiss

Reputation: 9965

apache/php say no space on disk while disk is not full

We run prestashop on php/apache/ubuntu.

df -h says there is 12G available.

but the php fail with no spcace on device.

We think there might be processes with handler to deleted files, so we used

lsof +f | grep '/data1'
sudo kill -9 

to release the handlers, it did help for a while but now it happen again.

Any one bump into this issue?

can anyone shed some light on this issue (and sujest a solution) ?

Upvotes: 1

Views: 265

Answers (2)

Jubayer Arefin
Jubayer Arefin

Reputation: 495

Check your inode limits. It could be the problem.

Upvotes: 1

Alastair Irvine
Alastair Irvine

Reputation: 1176

Another possibility is that the filesystem isn't full, but that you've reached the limit of usable blocks. The rest are called "reserved blocks" and are only writable by the root user.

The solution is to unmount the filesystem (you'll have to stop Apache etc. first) and adjust the reserved blocks percentage. This will only work if it's not the root filesystem (/). But first, to find out the device and filesystem type, run:

mount -l

If the type is ext3 or ext4 you can unmount the filesystem and run this:

tune2fs -m 0 /dev/sda2

(Assuming /dev/sda2 is the device of your filesystem as per the mount -l output.)

However, if you're running out of space on the root filesystem you're stuck. (It's not recommended to have this with little or no reserved blocks anyway.)

Upvotes: 0

Related Questions