指定的数据目录MySQL不可用

k10s72fa  于 2022-12-17  发布在  Mysql
关注(0)|答案(1)|浏览(333)

我使用bitnami/mysql来在k8s中使用mysql,我使用了以下命令:

helm install my-sql bitnami/mysql --set global.storageClass=rook-cephfs --set image.debug=true --set auth.rootPassword="SAra131064" --set auth.username=ali --set auth.password=ali1234 --set volumePermissions.enabled=true

但我得到了错误:

The designated data directory /bitnami/mysql/data/ is unusable

之后,我使用diagnosticMode并在pod中执行此命令(/opt/bitnami/scripts/mysql/entrypoint.sh /opt/bitnami/scripts/mysql/run.sh),并再次获得该错误。在此命令之前,/bitnami/mysql和

total 0
drwxrwxrwx 2 1001 1001  0 Dec 15 14:15 .
drwxr-xr-x 3 root root 19 May 11  2022 ..

执行命令后:

total 0
drwxrwxrwx 3 1001 1001  1 Dec 15 14:18 .
drwxr-xr-x 3 root root 19 May 11  2022 ..
drwxr-xr-x 2 1001 root  1 Dec 15 14:18 data

并且在数据目录中有auto.cnf。
怎么了?我该怎么办?请帮帮我

2022-12-15T14:21:00.199807Z 1 [Warning] [MY-012582] [InnoDB] io_setup() failed with EAGAIN. Will make 5 attempts before giving up.
2022-12-15T14:21:00.199888Z 1 [Warning] [MY-012583] [InnoDB] io_setup() attempt 1.
2022-12-15T14:21:00.700312Z 1 [Warning] [MY-012583] [InnoDB] io_setup() attempt 2.
2022-12-15T14:21:01.200805Z 1 [Warning] [MY-012583] [InnoDB] io_setup() attempt 3.
2022-12-15T14:21:01.701219Z 1 [Warning] [MY-012583] [InnoDB] io_setup() attempt 4.
2022-12-15T14:21:02.201614Z 1 [Warning] [MY-012583] [InnoDB] io_setup() attempt 5.
2022-12-15T14:21:02.702315Z 1 [ERROR] [MY-012584] [InnoDB] io_setup() failed with EAGAIN after 5 attempts.
2022-12-15T14:21:02.702619Z 1 [ERROR] [MY-012954] [InnoDB] Cannot initialize AIO sub-system
2022-12-15T14:21:02.702731Z 1 [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.
2022-12-15T14:21:02.703266Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-12-15T14:21:02.703342Z 0 [ERROR] [MY-013236] [Server] The designated data directory /bitnami/mysql/data/ is unusable. You can remove all files that the server added to it.
2022-12-15T14:21:02.703591Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-12-15T14:21:02.704631Z 0 [System] [MY-010910] [Server] /opt/bitnami/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.29)
vmpqdwk3

vmpqdwk31#

禁用innodb_use_native_aio,因为您的存储不支持它。
将其添加到my_custom.cnf文件,如下所示:

[mysqld]
innodb_use_native_aio=0

相关问题