Article ID: 117459, created on Sep 23, 2013, last review on Jun 5, 2014

  • Applies to:
  • Virtuozzo
  • Virtuozzo containers for Linux
  • Virtuozzo hypervisor

Symptoms

Different disk space usage is reported by du and df commands:

~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/vzfs              30G   27G  3.4G  89% /

~# du -sh /
16G   

Cause

There are files deleted from hard disk drive remaining open by some process, thus the disk space they occupy is not marked as free.

Resolution

Preferred solution: Restart the container

Alternative solution:

  1. Find out deleted files:

    ~# lsof 2>/dev/null | grep deleted
    perl       5839     www-data    0r      REG             144,49     15683  349053713 (deleted) /tmp/bpn
    perl       5865     www-data    0r      REG             144,49     15683  349053714 (deleted) /tmp/bpn
    perl       9917     www-data    0r      REG             144,49     15683  349053715 (deleted) /tmp/bpn
    qmail-rem 20270       qmailr    0r      REG             144,79     64297 3441251642 (deleted) /opt/psa/handlers/spool/messageqQQXFT
    mysqld    31952        mysql    4u      REG             144,49         0  349046146 (deleted) /tmp/ibWjTB5r
    mysqld    31952        mysql    5u      REG             144,49       150  349046155 (deleted) /tmp/ibcNpkWw
    mysqld    31952        mysql    6u      REG             144,49         0  349046156 (deleted) /tmp/ibh1E3MB
    mysqld    31952        mysql    7u      REG             144,49         0  349046157 (deleted) /tmp/ibJhUWDG
    mysqld    31952        mysql   11u      REG             144,49         0  349046568 (deleted) /tmp/ibScDHKL
    perl      32215     www-data    0r      REG             144,49     34026  349053712 (deleted) /tmp/legend.txt
    
  2. Kill processes holding the files:

    ~# lsof | grep "deleted" | awk '{print $2}' | xargs kill -9
    

Search Words

different

df

du

(deleted)

disk usage

vzquota reports disk full when there is space available

diskspace

.

incorrect diskspace

a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f e8e50b42231236b82df27684e7ec0beb 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF