Project

General

Profile

Bug #9046

Mariadb 10.2.15-r0

Added by Anonymous 12 months ago. Updated 4 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Package update
Target version:
Start date:
06/29/2018
Due date:
% Done:

0%

Estimated time:
Affected versions:
Security IDs:

Description

Mariadb now is using native Linux fallocate for creating the ibdata file. It fails in alpine edge and alpine 3.8 running as containers.

2018-06-29 19:11:12 140013615233928 [ERROR] InnoDB: preallocating 12582912 bytes for file ./ibdata1 failed with error 95
2018-06-29 19:11:12 140013615233928 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space
2018-06-29 19:11:12 140013615233928 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
2018-06-29 19:11:13 140013615233928 [ERROR] Plugin 'InnoDB' init function returned error.
2018-06-29 19:11:13 140013615233928 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-06-29 19:11:13 140013615233928 [ERROR] Unknown/unsupported storage engine: InnoDB
2018-06-29 19:11:13 140013615233928 [ERROR] Aborting

History

#1 Updated by TBK . 12 months ago

Try to make a subdirectory in /var/tmp called mariadb, change the ownership to the mariadb user and then edit your my.cnf file.

Change:
#tmpdir = /tmp/

to:

tmpdir = /var/tmp/mariadb

To make the changes take effect restart mariadb.

#2 Updated by Kam Zar 12 months ago

The workaround mentioned by TBK unfortunately hasn't work. Still issue while creating the ibdata.
It can't assign a size. Created file is 0 kb.
Alpine 3.8/edge as LXD container. No matter privileged or non-privileged.

#3 Updated by Natanael Copa 11 months ago

what kernel are you using? What is th output of uname -a?

#4 Updated by Natanael Copa 11 months ago

Also, how much diskspace do you have free? What storage backend are you using and what filesystem?

#5 Updated by Kam Zar 11 months ago

The sma eenvironment has stopped working sinc upgrade mariadb 10.1.x 10.2.x
Container is on zfs file system. 1 GB space available:

~ # df -h
Filesystem Size Used Available Use% Mounted on
zp1/admin/containers/Sql
1.1G 98.1M 1010.3M 9% /
none 492.0K 0 492.0K 0% /dev
udev 31.4G 0 31.4G 0% /dev/full
udev 31.4G 0 31.4G 0% /dev/null
udev 31.4G 0 31.4G 0% /dev/random
udev 31.4G 0 31.4G 0% /dev/tty
udev 31.4G 0 31.4G 0% /dev/urandom
udev 31.4G 0 31.4G 0% /dev/zero
udev 31.4G 0 31.4G 0% /dev/fuse
udev 31.4G 0 31.4G 0% /dev/net/tun
tmpfs 100.0K 0 100.0K 0% /dev/lxd
zp1/st1 10.0G 3.9G 6.1G 39% /st1
tmpfs 100.0K 0 100.0K 0% /dev/.lxd-mounts
tmpfs 6.3G 84.0K 6.3G 0% /run

~ # uname -a
Linux Sql 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 Linux

I got it now running by uninstalling mariadb and mariadb client and downgrading to below <10.2

~ # cat /etc/apk/world
alpine-base
bash
dropbear
fcgi
logrotate
mariadb<10.1.99
mariadb-client<10.1.99
mariadb-common<10.1.99
openssh
sudo
zip

#6 Updated by Sander Klein 11 months ago

This is just a me too reply. I am also hitting this but. Alpine 3.8 on Debian Stretch with LXC 2.0.7.

#7 Updated by Peter Nyilas 11 months ago

It looks, it has problem with zfs filesystem.
It doesn't matter, is it a volume or the /var/lib/docker mounted as zfs.
It works with ext4.

#8 Updated by Natanael Copa 10 months ago

this seems to be a problem upstream: https://jira.mariadb.org/browse/MDEV-16015

#9 Updated by Kam Zar 10 months ago

@ Natanael Copa
Such a relief! So, I am not the only one affected!
Kids at Mariadb are playing around and experimenting!
I really would consider switching back to Mysql and not stick at Mariadb just because of some capitalism fear and Oracle... Sentiment.

#10 Updated by Kam Zar 10 months ago

I love the Alpine Linux Project and the great work of Mr. Natanael and Team for creating a minimalist, yet powerful Linux, as alternative to the Mainstream, AWS, Ubuntu ... blown up and wasteful style.
I am aware that the Choice of Mariadb vs. Mysql covers with the Philosophy of Alpine. Yet not as stable as Mysql.

