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
fsck
? Maybe your filesystem is broken. And for identifying large files/directory there is a nice interactive tool:ncdu
.