Disk quota exceeded (difference btw. du and df, again!)

I haven't been able to do anything since yesterday evening because my account is full to the brim. Very annoying on a Friday evening when no admin will be in until Monday morning. Of course, I might consider cleaning up if I knew where the problem is, but I can't figure it out because du and df give me so widely differing numbers:

~$ df -h .
Filesystem            Size  Used Avail Use% Mounted on
nfs-server:/misc-home-1/myuser
                       11G   11G     0 100% /home/myuser
~$ du -sh
72M    .

I read an article or two explaining the reason for the difference, but I've logged out in the mean time & ps doesn't show any "interesting" running processes that might have files open:

~$ ps -ef | grep myuser
myuser    1688 31169  0 15:22 pts/1    00:00:00 ps -ef
myuser    1689 31169  0 15:22 pts/1    00:00:00 grep myuser
myuser    1691 31169  0 15:22 pts/1    00:00:00 sed s/myuser/myuser/g
root     31160  3415  0 14:27 ?        00:00:00 sshd: myuser [priv]
myuser   31164 31160  0 14:27 ?        00:00:00 sshd: myuser@pts/1
myuser   31169 31164  0 14:27 pts/1    00:00:00 -bash

I'm not sure what lsof really is supposed to tell me, but it's supposed to be related, so here is its output:

~$ lsof | grep myuser
lsof       1221      myuser  cwd       DIR   0,53       50       32 /home/myuser
lsof       1221      myuser  rtd       DIR    9,0     4096        2 /
lsof       1221      myuser  txt       REG    9,0   125736  1868018 /usr/bin/lsof
lsof       1221      myuser  mem       REG    9,0  3927680  1787836 /usr/lib/locale/locale-archive
lsof       1221      myuser  mem       REG    9,0  1437064  1311146 /lib/libc-2.11.3.so
lsof       1221      myuser  mem       REG    9,0   128744  1311142 /lib/ld-2.11.3.so
lsof       1221      myuser    0u      CHR  136,1      0t0        4 /dev/pts/1
lsof       1221      myuser    1w     FIFO    0,6      0t0 58613309 pipe
lsof       1221      myuser    2u      CHR  136,1      0t0        4 /dev/pts/1
lsof       1221      myuser    3r      DIR    0,3        0        1 /proc
lsof       1221      myuser    4r      DIR    0,3        0 58610834 /proc/1221/fd
lsof       1221      myuser    5w     FIFO    0,6      0t0 58610839 pipe
lsof       1221      myuser    6r     FIFO    0,6      0t0 58610840 pipe
grep       1222      myuser  cwd       DIR   0,53       50       32 /home/myuser
grep       1222      myuser  rtd       DIR    9,0     4096        2 /
grep       1222      myuser  txt       REG    9,0   119288    98315 /bin/grep
grep       1222      myuser  mem       REG    9,0  3927680  1787836 /usr/lib/locale/locale-archive
grep       1222      myuser  mem       REG    9,0  1437064  1311146 /lib/libc-2.11.3.so
grep       1222      myuser  mem       REG    9,0    14696  1311158 /lib/libdl-2.11.3.so
grep       1222      myuser  mem       REG    9,0   128744  1311142 /lib/ld-2.11.3.so
grep       1222      myuser  mem       REG    9,0    26048  1658522 /usr/lib/gconv/gconv-modules.cache
grep       1222      myuser    0r     FIFO    0,6      0t0 58613309 pipe
grep       1222      myuser    1w     FIFO    0,6      0t0 58613311 pipe
grep       1222      myuser    2u      CHR  136,1      0t0        4 /dev/pts/1
sed        1223      myuser  cwd       DIR   0,53       50       32 /home/myuser
sed        1223      myuser  rtd       DIR    9,0     4096        2 /
sed        1223      myuser  txt       REG    9,0    65472    98333 /bin/sed
sed        1223      myuser  mem       REG    9,0  3927680  1787836 /usr/lib/locale/locale-archive
sed        1223      myuser  mem       REG    9,0    14696  1311158 /lib/libdl-2.11.3.so
sed        1223      myuser  mem       REG    9,0  1437064  1311146 /lib/libc-2.11.3.so
sed        1223      myuser  mem       REG    9,0   117848  1310765 /lib/libselinux.so.1
sed        1223      myuser  mem       REG    9,0   128744  1311142 /lib/ld-2.11.3.so
sed        1223      myuser  mem       REG    9,0    26048  1658522 /usr/lib/gconv/gconv-modules.cache
sed        1223      myuser    0r     FIFO    0,6      0t0 58613311 pipe
sed        1223      myuser    1u      CHR  136,1      0t0        4 /dev/pts/1
sed        1223      myuser    2u      CHR  136,1      0t0        4 /dev/pts/1
lsof       1224      myuser  cwd       DIR   0,53       50       32 /home/myuser
lsof       1224      myuser  rtd       DIR    9,0     4096        2 /
lsof       1224      myuser  txt       REG    9,0   125736  1868018 /usr/bin/lsof
lsof       1224      myuser  mem       REG    9,0  3927680  1787836 /usr/lib/locale/locale-archive
lsof       1224      myuser  mem       REG    9,0  1437064  1311146 /lib/libc-2.11.3.so
lsof       1224      myuser  mem       REG    9,0   128744  1311142 /lib/ld-2.11.3.so
lsof       1224      myuser    4r     FIFO    0,6      0t0 58610839 pipe
lsof       1224      myuser    7w     FIFO    0,6      0t0 58610840 pipe
sshd      31164      myuser  cwd   unknown                          /proc/31164/cwd (readlink: Permission denied)
sshd      31164      myuser  rtd   unknown                          /proc/31164/root (readlink: Permission denied)
sshd      31164      myuser  txt   unknown                          /proc/31164/exe (readlink: Permission denied)
sshd      31164      myuser NOFD                                    /proc/31164/fd (opendir: Permission denied)
bash      31169      myuser  cwd       DIR   0,53       50       32 /home/myuser
bash      31169      myuser  rtd       DIR    9,0     4096        2 /
bash      31169      myuser  txt       REG    9,0   926536    98370 /bin/bash
bash      31169      myuser  mem       REG    9,0    10272  1658485 /usr/lib/gconv/ISO8859-1.so
bash      31169      myuser  mem       REG    9,0  3927680  1787836 /usr/lib/locale/locale-archive
bash      31169      myuser  mem       REG    9,0  1437064  1311146 /lib/libc-2.11.3.so
bash      31169      myuser  mem       REG    9,0    14696  1311158 /lib/libdl-2.11.3.so
bash      31169      myuser  mem       REG    9,0   286776  1310771 /lib/libncurses.so.5.7
bash      31169      myuser  mem       REG    9,0   128744  1311142 /lib/ld-2.11.3.so
bash      31169      myuser  mem       REG    9,0    26048  1658522 /usr/lib/gconv/gconv-modules.cache
bash      31169      myuser    0u      CHR  136,1      0t0        4 /dev/pts/1
bash      31169      myuser    1u      CHR  136,1      0t0        4 /dev/pts/1
bash      31169      myuser    2u      CHR  136,1      0t0        4 /dev/pts/1
bash      31169      myuser  255u      CHR  136,1      0t0        4 /dev/pts/1

