Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot mount mariadb volume #51

Open
stefanpl opened this issue Sep 14, 2019 · 3 comments
Open

Cannot mount mariadb volume #51

stefanpl opened this issue Sep 14, 2019 · 3 comments

Comments

@stefanpl
Copy link

Hi,

I'm trying to create a bind mount to persist mariadb data on my host. Having this in my mariadb service definition in docker-compose.yml:

    volumes:
     - ./db-volume-data:/var/lib/mysql

I created the folder db-volume-data in the root directory. mariadb containers fails with the following error:

Initializing database
2019-09-14  9:54:56 0 [Warning] InnoDB: Failed to set O_DIRECT on file./ibdata1; OPEN: Invalid argument, continuing anyway. O_DIRECT is known to result in 'Invalid argument' on Linux on tmpfs, see MySQL Bug#26662.
2019-09-14  9:54:56 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 640 pages, max 655360 (relevant if non-zero) pages!
2019-09-14  9:54:56 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-09-14  9:54:57 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-09-14  9:54:57 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-09-14  9:54:57 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2019-09-14  9:54:57 0 [ERROR] Aborting
Installation of system tables failed!  Examine the logs in
/var/lib/mysql/ for more information.
The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
    shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
You can also try to start the mysqld daemon with:
    shell> /usr/bin/mysqld --skip-grant-tables --general-log &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
    shell> /usr/bin/mysql -u root mysql
    mysql> show tables;
Try 'mysqld --help' if you have problems with paths.  Using
--general-log gives you a log in /var/lib/mysql/ that may be helpful.
The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss
Please check all of the above before submitting a bug report
at http://mariadb.org/jira

Happens for both vanilla installs and mounted wordpress. I'm on Linux Mint 18.3, which is based on Ubuntu 16.04. Even tried to slap a 777 on the db-volume-data folder, did not help.

Any insights here would be greatly appreciated, as this problem renders your (very promising-looking!) product useless. I don't want to lose my data every time I docker-compose down

Thanks a lot in advance!

@csandanov
Copy link
Member

csandanov commented Sep 16, 2019

Have you tried googling? Looks like docker-library/mysql#345 (comment)

@stefanpl
Copy link
Author

stefanpl commented Sep 22, 2019

@csandanov yes, I've tried googling the issue. Frankly I don't have time on my hands to post a github issue every time something's not running – I'm on Linux, after all … ;-)
The issue you linked is someone on Mac OS, where apparently his VM size is limited. Got nothing to do with my setup, tried his suggestion anyway, did not help, same error still.

Thanks for digging it out anyway! Any other suggestions?

@csandanov
Copy link
Member

Your log output looks like a known issue with mariadb bind mounts described in the readme of https://github.com/wodby/mariadb. But this is a windows/macos issue. Since you're on linux perhaps there's something specific about your host disk mount where you bind mounts located. Try searching under https://github.com/wodby/docker4drupal/issues (I remember seeing something similar) or maybe MariaDB/mariadb-docker#95 has a working solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants