My disk drive /dev/sdc is full (see below). Is there anyway to troubleshoot why it consumed all the disk space.
I have tried running du -d -h 1
but I don't think it's the proper command.
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdc 14G 13G 0 100% / <--- here
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 174M 1.7G 10% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda1 488M 132M 321M 30% /boot
/dev/sdd 99G 25G 73G 26% /data
tmpfs 378M 0 378M 0% /run/user/0
Other log outputs:
$ du -h -d 1
52K ./tmp
131M ./boot
24M ./opt
4.0K ./mnt
34M ./etc
1.6G ./root
0 ./sys
44K ./sysadmin
du: cannot access './proc/58885/task/58885/fd/4': No such file or directory
du: cannot access './proc/58885/task/58885/fdinfo/4': No such file or directory
du: cannot access './proc/58885/fd/4': No such file or directory
du: cannot access './proc/58885/fdinfo/4': No such file or directory
0 ./proc
16K ./lost+found
0 ./dev
25G ./data
4.0K ./media
32K ./home
182M ./run
2.6G ./usr
921M ./var
4.0K ./srv
31G .
$ du -ahx --threshold=1G
1.2G ./root/ffmpeg_sources
1.6G ./root
2.6G ./usr
5.2G
du
is not that bad for the job, but you'd probably want something likesudo du -ahx --threshold=1GiB
, assuming your version ofdu
supports the--threshold
option and adjusting the threshold to your needs (from this answer of mine -- though I don't think that would be a great duplicate target). – fra-san Aug 22 '19 at 15:48--threshold
option. It's really helpful. Thanks for sharing. Still I couldn't find what's causing the disk to consume all the space. – paolooo Aug 22 '19 at 16:01mkdir -p /mnt/root; mount --bind / /mnt/root; du -xhs /mnt/root/*
. This will look "under" your other mounted filesystems such as/data
for unexpected usage. (Tweak thedu
command as you feel is appropriate, but that's the sort of thing that works for me.) 2.lsof | grep deleted
for deleted files that are being held open. Look at the sizes./
on a different location cannot be found there. I think it deserves some space in a real answer, it's really handy. – fra-san Aug 22 '19 at 20:43