[CentOS] Cannot open: No space left on device

Fri Sep 11 20:27:40 UTC 2015
reynierpm at gmail.com <reynierpm at gmail.com>

On Fri, Sep 11, 2015 at 3:52 PM, zep <zgreenfelder at gmail.com> wrote:

> did you (or someone else with root access) possibly delete a very large
> file in /var that may still have been in use?    it's very annoying but
> if you do a rm on a large file under /var that is still open by some
> process for writing, it won't actually clear the space.   you can
> overcome that by just truncating the file instead of doing an rm (e.g.
> either > /var/log/bigfile or cp /dev/null /var/log/bigfile).   the only
> way I know to fix the problem once you're having it is to force the
> process to close/reopen the file... either by killing & restarting or
> getting the process to do it if it's got that designed in.   in practice
> I've often found it much easier to reboot a machine to fix such a
> problem condition.
>

In fact, that's exactly what I did. I have tried to open that 14G .tar.gz
file from mc and it crashes several times so I delete the temporary files
from /tmp and also from /home where originally I copied. I've rebooted the
VM and now the output of df -h looks better:

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_server-lv_root
                       26G   16G  8.7G  65% /
tmpfs                 2.0G     0  2.0G   0% /dev/shm
/dev/sda1             477M   80M  373M  18% /boot