Search code examples
dockermariadbinnodbhyper-vwsl-2

InnoDB: preallocating 147456 bytes for file XXX.ibd failed with error 2


I'm using official MariadDB 10.7 docker image, Windows 10. Had this error started today that kept repeating, tried everything:

- mysqlcheck -Ar
- delete docker image with all the data
- chkdsk -F
- dump and restore of table
- change MariaDB version
- different PC configs (nvme -> SSD)

Solution

  • After long long reading of every related bug on MariaDB bug trackers I did one change in Docker environment:

    - disable WSL2, switch to Hyper-V
    

    And voila, started working.

    Now, interesting part is, coworker had same problem, but had WSL2 already disabled, and his problem was fixed with ENABLING WSL2.

    So I guess, while changing operation between WSL2 and Hyper-V, something is done, that gets corrupted while using image and it reset with this switch.

    ATM I don't have time to switch back to WSL2 to confirm my assumption. When I find some time, I'll update this post.

    UPDATE: couldn't find the solution with container's config, so I tried older versions of MariaDB docker container and it started working on version 10.3.9. For now, I'm going to be using this version until I find some more time to go to MariaDB's Jira and report error there.