[GH-ISSUE #478] mergerfs bind mount does not appear to work #311

Closed
opened 2026-03-15 13:49:18 +03:00 by kerem · 8 comments
Owner

Originally created by @trajano on GitHub (Apr 4, 2025).
Original GitHub issue: https://github.com/axllent/mailpit/issues/478

Similar to https://github.com/axllent/mailpit/issues/271 I used to use a local volume, but I wanted to offload some of the I/O to an external HDD from my Pi. But I get

time="2025/04/04 19:00:54" level=error msg="[db] disk I/O error (5386)"
time="2025/04/04 19:00:54" level=info msg="[db] reconnecting in 5 seconds (attempt 1/5)"

I am presuming there's something with mergefs holding the bind mount since it's not really a raw file system but a virtualized file system that maps multiple drives as one.

Originally created by @trajano on GitHub (Apr 4, 2025). Original GitHub issue: https://github.com/axllent/mailpit/issues/478 Similar to https://github.com/axllent/mailpit/issues/271 I used to use a local volume, but I wanted to offload some of the I/O to an external HDD from my Pi. But I get time="2025/04/04 19:00:54" level=error msg="[db] disk I/O error (5386)" time="2025/04/04 19:00:54" level=info msg="[db] reconnecting in 5 seconds (attempt 1/5)" I am presuming there's something with mergefs holding the bind mount since it's not really a raw file system but a virtualized file system that maps multiple drives as one.
kerem closed this issue 2026-03-15 13:49:23 +03:00
Author
Owner

@axllent commented on GitHub (Apr 4, 2025):

Hi. I'm not sure to be honest, but it appears to be the case, and I'm not sure there is anything I can do. Disk i/o error seems to imply a larger issue. It could be that the folder permissions on your external HDD don't allow writing. Are you running Mailpit as a non-root user, and if so, does that user have read/write permissions there? Assuming permissions is not the issue, does dmesg report hardware issues?

<!-- gh-comment-id:2779591860 --> @axllent commented on GitHub (Apr 4, 2025): Hi. I'm not sure to be honest, but it appears to be the case, and I'm not sure there is anything I can do. Disk i/o error seems to imply a larger issue. It could be that the folder permissions on your external HDD don't allow writing. Are you running Mailpit as a non-root user, and if so, does that user have read/write permissions there? Assuming permissions is not the issue, does `dmesg` report hardware issues?
Author
Owner

@trajano commented on GitHub (Apr 4, 2025):

yup I am able to read and write files the files are actually created. Similar situation to that of like #271

<!-- gh-comment-id:2779594756 --> @trajano commented on GitHub (Apr 4, 2025): yup I am able to read and write files the files are actually created. Similar situation to that of like #271
Author
Owner

@axllent commented on GitHub (Apr 4, 2025):

That issue had something to do with Docker and/or Docker's mounted volume, so not a Mailpit-related issue.

What filesystem is your external HDD using?

Lastly:

Assuming permissions is not the issue, does dmesg report hardware issues?

<!-- gh-comment-id:2779629879 --> @axllent commented on GitHub (Apr 4, 2025): That issue had something to do with Docker and/or Docker's mounted volume, so not a Mailpit-related issue. What filesystem is your external HDD using? Lastly: > Assuming permissions is not the issue, does `dmesg` report hardware issues?
Author
Owner

@trajano commented on GitHub (Apr 4, 2025):

I'm using mergerfs which uses ext4 volumes underneath. I think it's more of that reason than a direct mount because direct bind mounts to my USB drives still work.

<!-- gh-comment-id:2779676820 --> @trajano commented on GitHub (Apr 4, 2025): I'm using mergerfs which uses ext4 volumes underneath. I think it's more of that reason than a direct mount because direct bind mounts to my USB drives still work.
Author
Owner

@axllent commented on GitHub (Apr 4, 2025):

OK, then I suspect you're right. Searching online I see a number of threads relating to MergerFS and SQLite not playing nice due to the way MergerFS works. One cause is when SQLite is run with WAL support (default on). You could try running Mailpit with either the --disable-wal flag or alternatively the MP_DISABLE_WAL=true environment variable.

<!-- gh-comment-id:2779729842 --> @axllent commented on GitHub (Apr 4, 2025): OK, then I suspect you're right. Searching online I see a number of threads relating to MergerFS and SQLite not playing nice due to the way MergerFS works. One cause is when SQLite is run with WAL support (default on). You could try running Mailpit with either the `--disable-wal` flag or alternatively the `MP_DISABLE_WAL=true` environment variable.
Author
Owner
<!-- gh-comment-id:2779757425 --> @axllent commented on GitHub (Apr 4, 2025): Also see: https://forum.openmediavault.org/index.php?thread/32959-mergerfs-sqlite3-plex-homessistant-disk-i-o-error/&postID=242010#post242010
Author
Owner

@trajano commented on GitHub (Apr 5, 2025):

MP_DISABLE_WAL=true works

<!-- gh-comment-id:2779959254 --> @trajano commented on GitHub (Apr 5, 2025): `MP_DISABLE_WAL=true` works
Author
Owner

@axllent commented on GitHub (Apr 5, 2025):

Awesome, thank you - I'll make a note of this in the documentation.

<!-- gh-comment-id:2780138458 --> @axllent commented on GitHub (Apr 5, 2025): Awesome, thank you - I'll make a note of this in the documentation.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mailpit#311
No description provided.