I am wondering if you can tell me what I need to set to allow InnoDB permissions to the Persistent Volume using fstab/cifs. Data is successfully written to the cifs share but when the pod spins up, it errors out because InnoDB doesn't appear to have permissions. The front end pod spins up without any issues. What is the best way to resolve this or is it an issue with the FlexVolume driver?
Mysql Pod Logs
2021-04-23 00:32:34+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.9+maria~focal started.
2021-04-23 00:32:34+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2021-04-23 00:32:34+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.9+maria~focal started.
2021-04-23 0:32:35 0 [Note] mysqld (mysqld 10.5.9-MariaDB-1:10.5.9+maria~focal) starting as process 1 ...
2021-04-23 0:32:35 0 [Note] InnoDB: Uses event mutexes
2021-04-23 0:32:35 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-04-23 0:32:35 0 [Note] InnoDB: Number of pools: 1
2021-04-23 0:32:35 0 [Note] InnoDB: Using ARMv8 crc32 instructions
2021-04-23 0:32:35 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2021-04-23 0:32:35 0 [Note] InnoDB: Using Linux native AIO
2021-04-23 0:32:35 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2021-04-23 0:32:35 0 [Note] InnoDB: Completed initialization of buffer pool
2021-04-23 0:32:35 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-04-23 0:32:35 0 [Warning] InnoDB: Retry attempts for reading partial data failed.
2021-04-23 0:32:35 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2021-04-23 0:32:35 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2021-04-23 0:32:35 0 [ERROR] [FATAL] InnoDB: Tried to read 65536 bytes at offset 38400, but was only able to read 0.Cannot read from file. OS error number 13.
210423 0:32:35 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Server version: 10.5.9-MariaDB-1:10.5.9+maria~focal
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467871 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x0 thread_stack 0x49000
mysqld(my_print_stacktrace+0x30)[0x55587a6a00]
Printing to addr2line failed
mysqld(handle_fatal_signal+0x45c)[0x5558262e2c]
linux-vdso.so.1(__kernel_rt_sigreturn+0x0)[0x7f85f5f7c0]
/lib/aarch64-linux-gnu/libc.so.6(gsignal+0xe0)[0x7f855fa138]
/lib/aarch64-linux-gnu/libc.so.6(abort+0x110)[0x7f855e6d68]
mysqld(+0xcb4fd0)[0x5558644fd0]
mysqld(+0xbf3ba8)[0x5558583ba8]
mysqld(+0xbdbb4c)[0x555856bb4c]
mysqld(+0xbe1f8c)[0x5558571f8c]
mysqld(+0xbe71fc)[0x55585771fc]
mysqld(+0xbe77fc)[0x55585777fc]
mysqld(+0x610654)[0x5557fa0654]
mysqld(+0xb7b92c)[0x555850b92c]
mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x78)[0x5558265ce8]
mysqld(+0x70f83c)[0x555809f83c]
mysqld(_Z11plugin_initPiPPci+0x860)[0x55580a0910]
mysqld(+0x646850)[0x5557fd6850]
mysqld(_Z11mysqld_mainiPPc+0x424)[0x5557fdc14c]
/lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0xe8)[0x7f855e7090]
mysqld(+0x641648)[0x5557fd1648]
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
information that should help you find out what is causing the crash.
Writing a core file...
Working directory at /var/lib/mysql
Resource Limits:
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size unlimited unlimited bytes
Max resident set unlimited unlimited bytes
Max processes unlimited unlimited processes
Max open files 1048576 1048576 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 30215 30215 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
Core pattern: core
I am wondering if you can tell me what I need to set to allow InnoDB permissions to the Persistent Volume using fstab/cifs. Data is successfully written to the cifs share but when the pod spins up, it errors out because InnoDB doesn't appear to have permissions. The front end pod spins up without any issues. What is the best way to resolve this or is it an issue with the FlexVolume driver?
apiVersion: v1 kind: PersistentVolume metadata: name: mariadb-pv spec: capacity: storage: 1Gi volumeMode: Filesystem accessModes:
kind: PersistentVolumeClaim apiVersion: v1 metadata: name: mariadb-pvc namespace: drupal spec: accessModes:
kind: Deployment apiVersion: apps/v1 metadata: name: mariadb namespace: drupal spec: replicas: 1 selector: matchLabels: app: mariadb template: metadata: labels: app: mariadb spec: containers:
kind: Service apiVersion: v1 metadata: name: mariadb namespace: drupal spec: ports:
Mysql Pod Logs 2021-04-23 00:32:34+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.9+maria~focal started. 2021-04-23 00:32:34+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2021-04-23 00:32:34+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.9+maria~focal started. 2021-04-23 0:32:35 0 [Note] mysqld (mysqld 10.5.9-MariaDB-1:10.5.9+maria~focal) starting as process 1 ... 2021-04-23 0:32:35 0 [Note] InnoDB: Uses event mutexes 2021-04-23 0:32:35 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2021-04-23 0:32:35 0 [Note] InnoDB: Number of pools: 1 2021-04-23 0:32:35 0 [Note] InnoDB: Using ARMv8 crc32 instructions 2021-04-23 0:32:35 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts) 2021-04-23 0:32:35 0 [Note] InnoDB: Using Linux native AIO 2021-04-23 0:32:35 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728 2021-04-23 0:32:35 0 [Note] InnoDB: Completed initialization of buffer pool 2021-04-23 0:32:35 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2021-04-23 0:32:35 0 [Warning] InnoDB: Retry attempts for reading partial data failed. 2021-04-23 0:32:35 0 [ERROR] InnoDB: Operating system error number 13 in a file operation. 2021-04-23 0:32:35 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory. 2021-04-23 0:32:35 0 [ERROR] [FATAL] InnoDB: Tried to read 65536 bytes at offset 38400, but was only able to read 0.Cannot read from file. OS error number 13. 210423 0:32:35 [ERROR] mysqld got signal 6 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware.
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail.
Server version: 10.5.9-MariaDB-1:10.5.9+maria~focal key_buffer_size=134217728 read_buffer_size=131072 max_used_connections=0 max_threads=153 thread_count=0 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467871 K bytes of memory Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0x0 thread_stack 0x49000 mysqld(my_print_stacktrace+0x30)[0x55587a6a00] Printing to addr2line failed mysqld(handle_fatal_signal+0x45c)[0x5558262e2c] linux-vdso.so.1(__kernel_rt_sigreturn+0x0)[0x7f85f5f7c0] /lib/aarch64-linux-gnu/libc.so.6(gsignal+0xe0)[0x7f855fa138] /lib/aarch64-linux-gnu/libc.so.6(abort+0x110)[0x7f855e6d68] mysqld(+0xcb4fd0)[0x5558644fd0] mysqld(+0xbf3ba8)[0x5558583ba8] mysqld(+0xbdbb4c)[0x555856bb4c] mysqld(+0xbe1f8c)[0x5558571f8c] mysqld(+0xbe71fc)[0x55585771fc] mysqld(+0xbe77fc)[0x55585777fc] mysqld(+0x610654)[0x5557fa0654] mysqld(+0xb7b92c)[0x555850b92c] mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x78)[0x5558265ce8] mysqld(+0x70f83c)[0x555809f83c] mysqld(_Z11plugin_initPiPPci+0x860)[0x55580a0910] mysqld(+0x646850)[0x5557fd6850] mysqld(_Z11mysqld_mainiPPc+0x424)[0x5557fdc14c] /lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0xe8)[0x7f855e7090] mysqld(+0x641648)[0x5557fd1648] The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains information that should help you find out what is causing the crash. Writing a core file... Working directory at /var/lib/mysql Resource Limits: Limit Soft Limit Hard Limit Units Max cpu time unlimited unlimited seconds Max file size unlimited unlimited bytes Max data size unlimited unlimited bytes Max stack size 8388608 unlimited bytes Max core file size unlimited unlimited bytes Max resident set unlimited unlimited bytes Max processes unlimited unlimited processes Max open files 1048576 1048576 files Max locked memory 65536 65536 bytes Max address space unlimited unlimited bytes Max file locks unlimited unlimited locks Max pending signals 30215 30215 signals Max msgqueue size 819200 819200 bytes Max nice priority 0 0 Max realtime priority 0 0 Max realtime timeout unlimited unlimited us Core pattern: core