-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
FoundationDB fails to run with a ZFS data dir #274
Comments
this is because of the O_DIRECT call to open files. ZFS does not support O_DIRECT. we, @wavefrontHQ, had looked at changing the call to O_[A]SYNC to bypass this and it does indeed work on ZFS after this change; however, we were not confident to pull the trigger as there are implications on data integrity at that point. |
I think there are two reasons for O_DIRECT: we don't want kernel page caching (since we are doing our own), and we need kernel AIO to work (and on supported filesystems, only direct I/O is actually asynchronous). O_SYNC doesn't necessarily do either of these things and unnecessarily requires durability for every write (which is potentially a huge performance hit; we call fsync() where we need to already), so it doesn't really seem like the right thing, although of course ZFS may do something very unexpected with these flags. If ZFS does kernel AIO reliably without O_DIRECT, and if you can live with horrible cache pollution, you might be able to just take out O_DIRECT. But the testing burden of making FDB production ready on a new filesystem is pretty large. You want to check: (a) durability, using real-world power failure tests or a low level simulator; |
This sounds like a feature request so could you please move this to the forums if you'd like to continue this discussion. We like to use GitHub Issues for code specific/targeted tasks. |
When the data dir is on ZFS, my logs look like the following:
It's unclear what it's attempting to do or why it's failing but it's clearly not working.
The path it's attempting to access does not exist but there is a file called
/var/lib/foundationdb/data/4500/processId.part
.The text was updated successfully, but these errors were encountered: