Score:0

No space left on device but all folders are small

ca flag

ok, the system disk on this remote machine is full:

$ df -h
Filesystem           Size  Used Avail Use% Mounted on
udev                 7,8G     0  7,8G   0% /dev
tmpfs                1,6G  3,3M  1,6G   1% /run
/dev/sdd1            117G  115G     0 100% /

but when I list it's content:

du -sh ./* | sort -h
4,0K    ./Documents
4,0K    ./Music
4,0K    ./Pictures
4,0K    ./Public
4,0K    ./rclone.conf
4,0K    ./Templates
4,0K    ./Videos
8,0K    ./Desktop
12K     ./examples.desktop
24K     ./file.txt
1,5M    ./home
5,8M    ./snap
13M     ./Downloads

how to find what occupies these 115GB?

P.S.: I have already done sudo apt autoremove

P.P.S.:

sudo du -a . | sort -n -r | head -n 20
696668  .
364008  ./.cache
258880  ./.pyenv
250528  ./.pyenv/versions
250524  ./.pyenv/versions/3.8.5
246128  ./.cache/pip
239544  ./.cache/pip/http
231148  ./.pyenv/versions/3.8.5/lib
197244  ./.pyenv/versions/3.8.5/lib/python3.8
100336  ./.cache/mozilla
100332  ./.cache/mozilla/firefox
100328  ./.cache/mozilla/firefox/b38hqcj0.default
79088   ./.cache/mozilla/firefox/b38hqcj0.default/cache2
78984   ./.cache/mozilla/firefox/b38hqcj0.default/cache2/entries
65020   ./.pyenv/versions/3.8.5/lib/python3.8/test
51684   ./.cache/pip/http/5
49216   ./.cache/pip/http/5/1
48868   ./.cache/pip/http/5/1/d
48864   ./.cache/pip/http/5/1/d/8
48860   ./.cache/pip/http/5/1/d/8/2

#Edited for Ray's comment:

:~# du -sh * | sort -h
4,0K    Documents
4,0K    Music
4,0K    Pictures
4,0K    Public
4,0K    rclone.conf
4,0K    Templates
4,0K    Videos
8,0K    Desktop
12K     examples.desktop
24K     file.txt
1,5M    home
5,8M    snap
13M     Downloads

#Edit: @sancho.s idea:

sudo du / -h --max-depth=1 | sort --human-numeric-sort 
[sudo] password for install: 
du: cannot access '/proc/30550/task/30550/fd/3': No such file or directory
du: cannot access '/proc/30550/task/30550/fdinfo/3': No such file or directory
du: cannot access '/proc/30550/fd/4': No such file or directory
du: cannot access '/proc/30550/fdinfo/4': No such file or directory
0       /dev
0       /proc
0       /sys
4,0K    /cdrom
4,0K    /lib64
4,0K    /media
4,0K    /srv
8,0K    /samba
16K     /lost+found
220K    /tmp
3,3M    /run
7,3M    /root
12M     /sbin
13M     /bin
15M     /etc
112M    /boot
930M    /lib
1,1G    /home
1,4G    /opt
3,4G    /var
4,3G    /usr
5,1G    /snap
4,2T    /
4,2T    /mnt


$ uname -a
Linux PC-IT-UBUIEX 4.15.0-144-generic #148-Ubuntu SMP Sat May 8 02:33:43 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
install@PC-IT-UBUIEX:~$ ls -al /
total 2098716
drwxr-xr-x  25 root root             4096 čen 25 06:17 .
drwxr-xr-x  25 root root             4096 čen 25 06:17 ..
drwxr-xr-x   2 root root             4096 čen 18 06:47 bin
drwxr-xr-x   3 root root             4096 čen 26 06:30 boot
drwxrwxr-x   2 root root             4096 zář  5  2018 cdrom
drwxr-xr-x  20 root root             4520 čec  6 12:39 dev
-rw-r--r--   1 root root          1479017 zář 29  2018 Documents
drwxr-xr-x 148 root root            12288 čec  2 12:20 etc
drwxr-xr-x   9 root root             4096 čec  2 17:29 home
lrwxrwxrwx   1 root root               34 čen 25 06:17 initrd.img -> boot/initrd.img-4.15.0-147-generic
lrwxrwxrwx   1 root root               34 čen 25 06:17 initrd.img.old -> boot/initrd.img-4.15.0-144-generic
drwxr-xr-x  21 root root             4096 zář  5  2018 lib
drwxr-xr-x   2 root root             4096 čec  8  2020 lib64
drwx------   2 root root            16384 zář  5  2018 lost+found
drwxr-xr-x   2 root root             4096 čen  8 13:37 media
drwxr-xr-x   6 root root             4096 čen 18 10:45 mnt
drwxr-xr-x   5 root root             4096 bře  9 18:39 opt
dr-xr-xr-x 262 root root                0 čen 24 05:39 proc
drwx------   7 root root             4096 čec  2 13:13 root
drwxr-xr-x  33 root root             1120 čec 10 10:09 run
drwxr-xr-x   3 root sambashare       4096 zář 24  2019 samba
drwxr-xr-x   2 root root            12288 čen  5 06:30 sbin
drwxr-xr-x  17 root root             4096 čec  2 14:15 snap
drwxr-xr-x   2 root root             4096 čec 25  2018 srv
-rw-------   1 root root       2147483648 zář  5  2018 swapfile
dr-xr-xr-x  13 root root                0 čen 24 05:39 sys
drwxrwxrwt  18 root root             4096 čec 10 10:09 tmp
drwxr-xr-x  11 root root             4096 zář  3  2019 usr
drwxr-xr-x  14 root root             4096 čec 25  2018 var
lrwxrwxrwx   1 root root               31 čen 25 06:17 vmlinuz -> boot/vmlinuz-4.15.0-147-generic
lrwxrwxrwx   1 root root               31 čen 25 06:17 vmlinuz.old -> boot/vmlinuz-4.15.0-144-generic

/mnt/ are the mounted disks right, not the system one (correct?). So leaving that one aside, I don't see anything that sums to 115G ...

~# du /mnt -h --max-depth=1 | sort --human-numeric-sort 
306G    /mnt/sdb
467G    /mnt/sda
1,7T    /mnt/sdc
1,7T    /mnt/sdd
4,2T    /mnt

# ls -al /mnt
total 20
drwxr-xr-x  6 root root 4096 čen 18 10:45 .
drwxr-xr-x 25 root root 4096 čen 25 06:17 ..
drwxrwxrwx  5 6687 6687 4096 čen 16 23:44 sda
drwxr-xr-x  3 root root 4096 čen 19 17:50 sdb
drwxrwxrwx 16 root root 4096 čec  9 14:43 sdc
drwxr-xr-x  2 root root    0 čen 22 08:50 sdd


:/usr/local/bin$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0   548K  1 loop /snap/gnome-logs/106
loop1    7:1    0  99,4M  1 loop /snap/core/11187
loop2    7:2    0  55,4M  1 loop /snap/core18/2066
loop5    7:5    0   219M  1 loop /snap/gnome-3-34-1804/72
loop7    7:7    0   704K  1 loop /snap/gnome-characters/726
loop8    7:8    0 136,2M  1 loop /snap/b2/25
loop9    7:9    0   6,3M  1 loop /snap/rclone/466
loop10   7:10   0  61,7M  1 loop /snap/core20/1026
loop12   7:12   0  65,1M  1 loop /snap/gtk-common-themes/1515
loop14   7:14   0   2,5M  1 loop /snap/gnome-calculator/884
loop15   7:15   0 164,8M  1 loop /snap/gnome-3-28-1804/161
loop20   7:20   0 140,7M  1 loop /snap/gnome-3-26-1604/104
loop22   7:22   0  55,5M  1 loop /snap/core18/2074
loop23   7:23   0  99,4M  1 loop /snap/core/11316
loop25   7:25   0 243,9M  1 loop /snap/gnome-3-38-2004/39
loop26   7:26   0   2,5M  1 loop /snap/gnome-system-monitor/163
sda      8:0    0 931,5G  0 disk 
└─sda1   8:1    0 931,5G  0 part /mnt/sda
sdb      8:16   0 931,5G  0 disk 
└─sdb1   8:17   0 931,5G  0 part /mnt/sdb
sdc      8:32   0   1,8T  0 disk /mnt/sdc
sdd      8:48   0 119,2G  0 disk 
└─sdd1   8:49   0 119,2G  0 part /



df -h
Filesystem           Size  Used Avail Use% Mounted on
udev                 7,8G     0  7,8G   0% /dev
tmpfs                1,6G  3,3M  1,6G   1% /run
/dev/sdd1            117G  115G     0 100% /
tmpfs                7,8G     0  7,8G   0% /dev/shm
tmpfs                5,0M  4,0K  5,0M   1% /run/lock
tmpfs                7,8G     0  7,8G   0% /sys/fs/cgroup
/dev/loop2            56M   56M     0 100% /snap/core18/2066
/dev/loop1           100M  100M     0 100% /snap/core/11187
/dev/loop5           219M  219M     0 100% /snap/gnome-3-34-1804/72
/dev/loop8           137M  137M     0 100% /snap/b2/25
/dev/loop9           6,4M  6,4M     0 100% /snap/rclone/466
/dev/loop12           66M   66M     0 100% /snap/gtk-common-themes/1515
/dev/loop14          2,5M  2,5M     0 100% /snap/gnome-calculator/884
/dev/loop22           56M   56M     0 100% /snap/core18/2074
/dev/sda1            917G  467G  404G  54% /mnt/sda
/dev/sdb1            916G  307G  564G  36% /mnt/sdb
/dev/sdc             1,8T  1,7T   40G  98% /mnt/sdc
tmpfs                1,6G   16K  1,6G   1% /run/user/121
/dev/loop23          100M  100M     0 100% /snap/core/11316
/dev/loop20          141M  141M     0 100% /snap/gnome-3-26-1604/104
tmpfs                1,6G     0  1,6G   0% /run/user/1000
//192.168.50.2/Algo   16T  1,8T   15T  12% /mnt/sdd
/dev/loop10           62M   62M     0 100% /snap/core20/1026
/dev/loop25          244M  244M     0 100% /snap/gnome-3-38-2004/39
/dev/loop0           640K  640K     0 100% /snap/gnome-logs/106
/dev/loop7           768K  768K     0 100% /snap/gnome-characters/726
/dev/loop26          2,5M  2,5M     0 100% /snap/gnome-system-monitor/163
/dev/loop15          165M  165M     0 100% /snap/gnome-3-28-1804/161

@HuHa's suggestion:

wget https://github.com/shundhammer/qdirstat/raw/master/scripts/qdirstat-cache-writer
--2021-07-10 10:18:34--  https://github.com/shundhammer/qdirstat/raw/master/scripts/qdirstat-cache-writer
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/shundhammer/qdirstat/master/scripts/qdirstat-cache-writer [following]
--2021-07-10 10:18:34--  https://raw.githubusercontent.com/shundhammer/qdirstat/master/scripts/qdirstat-cache-writer
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.108.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12542 (12K) [text/plain]
Saving to: ‘qdirstat-cache-writer’

qdirstat-cache-writer                                 100%[=======================================================================================================================>]  12,25K  --.-KB/s    in 0s      

2021-07-10 10:18:34 (60,6 MB/s) - ‘qdirstat-cache-writer’ saved [12542/12542]

sda has lots space:

root@PC-IT-UBUIEX:/usr/local/bin# sudo qdirstat-cache-writer / /mnt/sda/myserver-root.cache.gz
sudo: qdirstat-cache-writer: command not found
Zanna avatar
kr flag
This conversation has been [moved to chat](https://chat.stackexchange.com/rooms/127384/discussion-on-question-by-user2413-no-space-left-on-device-but-all-folders-are-s) which will hopefully be more convenient for y'all.
Score:0
pl flag

Execute

sudo du / -h --max-depth=1 | sort --human-numeric-sort 

You should see everything there. From what you posted, it looks like you have a lot of space taken with files in / itself, which is quite strange.

Please also post the output of

uname -a
sudo ls -al /
sudo du /mnt -h --max-depth=1 | sort --human-numeric-sort 
sudo ls -al /mnt
lsblk

Notes:

  1. df does not need sudo
sancho.s ReinstateMonicaCellio avatar
pl flag
@user2413 - Strange, I expected to see `4.3T` in your `/`. Just in case, please see updated answer and post the output.
ca flag
@added 1. to the question and removed the offending sudo in it as well. There is `4,2T` in ` /` (check the last line of the output below #Edit: @sancho.s idea:)
sancho.s ReinstateMonicaCellio avatar
pl flag
@user2413 - Also strange is that `/mnt` does not show up in `df`. Maybe part of what is in there is actually in your physical partition, and part is not. See update.
ca flag
the results of the command with and without the sudo are identical. Is this possible?
ca flag
@shancho.s: just did now (earlier I had not posted the complete output of dh -h.
ca flag
yes, I just checked and it really looks like when I add sudo to all the commands you suggested I get the same output
sancho.s ReinstateMonicaCellio avatar
pl flag
Did you post the output of *all* the commands I listed? Please check one by one, you may be missing some `sudo`s.
ca flag
I re-ran all the command with sudo on and off and they yield the same output.
Score:0
in flag

you can find huge file with bellow command

find / -type f -exec du -h {} + | sort -hr | head -20

1- find

find all files within a directory

find / -type f This command simply finds all the files (not directories) within your directory.

2 – exec du -h {} +

find all files, then get their human readable size

find / -type f -exec du -h {} + Now for each file found, the –exec command will execute the command du -h, which print every file size in human readable (eg 2.4M). For more information

the {} asks the du command to take the results of the find command as input the + sign asks the du command to treat all the files at once (which makes it a bit faster) 3 – | sort -hr

find all files, then get their human readable size, then sort by largest first

find / -type f -exec du -h {} + | sort -hr The | symbol is a Linux pipe, which redirects the output of the last command (up until du -h {} +) to the new command, which is sort. So you are now essentially sorting all files found (with their human-readable size) by human readable size (-h), in reverse order (-r).

3 – | head -20

find all files, then get their human readable size, then sort by largest first, then only print the top 20

find / -type f -exec du -h {} + | sort -hr | head -20
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.