- 首先重启mysql服务
○ → systemctl restart mysqld Error: Too many open files Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
- 看journalctl -xe信息,没有有用信息
- 查看mysql日志 tail -f /var/log/mysqld.log
○ → tail -f /var/log/mysqld.log 2020-11-23T11:13:15.169445+08:00 0 [Note] Binlog end 2020-11-23T11:13:15.169515+08:00 0 [Note] Shutting down plugin 'CSV' 2020-11-23T11:13:15.169789+08:00 0 [Note] /usr/sbin/mysqld: Shutdown complete 2020-11-23T03:13:16.472021Z 0 [Warning] Changed limits: max_open_files: 5000 (requested 5010) 2020-11-23T03:13:16.472244Z 0 [Warning] Changed limits: table_open_cache: 1995 (requested 2000) 2020-11-23T11:13:16.639950+08:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2020-11-23T11:13:16.639980+08:00 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set. 2020-11-23T11:13:16.641065+08:00 0 [Warning] Insecure configuration for --secure-file-priv: Location is accessible to all OS users. Consider choosing a different directory. 2020-11-23T11:13:16.641116+08:00 0 [Note] /usr/sbin/mysqld (mysqld 5.7.29) starting as process 16391 ... 2020-11-23T11:13:16.644495+08:00 0 [Note] InnoDB: PUNCH HOLE support available 2020-11-23T11:13:16.644527+08:00 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2020-11-23T11:13:16.644533+08:00 0 [Note] InnoDB: Uses event mutexes 2020-11-23T11:13:16.644540+08:00 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2020-11-23T11:13:16.644544+08:00 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2020-11-23T11:13:16.644548+08:00 0 [Note] InnoDB: Using Linux native AIO 2020-11-23T11:13:16.645149+08:00 0 [Note] InnoDB: Number of pools: 1 2020-11-23T11:13:16.645264+08:00 0 [Note] InnoDB: Using CPU crc32 instructions 2020-11-23T11:13:16.647440+08:00 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2020-11-23T11:13:16.655751+08:00 0 [Note] InnoDB: Completed initialization of buffer pool 2020-11-23T11:13:16.658093+08:00 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2020-11-23T11:13:16.670302+08:00 0 [Note] InnoDB: Highest supported file format is Barracuda. 2020-11-23T11:13:16.682246+08:00 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2020-11-23T11:13:16.683051+08:00 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2020-11-23T11:13:16.683878+08:00 0 [Warning] InnoDB: Retry attempts for writing partial data failed. 2020-11-23T11:13:16.683914+08:00 0 [ERROR] InnoDB: Write to file ./ibtmp1failed at offset 0, 1048576 bytes should have been written, only 0 were written. Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded. 2020-11-23T11:13:16.683936+08:00 0 [ERROR] InnoDB: Error number 28 means 'No space left on device' 2020-11-23T11:13:16.683942+08:00 0 [Note] InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html 2020-11-23T11:13:16.683948+08:00 0 [ERROR] InnoDB: Could not set the file size of './ibtmp1'. Probably out of disk space 2020-11-23T11:13:16.683953+08:00 0 [ERROR] InnoDB: Unable to create the shared innodb_temporary 2020-11-23T11:13:16.683958+08:00 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2020-11-23T11:13:17.284658+08:00 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" 2020-11-23T11:13:17.284698+08:00 0 [ERROR] Plugin 'InnoDB' init function returned error. 2020-11-23T11:13:17.284708+08:00 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
- 逐步google错误日志
- 找到
[ERROR] InnoDB: Error number 28 means 'No space left on device'
,是磁盘空间不足 - 相关参考连接: https://blog.csdn.net/jeffiny/article/details/81567171
- 找到
- 查看磁盘信息, 磁盘已满
○ → df -lh Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 76G 76G 20K 100% / devtmpfs 7.8G 0 7.8G 0% /dev tmpfs 7.8G 0 7.8G 0% /dev/shm tmpfs 7.8G 9.0M 7.8G 1% /run tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup /dev/sda2 4.7G 142M 4.6G 3% /boot tmpfs 1.6G 0 1.6G 0% /run/user/0
- 排查相关路径文件大小命令
○ → du -h -d 1 1.4G ./py2 58G ./py37 40M ./poc 59G .
- 增加磁盘分配解决磁盘空间不足问题
mysql 无法启动排查,原因是磁盘不足
最新推荐文章于 2022-08-12 14:49:44 发布