@develr57

Docker Desktop — [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22 Как быть?

Содержимое папки с базами контейнера mysql (/var/lib/mysql) копируется на хост, но возникают ошибки:

PS D:\web\Docker_projects\asos> docker-compose up --build
Creating asos_db_1 ... done                                                                                                                                                                                                       Attaching to asos_db_1
db_1  | 2020-09-04 14:01:45+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.21-1debian10 started.
db_1  | 2020-09-04 14:01:45+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db_1  | 2020-09-04 14:01:45+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.21-1debian10 started.
db_1  | 2020-09-04 14:01:45+00:00 [Note] [Entrypoint]: Initializing database files
db_1  | 2020-09-04T14:01:45.827604Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.21) initializing of server in progress as process 44
db_1  | 2020-09-04T14:01:45.860560Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
db_1  | 2020-09-04T14:01:47.944691Z 1 [Warning] [MY-012579] [InnoDB] fallocate(15, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:01:47.968059Z 1 [Warning] [MY-012579] [InnoDB] fallocate(16, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:01:47.990732Z 1 [Warning] [MY-012579] [InnoDB] fallocate(17, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:01:48.010946Z 1 [Warning] [MY-012579] [InnoDB] fallocate(18, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:01:48.034014Z 1 [Warning] [MY-012579] [InnoDB] fallocate(19, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:01:48.061042Z 1 [Warning] [MY-012579] [InnoDB] fallocate(20, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:01:48.086589Z 1 [Warning] [MY-012579] [InnoDB] fallocate(21, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:01:48.107461Z 1 [Warning] [MY-012579] [InnoDB] fallocate(22, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:01:48.132334Z 1 [Warning] [MY-012579] [InnoDB] fallocate(23, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:01:48.151251Z 1 [Warning] [MY-012579] [InnoDB] fallocate(24, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:01:48.967931Z 1 [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:01:48.971223Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
db_1  | 2020-09-04T14:01:56.832203Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
db_1  | 2020-09-04T14:01:59.087638Z 6 [Warning] [MY-012579] [InnoDB] fallocate(26, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04 14:02:02+00:00 [Note] [Entrypoint]: Database files initialized
db_1  | 2020-09-04 14:02:02+00:00 [Note] [Entrypoint]: Starting temporary server
db_1  | 2020-09-04T14:02:03.051017Z 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
db_1  | 2020-09-04T14:02:03.051088Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.21) starting as process 91
db_1  | 2020-09-04T14:02:03.103949Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
db_1  | 2020-09-04T14:02:04.032769Z 1 [Warning] [MY-012579] [InnoDB] fallocate(17, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:02:04.057097Z 1 [Warning] [MY-012579] [InnoDB] fallocate(18, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:02:04.079685Z 1 [Warning] [MY-012579] [InnoDB] fallocate(19, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:02:04.103877Z 1 [Warning] [MY-012579] [InnoDB] fallocate(20, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:02:04.127134Z 1 [Warning] [MY-012579] [InnoDB] fallocate(21, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:02:04.150608Z 1 [Warning] [MY-012579] [InnoDB] fallocate(22, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:02:04.171794Z 1 [Warning] [MY-012579] [InnoDB] fallocate(23, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:02:04.197013Z 1 [Warning] [MY-012579] [InnoDB] fallocate(24, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:02:04.219329Z 1 [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:02:04.259099Z 1 [Warning] [MY-012579] [InnoDB] fallocate(26, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
db_1  | 2020-09-04T14:02:04.284172Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
db_1  | 2020-09-04T14:02:04.804893Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
db_1  | 2020-09-04T14:02:05.318863Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
db_1  | 2020-09-04T14:02:05.319412Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
db_1  | 2020-09-04T14:02:05.448680Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
db_1  | 2020-09-04T14:02:05.612689Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.21'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server - GPL.


Список томов при этом пуст. Хотя папка контейнера монтируется на хостовую машину. Гуглил, но ничего не нашел. Может кто сталкивался с этим и точно знает как решить?
Примерно пару недель назад этой проблемы не было и всё нормально работало. Но что случилось - не знаю. Был KIS, удалил, остался только защитник виндовс.

PS D:\web\Docker_projects\asos> docker version
Client: Docker Engine - Community
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a66213fe
 Built:             Mon Jun 22 15:43:18 2020
 OS/Arch:           windows/amd64
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a66213fe
  Built:            Mon Jun 22 15:49:27 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683


PS D:\web\Docker_projects\asos> docker-compose version
docker-compose version 1.26.2, build eefe0d31
docker-py version: 4.2.2
CPython version: 3.7.4
OpenSSL version: OpenSSL 1.1.1c  28 May 2019


Вот docker-compose.yml :
version: "3.8"
services:
    db:
        image: mysql:8.0
        restart: unless-stopped
        command:
            --default-authentication-plugin=mysql_native_password
            --performance-schema --secure-file-priv=""
        ports:
            - 4406:3306
        volumes:
            - ./databases:/var/lib/mysql
        environment:
            MYSQL_USER: root
            MYSQL_ROOT_PASSWORD: qwerty
  • Вопрос задан
  • 812 просмотров
Пригласить эксперта
Ответы на вопрос 2
@q2digger
никого не трогаю, починяю примус
ответ действительно легко ищется. Схожая проблема обсуждается например вот тут
https://github.com/farmOS/farmOS/issues/55
Смысл решения: указать опцию mysql innodb_use_native_aio=0 , примерно следующим образом:

Workaround for the MySQL issue:
In docker-compose.yml add the following volume to the db service:

- './.data/conf:/etc/mysql/conf.d'
Then, in the .data folder, add a folder called conf, with a file called local.cnf, with the following content:

[mysqld]
innodb_use_native_aio=0
Ответ написан
@Fubu_By
попробуй удалить смантированную локальную папку с данными, мне помогло
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы