-
Notifications
You must be signed in to change notification settings - Fork 97
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
fscrypt on CephFS does not recognize locked directories upon remount #399
Comments
This should work, and it does work on other filesystems. Please report this to the CephFS developers. |
Will do, thanks! |
I opened https://tracker.ceph.com/issues/63939 for this. |
In connection with the testing I frequently get the following error: This is particularly evident when trying to manipulate the formerly encrypted directory (lock/unlock/encrypt) that is marked as not encrypted after the remount. |
Interestingly the issue with 'is not encrypted' does not seem to be limited to umount and remount: root@ubuntu:/mnt# mkdir test4 For some reason the metadata read does not seem to work right. the error 'is not encrypted' is in metadata/policy.go in the function GetPolicy. |
Update: the problem appears to be writing into the encrypted (unlocked) CephFS directory. |
Upgrade of the Ceph cluster to 18.2.1 (Reef) did not change the behavior. |
This issue is present in Ubuntu 23.10 with Kernel 6.6.7 from mainline. (6.6+ is required for fscrypt support on CephFS). fscrypt is installed via apt.
What I am doing:
At this point I can fscrypt lock and unlock the directory
When the directory is locked, the files inside are encrypted, with encrypted filenames. When it is unlocked. the files are decrypted.
Result: [ERROR] fscrypt unlock: file or directory cryptdir is not encrypted
The files and directories inside the directory are encrypted, but fscrypt does not recognize that they are.
I tried locking the directory before umount and leaving it unlocked before umount. Neither works.
I tried to find a solution online, but came up empty.
Am I missing something or is this a bug? And if it is the latter, do I need to file this with the kernel team for the CephFS driver, too?
The text was updated successfully, but these errors were encountered: