mysql installation in lxc container failed

I'm getting the same problem installing mysql on any container with the 20.04 template ONLY on a zfs pool. If I install it on my other proxmox machine with ext4 it works fine.

I can also confirm I get the exact same issue with 20.04, 21.04, and 22.04.


2022-06-08T15:33:35.504101Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29-0ubuntu0.20.04.3) starting as process 130 2022-06-08T15:33:35.549498Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2022-06-08T15:33:35.595467Z 1 [ERROR] [MY-012963] [InnoDB] Log file ./ib_logfile1 is of different size 0 bytes than other log files 18874368 bytes! 2022-06-08T15:33:35.595537Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2022-06-08T15:33:36.075157Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2022-06-08T15:33:36.075414Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2022-06-08T15:33:36.075550Z 0 [ERROR] [MY-010119] [Server] Aborting 2022-06-08T15:33:36.076209Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29-0ubuntu0.20.04.3) (Ubuntu). 2022-06-08T15:33:36.782471Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29-0ubuntu0.20.04.3) starting as process 152 2022-06-08T15:33:36.800321Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2022-06-08T15:33:36.842406Z 1 [ERROR] [MY-012963] [InnoDB] Log file ./ib_logfile1 is of different size 0 bytes than other log files 18874368 bytes! 2022-06-08T15:33:36.842447Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2022-06-08T15:33:37.327795Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2022-06-08T15:33:37.328061Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2022-06-08T15:33:37.328195Z 0 [ERROR] [MY-010119] [Server] Aborting 2022-06-08T15:33:37.328815Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29-0ubuntu0.20.04.3) (Ubuntu). 2022-06-08T15:33:38.043237Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29-0ubuntu0.20.04.3) starting as process 338 2022-06-08T15:33:38.061212Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2022-06-08T15:33:38.094734Z 1 [ERROR] [MY-012963] [InnoDB] Log file ./ib_logfile1 is of different size 0 bytes than other log files 18874368 bytes! 2022-06-08T15:33:38.094776Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2022-06-08T15:33:38.580373Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2022-06-08T15:33:38.580595Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2022-06-08T15:33:38.580722Z 0 [ERROR] [MY-010119] [Server] Aborting
 
Last edited:
I'm getting the same problem installing mysql on any container with the 20.04 template ONLY on a zfs pool. If I install it on my other proxmox machine with ext4 it works fine.

I can also confirm I get the exact same issue with 20.04, 21.04, and 22.04.


2022-06-08T15:33:35.504101Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29-0ubuntu0.20.04.3) starting as process 130 2022-06-08T15:33:35.549498Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2022-06-08T15:33:35.595467Z 1 [ERROR] [MY-012963] [InnoDB] Log file ./ib_logfile1 is of different size 0 bytes than other log files 18874368 bytes! 2022-06-08T15:33:35.595537Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2022-06-08T15:33:36.075157Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2022-06-08T15:33:36.075414Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2022-06-08T15:33:36.075550Z 0 [ERROR] [MY-010119] [Server] Aborting 2022-06-08T15:33:36.076209Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29-0ubuntu0.20.04.3) (Ubuntu). 2022-06-08T15:33:36.782471Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29-0ubuntu0.20.04.3) starting as process 152 2022-06-08T15:33:36.800321Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2022-06-08T15:33:36.842406Z 1 [ERROR] [MY-012963] [InnoDB] Log file ./ib_logfile1 is of different size 0 bytes than other log files 18874368 bytes! 2022-06-08T15:33:36.842447Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2022-06-08T15:33:37.327795Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2022-06-08T15:33:37.328061Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2022-06-08T15:33:37.328195Z 0 [ERROR] [MY-010119] [Server] Aborting 2022-06-08T15:33:37.328815Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29-0ubuntu0.20.04.3) (Ubuntu). 2022-06-08T15:33:38.043237Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29-0ubuntu0.20.04.3) starting as process 338 2022-06-08T15:33:38.061212Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2022-06-08T15:33:38.094734Z 1 [ERROR] [MY-012963] [InnoDB] Log file ./ib_logfile1 is of different size 0 bytes than other log files 18874368 bytes! 2022-06-08T15:33:38.094776Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2022-06-08T15:33:38.580373Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2022-06-08T15:33:38.580595Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2022-06-08T15:33:38.580722Z 0 [ERROR] [MY-010119] [Server] Aborting
+1 for me also. Getting the exact same issue running a LXC and ZFS. Tried with both Ubuntu 2020 LTS and 2022 LTS.

