Today the database suddenly prompted:
Caused by: java.sql.SQLException: The table 'tt_vehicle_device_login' is full
The online query found that it was caused by insufficient database space.
linux check hard disk space
[root@T-mysql data]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-root 46G 14G 32G 30% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 441M 3.4G 12% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 1022M 143M 880M 14% /boot
tmpfs 783M 0 783M 0% /run/user/0
It shows that 46G is used in the root directory, and 14G is used. What exactly occupies the 14G space, let's find out below.
Switch to the root directory/ and execute the command du -sh *
[root@T-mysql /]# du -sh *
0bin
110Mboot
0dev
34Metc
0home
0lib
0lib64
0media
0mnt
1.1Gopt
du: cannot access ‘proc/22320/task/22320/fd/4’: No such file or directory
du: cannot access ‘proc/22320/task/22320/fdinfo/4’: No such file or directory
du: cannot access ‘proc/22320/fd/4’: No such file or directory
du: cannot access ‘proc/22320/fdinfo/4’: No such file or directory
du: cannot access ‘proc/22371’: No such file or directory
0proc
2.2Groot
441Mrun
0sbin
0srv
0sys
484Ktmp
7.7Gusr
2.3Gvar
It was found that the largest folder usr directory accounted for 7.7G,
Continue to switch to the usr directory, execute du -sh *, and follow this routine to find it step by step.