1

I was copying a large VM disk file to a separate larger separate disk array to work on it and during a benchmark I did previously before I started the copy job I didn't realize that the benchmark had unmounted the array. So the file was partially copied to somewhere within the / filesystem and I cannot find it anywhere. I've looked with some commands like find -type f -exec du -Sh {} + | sort -rh | head -n 5 to the find the largest files. Any suggestions? Below are the file system outputs.

df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   50G   50G  122M 100% /
devtmpfs                  16G     0   16G   0% /dev
tmpfs                     16G     0   16G   0% /dev/shm
tmpfs                     16G   11M   16G   1% /run
tmpfs                     16G     0   16G   0% /sys/fs/cgroup
/dev/sda2               1014M  216M  799M  22% /boot
/dev/sda1                200M   12M  189M   6% /boot/efi
/dev/mapper/centos-home  864G  301G  563G  35% /home
tmpfs                    3.1G   32K  3.1G   1% /run/user/1000
/dev/sdb1                1.9T  132G  1.7T   8% /disk1


du -sh *
0       bin
194M    boot
0       dev
46G     disk1
41M     etc
301G    home
0       lib
0       lib64
0       media
0       mnt
720K    opt
du: cannot access ‘proc/39152/task/39152/fd/3’: No such file or directory
du: cannot access ‘proc/39152/task/39152/fdinfo/3’: No such file ordirectory
du: cannot access ‘proc/39152/fd/3’: No such file or directory
du: cannot access ‘proc/39152/fdinfo/3’: No such file or directory
0       proc
4.9M    root
du: cannot access ‘run/user/1000/gvfs’: Permission denied
11M     run
0       sbin
0       srv
0       sys
20M     tmp
3.5G    usr
673M    var

1 Answers1

2

You have 46G on /disk1, so unless that is another partition, that seems the place to look.

When I want to know where most of the space is used,I use this command:

du -Sx / | sort -n

If the used space isn't visible to du, then it belongs to a deleted file that is still open in some process. You can use lsof to look for open files, especially for deleted files.

lsof -nP | grep deleted
RalfFriedl
  • 3,258