Can anybody make suggestions? This is on a Debian squeeze server, logged in via ssh.

Hi Mregine,

What does a simple ls -l show?

Regards

Dave

Only a minimal number of top-level directories...

~$ ls -l 
total 14
drwxr-xr-x  2 myuser group  3 Jul 21 05:28 Desktop
drwxr-xr-x  4 myuser group  4 Jun 18 19:33 Work
drwxr-xr-x 12 myuser group 12 Jul 21 05:41 local
drwxr-xr-x  2 myuser group  2 Mar  6 15:01 windows

windows is empty, Desktop contains only one 20-line text file with config stuff, local has some stuff I compiled and my svn repository (du says it's 34M of the total 72), and Work accounts for the rest. ls -lah reveals no large hidden files (nothing larger than 175K, .ICEauthority).

Hi Mregine,

Is the file systems an auto mounted file system, it could well be that the fs has been filled up on the sharing server.

The name "misc-home-1" suggests that you will not be the only user with access to this bit of disk, you may have to wait for the systems admin to have a look.

Regards

Dave

1 Like

What's an "auto mounted file system"? And how would I know?

(I'm still busy googling, but I haven't found anything helpful for me as a user without admin rights)

Create an alias called "du."

alias du.='du -k | grep -v "/.*/" | sort -n'

Then using a combination of du.'s ... cd's ... & ls -la's you should be able to determine where and which file(s) are using the most disk space.

example: (cd /home/myuser)

ls -la (look for files that are large)
du. (this will show you the relative size of your sub-directories)
cd (to the largest sub-directory)

repeat until you find large file that you do not want and delete them.

According to what you posted, there is no reason to believe you are in cause in this disk full situation. The NFS server hosting your home directory and likely many other ones is simply full. You have been misled by questions asking about df and du discrepancy. Here, this discrepancy is expected as du is run on a subdirectory (hour homedir), not the whole file system which what df is reporting. There is not that much you can do outside waiting for an admin to fix the issue as you are likely missing the rights required to identify which other user(s) is/are using too much space.

1 Like

gull04 and jlliagre are most probably correct. If you need a place to store stuff, here's what you can do in the mean-time:

Check the diskspace of /tmp and /var/tmp. Use df:

df /tmp /var/tmp

If it appears there is sufficient space on one of these, make a directory for yourself and create a soft-link to it.

mkdir /var/tmp/$USER
ln -s /var/tmp/$USER $HOME/tmp

Now you can store files via the "tmp" link in your home directory.
Be sure to clean it up and/ore move it back once your admin has freed up disk space for you.

1 Like

Thanks jlliagre & otheus. I think that's the conclusion Dave came to, too. What confused me was the output from df -kh ., with the /home/myuser next to the 100%, and not, say, /home or /home/some-subgroup. I had never seen users mentioned there and I interpreted it wrong. I thought du and df would then both measure the same thing. Actually, now I think there may be a process running amok somewhere (which doesn't belong to me), because I did manage to clean up a few M of files and the space was taken up immediately.

otheus, I considered that but since many posts on the du/df difference suggested admins might have to reboot the machine to fix the problem, I figured /tmp wasn't the best place. Luckily there is another scratch directory somewhere in which I can work :slight_smile: Of course I could also take Sunday off, but I like working when it's nice and quiet (and then taking off during the week when there's too much going on).