8
3
When I run df
it shows the root device is full.
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.9G 9.4G 0 100% /
I looked at the inode
usage and there is pretty much space available for root device
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda1 640K 103K 538K 16% /
But, when I run the du
command, it shows I have used only 2G
out of 9.9G
.
ip-XXX-XXX-XXX-XXX:/$ du -xh --max-depth=1
14M ./etc
4.0K ./mnt
96K ./tmp
3.5M ./bin
0 ./sys
964K ./boot
4.0K ./srv
0 ./dev
55M ./lib
25M ./root
1.1G ./usr
4.0K ./opt
846M ./var
4.3M ./sbin
23M ./home
16K ./lost+found
0 ./proc
2.0G .
It just driving me crazy and interesting too. This is big problem for us since the root disk /
is full and some of the function in our site is failing.
Please help me resolve (also understand) this problem.
Thanks.
2
See linux free disk space confusion and other
– Gilles 'SO- stop being evil' – 2011-06-30T07:20:03.843+df +du
questions at [unix.se].@Gilles like you said, I ran
du -x /
and I see only 2G is used and I calculated the inode size which is160M
. It helped me understand the stuff but I just want to resolve this problem. – Rakesh Sankar – 2011-06-30T07:46:50.757Did you run
du
as root? Otherwise it can only report on the files you can access. – Gilles 'SO- stop being evil' – 2011-06-30T07:59:41.767@Gilles I am running as
root
– Rakesh Sankar – 2011-06-30T08:02:35.160I don't have much to add here other than the great
ncdu
program, which helps visualize disk usage. – Rob – 2012-12-03T21:53:00.430Note that inodes are the data structures that record information about the file. Having plenty of inodes means you can create lots more files; it does not necessarily mean you have free space to put stuff in the files. – Isaac Rabinovitch – 2012-12-03T22:12:40.207