I have a problem with disk space usage on my server. I find 97% usage in dev/md3 but when I try to find which file or folder takes up space I can't find anything...
Filesystem Size Used Avail Use% Mounted on
udev 7,8G 0 7,8G 0% /dev
tmpfs 1,6G 9,0M 1,6G 1% /run
/dev/md3 20G 18G 581M 97% /
tmpfs 7,9G 0 7,9G 0% /dev/shm
tmpfs 5,0M 0 5,0M 0% /run/lock
tmpfs 7,9G 0 7,9G 0% /sys/fs/cgroup
/dev/md2 487M 147M 311M 33% /boot
/dev/md4 1,8T 311G 1,4T 19% /home
4,0K ./srv
9,0M ./run
8,0K ./snap
4,0K ./mnt
1,5G ./usr
7,3M ./etc
26M ./sbin
311G ./home
260M ./var
4,0K ./opt
116K ./root
4,0K ./lib64
64K ./tmp
861M ./lib
0 ./dev
du: cannot access './proc/3718/task/3718/fd/4': No such file or directory
du: cannot access './proc/3718/task/3718/fdinfo/4': No such file or directory
du: cannot access './proc/3718/fd/3': No such file or directory
du: cannot access './proc/3718/fdinfo/3': No such file or directory
0 ./proc
16K ./lost+found
4,0K ./media
0 ./sys
145M ./boot
15M ./bin
314G .
Disk /dev/sda: 1,8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A9EF77EC-EC51-403D-B07F-1A4832C18250
Device Start End Sectors Size Type
/dev/sda1 40 2048 2009 1004,5K BIOS boot
/dev/sda2 4096 1050623 1046528 511M Linux RAID
/dev/sda3 1050624 42008575 40957952 19,5G Linux RAID
/dev/sda4 42008576 3905972223 3863963648 1,8T Linux RAID
/dev/sda5 3905972224 3907018751 1046528 511M Linux swap
Disk /dev/sdb: 1,8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 4441E7B0-2838-45FE-83DC-8B6DC3BB05B2
Device Start End Sectors Size Type
/dev/sdb1 40 2048 2009 1004,5K BIOS boot
/dev/sdb2 4096 1050623 1046528 511M Linux RAID
/dev/sdb3 1050624 42008575 40957952 19,5G Linux RAID
/dev/sdb4 42008576 3905972223 3863963648 1,8T Linux RAID
/dev/sdb5 3905972224 3907018751 1046528 511M Linux swap
Disk /dev/md2: 511 MiB, 535756800 bytes, 1046400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md4: 1,8 TiB, 1978349322240 bytes, 3863963520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md3: 19,5 GiB, 20970405888 bytes, 40957824 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
/home
seems to be the heaviest but it is located on a 1TO partition..
With this information I see that I have more or less 15GB which are counted as used but which do not appear anywhere.
How could I identify which files are taking up space and delete them to get free disk space on /dev/md3
?
du
. – user535733 Feb 14 '20 at 14:39sudo lsof / | awk '{if(\$7 > 1048576) print \$7/1048576 \"MB\" \" \" \$9 }' | sort -n -u"
. To see "open but deleted" files:sudo lsof / | egrep 'PID|\(deleted\)'"
. Also use the-xdev
option on yourfind
to restrict it to the/dev/md3
volume. – waltinator Feb 14 '20 at 14:39