Bug #102384 InnoDB initialization failed on EXT3 filesystem
Submitted: 27 Jan 2021 7:15 Modified: 27 Jan 2021 8:01
Reporter: Zheng Lai (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0.22 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[27 Jan 2021 7:15] Zheng Lai
Description:
WL#13782 in MySQL 8.0.22 introduced a bug which causing InnoDB initialization
failed on EXT3 filesystem.

Just like https://bugs.mysql.com/bug.php?id=74167, EXT3 filesystem doesn't
support posix_fallocate, and it will return EINVAL(https://man7.org/linux/man-pages/man3/posix_fallocate.3.html).

How to repeat:
Initialize mysql server on EXT3 filesystem.
And it'll report error like:

2021-01-22T17:58:00.416838+08:00 1 [ERROR] [MY-012128] [InnoDB] posix_fallocate(): Failed to preallocate data for file ./#innodb_temp/temp_1.ibt, desired size 81920 Operating system error number 22. Check that the disk is not full or a disk quota exceeded. Make sure the file system supports this function. Refer to your operating system documentation for operating system error code information.
2021-01-22T17:58:00.417461+08:00 1 [ERROR] [MY-012929] [InnoDB] InnoDB Database creation was aborted with error Out of disk space. You may need to delete the ibdata1 file before trying to start up again.
2021-01-22T17:58:00.904512+08:00 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2021-01-22T17:58:00.905167+08:00 0 [ERROR] [MY-013236] [Server] The designated data directory /data1/mysql_root/data/20241/ is unusable. You can remove all files that the server added to it.
2021-01-22T17:58:00.906212+08:00 0 [ERROR] [MY-010119] [Server] Aborting
2021-01-22T17:58:00.906908+08:00 0 [System] [MY-010910] 

Suggested fix:

The fix can be ignore this error for temp table and take plan B which will call os_file_set_size.
[27 Jan 2021 7:25] Zheng Lai
patch for fixing the initialization failure on ext3

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: fix_init_fail_on_ext3.patch (application/octet-stream, text), 4.89 KiB.

[27 Jan 2021 8:01] MySQL Verification Team
Hello Zheng Lai,

Thank you for the report and contribution.

regards,
Umesh