-
Notifications
You must be signed in to change notification settings - Fork 255
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
prealloc failed: operation not supported #22
Comments
Apparently ZFS does not support fallocate ( openzfs/zfs#326 ). gocryptfs uses fallocate to allocate space before it uses it, to prevent running out of space in the middle of an operation, leaving a broken file behind. |
Would it be possible to just check if we have enough space (+some to be safe)? At least under ZFS and simillar, to support it at all. |
This makes gocryptfs work at all on ZFS. See #22 .
Ok I am checking now if fallocate is not supported at all. In this case, gocrypts will print a warning (only once) and continue working. Now if the disk runs out of space while writing to a file, the incompletely written block (max 4kB) will be unreadable (it will report an I/O error if you try to read it). But you can still truncate or delete the file. |
Ok I guess this is resolved. Closing the ticket. |
When I try to setup encryption dir on the ZFS (ZoL 0.6.5.6-0ubuntu8 on ubuntu 16.04. gocryptfs is pulled from github using go get... and the latest commit is f035d3e) the files fail to be created.
Empty files work fine, but writing content to them fails.
Now when I do
touch bar/asdf
it works fine. But trying to write something to it, usingecho 1 > bar/asdf
results inecho: write error: operation not supported
and the following message in the gocryptfs running in foreground:It doesn't matter what means of writing the file I use. cp, rsync etc all fail in the same way.
The very same version works if I put "foo" dir on tmpfs or ext4.
The text was updated successfully, but these errors were encountered: