更新后 Docker MariaDB 实例无法启动

更新后 Docker MariaDB 实例无法启动

我的日志中出现以下错误。我只更新了镜像并重新启动。镜像中的最近更改是否会导致这些错误?我的主机有足够的空间,所以我不确定为什么会出现空间不足错误./ibtmp1

从 mariadb 10.2.9 更新到 10.2.10 时出现此问题。

db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Uses event mutexes
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Compressed tables use zlib 1.2.8
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Using Linux native AIO
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Number of pools: 1
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Using SSE2 crc32 instructions
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Completed initialization of buffer pool
db_1           | 2017-11-07 21:11:32 140191215482624 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Highest supported file format is Barracuda.
db_1           | 2017-11-07 21:11:33 140191958161280 [Note] InnoDB: 128 out of 128 rollback segments are active.
db_1           | 2017-11-07 21:11:33 140191958161280 [Note] InnoDB: Creating shared tablespace for temporary tables
db_1           | 2017-11-07 21:11:33 140191958161280 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
db_1           | 2017-11-07 21:11:33 140191958161280 [ERROR] InnoDB: preallocating 12582912 bytes for file ./ibtmp1 failed with error 22
db_1           | 2017-11-07 21:11:33 140191958161280 [ERROR] InnoDB: Could not set the file size of './ibtmp1'. Probably out of disk space
db_1           | 2017-11-07 21:11:33 140191958161280 [ERROR] InnoDB: Unable to create the shared innodb_temporary
db_1           | 2017-11-07 21:11:33 140191958161280 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
db_1           | 2017-11-07 21:11:38 140191958161280 [Note] InnoDB: Starting shutdown...
db_1           | 2017-11-07 21:11:38 140191958161280 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
db_1           | 2017-11-07 21:11:38 140191958161280 [ERROR] Plugin 'InnoDB' init function returned error.
db_1           | 2017-11-07 21:11:38 140191958161280 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db_1           | 2017-11-07 21:11:38 140191958161280 [Note] Plugin 'FEEDBACK' is disabled.
db_1           | 2017-11-07 21:11:38 140191958161280 [ERROR] Unknown/unsupported storage engine: InnoDB
db_1           | 2017-11-07 21:11:38 140191958161280 [ERROR] Aborting

我也在这里问了这个问题:https://forums.docker.com/t/mariadb-not-starting-after-update/40978

答案1

我在 Windows 版 docker 上也遇到过类似问题。容器突然因空间不足错误而无法启动。

一开始我以为我主机系统上有足够的空间,但实际上虚拟硬盘(由docker引擎创建)在后台使用,空间不足。

问题通过以下方式解决:

docker-compose down

docker system prune

docker-compose up

相关内容