The host disk du displays differently from df, and the deleted handle file cannot be found

check the data disk of the host. The display of du is different from that of df, with 70 GB less disk space

.

the host is an online single business host, which mainly runs an online business and a mysql database.

check disk usage:
-sharp df-h
Filesystem Size Used Avail Use% Mounted on
/ dev/vda1 40G 13G 25G 34% /
devtmpfs 3.9G 03.9G 0% / dev
tmpfs 3.9G 03.9G 0% / dev/shm
tmpfs 3.9G 584K 3.9G 1% / run
tmpfs 3.9G 03.9G 0% / sys / fs/cgroup
tmpfs 783M 0783M 0% / run/user/1001
/ dev/vdb1 197G 150G 38G 81% / data

View / data used capacity (show 80g sharp cd DF shows 150g, missing 70g):
-sharp cd / data
-sharp du-ah | tail-N1
80g.

View the disk Blocks:
-sharp stat-f.
File: ".
ID: aed6b4e5f76c6ab5 Namelen: 255Type: ext2/ext3
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 51572986 Free: 12165846 Available: 9540323
Inodes: Total: 13107200 Free: 12988274

use du to check the Blocks usage of / data (18419416 Blocks less than stat, and 70G less than stat):
-sharp du-s-- block-size=4096
20987724.

the solution that has been tried:
I can"t find the reason by looking at Aliyun"s document.
https://help.aliyun.com/knowl...

the deleted handle file (lsof | grep delete) cannot be found, which is caused by non-hidden files and non-mount problems. The inodes only takes up 1%. The disk mainly deletes large-capacity files, but not a large number of small files.

according to zabbix monitoring, disk capacity seems to be reduced synchronously when the online business is running (normally, the image of disk capacity should fluctuate in parallel, and the decline is not as sharp as in the figure). 2G capacity will disappear every day, but even if the missing files cannot be found, restarting the business will not free disk space.

the possible solution is to use fsck to repair the disk to see if the occupied Blocks can be released, but I am afraid that this problem will occur next time after repair, so I would like to find out the cause. I would like to ask you if you have encountered this situation, what may be the cause, or what ideas can be provided?


has been solved today. Take advantage of maintenance, remount will return to normal. But there are also troubles that do not know the reason and have the same problem.

Menu