Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I run some commands I get 'out of space' messages. I looked around the Internet for ways to diagnose the issue.

I ran df:

adam@nas:/$ df
Filesystem            1K-blocks      Used Available Use% Mounted on
/dev/sdf1              30257960  28769436         0 100% /
udev                    3982180         4   3982176   1% /dev
tmpfs                   1609804       632   1609172   1% /run
none                       5120         0      5120   0% /run/lock
none                    4024504         0   4024504   0% /run/shm
overflow                   1024       212       812  21% /tmp
tank                  177356416       256 177356160   1% /mnt/tank
tank/CrashplanBackups 326836352 149480192 177356160  46% /mnt/tank/CrashplanBackups
tank/Downloads        178973440   1617280 177356160   1% /mnt/tank/Downloads
tank/Media            724196224 546840064 177356160  76% /mnt/tank/Media
tank/Photography      258230528  80874368 177356160  32% /mnt/tank/Photography
tank/XBMC             177646464    290304 177356160   1% /mnt/tank/XBMC

/dev/sdf1 is full. It's a 32GB SD Card

I then ran du:

adam@nas:/$ sudo du --max-depth 1 -x -h
0   ./run
8.4M    ./sbin
1.9G    ./usr
0   ./tmp
0   ./dev
42M ./etc
0   ./sys
4.0K    ./lib64
16K ./media
171M    ./boot
2.5M    ./home
550M    ./var
4.0K    ./selinux
4.0K    ./srv
16K ./lost+found
8.7M    ./bin
1.2G    ./lib
18K ./mnt
60K ./root
0   ./proc
4.0K    ./opt
3.8G    .

So there is a massive difference. I read about inodes so I ran:

adam@nas:/$ df -i
Filesystem               Inodes  IUsed     IFree IUse% Mounted on
/dev/sdf1               1913840 251600   1662240   14% /
udev                     995545    562    994983    1% /dev
tmpfs                   1006126    495   1005631    1% /run
none                    1006126      4   1006122    1% /run/lock
none                    1006126      1   1006125    1% /run/shm
overflow                1006126      7   1006119    1% /tmp
tank                  354712597     11 354712586    1% /mnt/tank
tank/CrashplanBackups 354712816    230 354712586    1% /mnt/tank/CrashplanBackups
tank/Downloads        354712645     59 354712586    1% /mnt/tank/Downloads
tank/Media            354714253   1667 354712586    1% /mnt/tank/Media
tank/Photography      354804713  92127 354712586    1% /mnt/tank/Photography
tank/XBMC             354717700   5114 354712586    1% /mnt/tank/XBMC

I also read about file descriptors and deleted files.

On running

lsof | grep "deleted"

nothing is returned. Restarting the server does not free any space up. How can I get my disk space back? This is on Ubuntu 12.04 and is a NAS.

  • It has 6 drives in total.
  • 1x 32GB SD for the linux install
  • 5x HD which use ZFS and is mounted in /mnt/tank
share|improve this question

migrated from serverfault.com Mar 1 at 16:24

This question came from our site for system and network administrators.

    
Did you already run a fsck? Maybe your filesystem is broken. And for identifying large files/directory there is a nice interactive tool: ncdu. –  scai Mar 1 at 17:44
    
did you run lsof as root ? –  Lawrence Mar 2 at 7:25

1 Answer 1

up vote 1 down vote accepted

You probably have too many files in /tmp. Because the disk was full at boot, you can see that a tmpfs was mounted in /tmp so you can write something to that location. The du command can't see what is there because this tmpfs is in the way. You can get around this by bind mounting / somewhere so you can look at it without any of the other mount points in the way:

sudo mount --bind / /mnt/foo
du -xh --max-depth=1 /mnt/foo
share|improve this answer
    
Thanks for this, it wasn't the tmp files but was another folder. Not sure why the files got into the state but I have now freed up 24GB of space. –  Adam Price Mar 10 at 18:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.