I wasted my entire afternoon on this issue before finding this forum post...
 
Code:
root@pve:~# uname -a
Linux pve 5.15.35-2-pve #1 SMP PVE 5.15.35-5 (Wed, 08 Jun 2022 15:02:51 +0200) x86_64 GNU/Linux
root@pve:~# pct start 999
root@pve:~# pct enter 999
root@CT999:~# apt update
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
root@CT999:~# apt upgrade
Reading package lists... Done

Progress: [ 20%] [##################################################........................................................................................................................................................................................................]
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up mysql-server-8.0 (8.0.29-0ubuntu0.22.04.2) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
2022-06-10T16:38:59.789103Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
apparmor_parser: Unable to replace "/usr/sbin/mysqld".  Permission denied; attempted to load a profile while confined?
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
     Loaded: loaded (;;file://CT999/lib/systemd/system/mysql.service/lib/systemd/system/mysql.service;;; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Fri 2022-06-10 16:39:00 UTC; 5ms ago
    Process: 783 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 791 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
   Main PID: 791 (code=exited, status=1/FAILURE)
     Status: "Server startup in progress"
      Error: 22 (Invalid argument)
        CPU: 273ms
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

We've had multiple updates to the kernel-packages since this issue was recognized and this issue is still not resolved. When can we expect a fix?
 
Last edited:
uname -a
Linux pve 5.15.35-3-pve #1 SMP PVE 5.15.35-6 (Fri, 17 Jun 2022 13:42:35 +0200) x86_64 GNU/Linux

This issue is still not fixed. We were considering going enterprise (large company), but after witnessing this issue being present for over 2 months with little to no indication of when it will be fixed we have put our migration plans on hold. We are now considering other options.
 
Last edited:
ZFS 2.1.5 should be out now - or in a bit - this should contain the fix - we'll try to pull it in asap - and it should be available with one of the next kernel releases in your repository.

Sorry: I somehow mixed up the thread - with this one:
https://forum.proxmox.com/threads/m...buntu-22-04-lxc-container.109541/#post-474634

where a mitigation was posted (taken over from the openzfs report for the issue):
https://forum.proxmox.com/threads/m...ubuntu-22-04-lxc-container.109541/post-474627

I hope this helps!
 
  • Like
Reactions: Tim Hörnle - UJAM
Any updates on this? We have 8TB of NVME that we cannot use for any sql containers. We love proxmox and have been waiting it out for what seems to be a quick fix per the thread.

Thanks for all your work!
 
kernel: pve-kernel-5.15.39-2-pve , which is available on pvetest comes with ZFS 2.1.5

would be grateful for feedback if it indeed fixes the issue
 
  • Like
Reactions: Koersten
kernel: pve-kernel-5.15.39-2-pve , which is available on pvetest comes with ZFS 2.1.5

would be grateful for feedback if it indeed fixes the issue
Hi there!
I read along the thread quietly as I had the same problem (every drive in my system is a ZFS mirror including the drives the containers are installed on). I just registered here to make this reply :)

I could make my container work by using a cron script on startup that truncated the logs and then reloaded mysql. I used to fail loading on startup of the container.

After the kernel update I commented out the workaround script and it still worked. So the issue seems to be fixed.
I have not tried to install a new container with mysql yet. Do not have the time at the moment.

Thanks for (seemingly) fixing this annoying issue!
 
I can't confirm. I upgraded the kernel on the PVE, restarted the PVE an with it all containers.

uname -a
Linux mysql 5.15.39-2-pve #1 SMP PVE 5.15.39-2 (Wed, 20 Jul 2022 17:22:19 +0200) x86_64 x86_64 x86_64 GNU/Linux

ZFS is 2.1.5 for me mysql does not startup :-( im somewhat confused and have no idea how to get further.

The issues started with an apt update && apt upgrade on the container (Ubuntu 22.04). Bevorehand everything worked fine (I think the container hasn't been restarted for 2 month or so).
 
After I upgraded I had to completely purge mysql as well as all /var/lib/mysql* dir. Once I did a clean install everything worked.

If you are running a production environment, make backups, purge, install, restore.

Hopefully this helps you.
 
Last edited:
  • Like
Reactions: hsulli

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!