Проблема возникла внезапно, только вчера все запускаловь и вот после очереднного обновления Fedora 44 проект, в
котором используеться MySQL сервер внутри Docker контейнера с пробросом папки с данными в проект отказался запускаться.
Симптомы#
При попытке поднятия контейнера получаем его вывод:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1.el8 started.
[Note] [Entrypoint]: Switching to dedicated user 'mysql'
[Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1.el8 started.
[Note] [Entrypoint]: Initializing database files
[Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
[System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.29) initializing of server in progress as process 42
[Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
[Warning] [MY-013244] [Server] --collation-server: 'utf8_unicode_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
[System] [MY-013576] [InnoDB] InnoDB initialization has started.
[Warning] [MY-012638] [InnoDB] Retry attempts for writing partial data failed.
[ERROR] [MY-012639] [InnoDB] Write to file ./ibdata1 failed at offset 0, 1048576 bytes should have been written, only 0 were written. Operating system error number 5. 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.
[ERROR] [MY-012640] [InnoDB] Error number 5 means 'Input/output error'
[ERROR] [MY-012267] [InnoDB] Could not set the file size of './ibdata1'. Probably out of disk space
[ERROR] [MY-012929] [InnoDB] InnoDB Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
[ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
[ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
[ERROR] [MY-010119] [Server] Aborting
[System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29) MySQL Community Server - GPL.
|
Еще вчера все было хорошо и база поднималась без проблем. Но да, вчера в конце дня было выполнено обновление:
1
2
3
| ❯ dnf history list | head -2
ID Command line Date and time Action(s) Altered
520 dnf upgrade --refresh 2026-07-07 18:59:31 88
|
Среди прочего там было обновлено как kernel, так и selinux-policy:
1
2
3
4
5
| ❯ dnf history info 520 | grep 'container-selinux\|kernel-0'
Install kernel-0:7.1.3-200.fc44.x86_64 External User updates
Upgrade container-selinux-4:2.250.0-1.fc44.noarch Dependency updates
Remove kernel-0:7.0.12-201.fc44.x86_64 User @System
Replaced container-selinux-4:2.249.0-1.fc44.noarch Dependency @System
|
Наученный горьким опытом обновлений политик SELinux было решено что дело в контексте и метках. Но добавление
ключей в docker-compose.yml файл не решило проблему, даже временное отключение через sudo setenforce 0 не спасло
(даже до этого дошло).
Решение#
Так как это точно не SELinux пошел гуглить такие проблемы, вдруг я не один такой. Действительно не один, только
тут человек был с другой файловой системой. Там
был ZFS, а у меня btrfs.
После прописывания параметров запуска:
1
2
3
4
| db:
container_name: some-db
image: mysql:8.0.29
command: --innodb-use-native-aio=0 --innodb-flush-method=fsync
|
Говорят, что поможет отключение CoW, но завести без флагов с отключенным CoW так и не получилось.