#11 Updated by Natanael Copa 10 months ago

It seems like a workaround is to use --innodb-flush-method=fsync

#12 Updated by Kam Zar 10 months ago

Just wanted give it a try and realized, a lot has changed!
It seems Edge and 3.8 are now having different approach in config files organization.
3.8 still the classic /etc/mysql/my.cnf whilst edge is reating a /etc/my.cnf and including /etc/my.cnf.d/*
Anyway, have added this to .cnf file:

[mysqld]
innodb_doublewrite = false
innodb_use_native_aio = false
innodb_flush_method=fsync

This seems to be a special zfs config.
It might affect the behavior of mariadb during operation, yet doesnt help over the first initializing of Server / Innodb, punching a hole of XX MB as /usr/lib/mysql/ibdata1 on zfs file system.

~ # /etc/init.d/mariadb setup * Creating a new MySQL database ...
2018-09-10 16:08:19 140592631462792 [ERROR] InnoDB: preallocating 12582912 bytes for file ./ibdata1 failed with error 95
2018-09-10 16:08:19 140592631462792 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space
2018-09-10 16:08:19 140592631462792 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
2018-09-10 16:08:20 140592631462792 [ERROR] Plugin 'InnoDB' init function returned error.
2018-09-10 16:08:20 140592631462792 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-09-10 16:08:20 140592631462792 [ERROR] Unknown/unsupported storage engine: InnoDB
2018-09-10 16:08:20 140592631462792 [ERROR] Aborting

~ # /usr/bin/mysql_install_db --defaults-file=/etc/mysql/my.cnf
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
2018-09-10 16:10:41 139703881591688 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
2018-09-10 16:10:41 139703881591688 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-09-10 16:10:41 139703881591688 [ERROR] Plugin 'InnoDB' init function returned error.
2018-09-10 16:10:41 139703881591688 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-09-10 16:10:41 139703881591688 [ERROR] Unknown/unsupported storage engine: InnoDB
2018-09-10 16:10:41 139703881591688 [ERROR] Aborting

#13 Updated by Natanael Copa 10 months ago

  • Target version changed from 3.8.1 to 3.8.2

#14 Updated by Reginald Sweet 9 months ago

I am also running into this issue within an LXD container kept on a ZFS filesystem. Let me know if there is anything I can do to help when it comes time to test a possible fix.

#15 Updated by Johan Bergström 8 months ago

Natanael Copa wrote:

It seems like a workaround is to use --innodb-flush-method=fsync

I've tried a few permutations of what tips I found on the internets without any results. Here's the options I've tried: https://github.com/jbergstroem/mariadb-alpine/issues/1

#16 Updated by Natanael Copa 6 months ago

  • Target version changed from 3.8.2 to 3.8.3

#17 Updated by Kam Zar 6 months ago

#Natanael
thanks for for updates and for still being on it.
Latest suggestion hasn't work. Despite disabling INNODB no matter from command line or in my.cnf doesnt bring any change.
And this is good news, because who wants Mysql without INNODB anyway?
Till then, I recommend, not updating the old mariadb apk's in v3.7 as this was the only one which had worked!
Mariadb <10.2.x still relied on Mysql 5.7, works!
Mariadb =>10.2.x split roads with Mysql and here we are!

#18 Updated by Kam Zar 6 months ago

Set back to Mariadb <10.2.x :

echo "http://dl-5.alpinelinux.org/alpine/v3.7/main" >> /etc/apk/repositories
echo -e "mariadb<10.1.99\nmariadb-client<10.1.99\nmariadb-common<10.1.99" >> /etc/apk/work
apk update && apk upgrade

#19 Updated by Kam Zar 6 months ago

had a mistake above, supposed to be /etc/apk/world and not /etc/apk/work!

Set back to Mariadb <10.2.x :

echo "http://dl-5.alpinelinux.org/alpine/v3.7/main" >> /etc/apk/repositories
echo -e "mariadb<10.1.99\nmariadb-client<10.1.99\nmariadb-common<10.1.99" >> /etc/apk/world
apk update && apk upgrade

#20 Updated by Natanael Copa 4 months ago

  • Target version changed from 3.8.3 to 3.8.4

#21 Updated by Natanael Copa 4 months ago

  • Target version changed from 3.8.4 to 3.8.5

Also available in: Atom PDF