-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(fuse): Expose MFS as FUSE mount point #10781
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
Conversation
Core functionality should be ready, need to write some tests and change up the documentation. |
a85c978
to
5c7fa80
Compare
222d4dc
to
d1b4cc1
Compare
Tests ready now, PR should be good for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't review everything at the moment.
@gsergey418 were you able to test mounting /mfs
and interact with that directory (read/write)?
I didn't manage to test myself, simply mounting /ipfs
and /ipns
(using master) broke fuse in my debian VM test setup.
Would you mind updating fuse.md to reflect these changes?
@guillaumemichel Yeah, it mounts and umounts successfully on my machine and I can interact with it like a normal filesystem (ls, cat, touch, mkdir, stat, etc...). Reading and writing seems to work correctly and keeps the files intact. I've changed the variable names like you requested and added documentation. |
I think it would be good to add some way of displaying the file's CID, perhaps through xattrs, if you want full MFS functionality. |
Triage note: thank you, due to holiday season, we may be slower to respond, will look into this after tackling priority work for 0.35.0-rc1 |
Thanks @gsergey418 for the PR. I have tested this branch on a fresh Debian Bookworm install, and it seems that most operations work great in fuse. E.g files added with
I didn't manage to display a file's CID using xattrs $ xattr /mfs/myDir/hello.txt
[Errno 95] Operation not supported: b'/mfs/myDir/hello.txt'
$ xattr /home/guissou/.ipfs/config
$ ... The latest command works on a file outside of MFS (but I guess the file doesn't have any xattr attribute). Is this feature working yet? It seems that in the mounted MFS (fuse), files are readonly. It is possible to override a file, but not to edit it. It that expected? What would it take for files to be mutable? |
@guillaumemichel Thank you for the review. I will look into it. |
@guillaumemichel The xattr was there, you just couldn't list available xattrs because the structures didn't implement the fs.NodeListXattrer interface. I've added the support for it, so it should work now.
|
@guillaumemichel I've added some tests, but haven't run them yet, can't get it to work on my machine. I'll check it out in CI. |
b1bfc4c
to
7e50e5a
Compare
It seems that the FUSE sharness tests haven't been run by the CI either. |
I think you need to set the |
@galargh do you know how to set |
@guillaumemichel Sure! Currently, we have it disabled here - https://github.com/ipfs/kubo/blob/master/.github/workflows/sharness.yml#L49 It was disabled historically, but I'm not aware of the reasons. It might be OK to just turn it on. |
Let's see if this does anything. t0300-mount.sh AFAIK is the only FUSE sharness test, I don't think it's worth inventing something new just to test this. |
1a9d8ef
to
3f88595
Compare
I think that broke some other tests in different scripts, so maybe they would have to be fixed or removed. I'm going on holiday right now, so I've won't be working on this for the next few days. |
72005fe
to
5a53051
Compare
5a53051
to
c579d85
Compare
I couldn't get the FUSE tests in CI working, so probably they were disabled for a reason. I'm still going to keep those sharness tests and lib changes just in case though. |
@gsergey418 do you pass the FUSE sharness tests locally? |
@guillaumemichel No, they don't work either way |
0e3010b
to
63852d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK! Thanks a lot for your contribution @gsergey418!
I am good with merging the PR. FUSE is currently an experimental feature, and we can iterate from this initial state if we want to improve MFS later on to support attribute storage for example.
@lidel do we want this PR in v0.35.0? If not we can wait before merging
Awesome! :D |
my todo for 0.35.0-rc1 prep
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Did some testing and while writes are flakey, read-only works good enough for 0.35.0-rc1.
To set user expectations, added some caveats and warnings about experimental nature of this feature and fixed small bugs that broke TEST_FUSE=1 ./t0030-mount.sh -v
sharness tests. They pass now.
Merging 👍
Expose the MFS root as a FUSE filesystem mounted at /mfs.