Skip to content
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

Support NFSv4 export #148

Open
itfanr opened this issue Jul 26, 2016 · 14 comments
Open

Support NFSv4 export #148

itfanr opened this issue Jul 26, 2016 · 14 comments

Comments

@itfanr
Copy link

itfanr commented Jul 26, 2016

For example:

On 192.168.0.2 the /home directory is exported via nfs protocol , and I mount it to /mnt/nfs on 192.168.0.3.
Then I mount /mnt/nfs to /mnt/fuse via a fuse application.

At last, /mnt/fsue is exported via nfs again.

Could bazil-fuse make it?

@tv42
Copy link
Member

tv42 commented Jul 26, 2016

It seems code changes are needed.

  1. The filesystem must support lookups of . and ..; I'm not sure of the exact semantics right now
  2. InitExportSupport must be set in InitResponse.Flags; this requires changes in bazil.org/fuse

It would require changes, and filesystems would need to explicitly enable support for NFS exports, but we could support it, and it's a worthy goal.

Note: you must use NFSv4 not 3: http://unix.stackexchange.com/questions/102617/having-trouble-exporting-fuse-via-nfs

@tv42 tv42 changed the title Can bazil-fuse make a nfs mount point to a fuse mount point? Support NFSv4 export Jul 26, 2016
@itfanr
Copy link
Author

itfanr commented Jul 27, 2016

@tv42 Do you mean it is feasible ?

@tv42
Copy link
Member

tv42 commented Jul 27, 2016

With code changes, sure.

@itfanr
Copy link
Author

itfanr commented Jul 27, 2016

@tv42 It sounds great ! But how about the performance after the second nfs export ?

@tv42
Copy link
Member

tv42 commented Jul 27, 2016

I'm not sure what you mean. fuse-nfs is a FUSE filesystem that acts as an NFSv3 client. sshfs is a FUSE filesystem that acts as an SFTP client. fusexmp.c is an example of how to program with the C FUSE library. What about them?

@itfanr
Copy link
Author

itfanr commented Jul 28, 2016

@tv42 If you want to export /mnt/nfs via nfs protocol , you will get that "/mnt/nfs is not supported by nfs. Only if map the /mnt/nfs to /mnt/fuse and export the /mnt/fuse via nfs protocol ,you can mount nfs directory from another host again.

@itfanr
Copy link
Author

itfanr commented Jul 28, 2016

But how to reduce overhead or times of copy between kernel space and user space ?

@itfanr
Copy link
Author

itfanr commented Jul 28, 2016

@tv42 I want to achieve is a gateway host , which seperate the client from backend of storage and have the ability to merge multiple storages.

@tv42
Copy link
Member

tv42 commented Jul 28, 2016

Are you really asking about re-exporting an NFS mount? If so, that's a completely different problem, and FUSE doesn't really do anything for you. Please don't drag this FUSE library into that problem.

@itfanr
Copy link
Author

itfanr commented Jul 28, 2016

@tv42 Are you really asking about re-exporting an NFS mount? Yes. Can you give me some idea?

@tv42
Copy link
Member

tv42 commented Jul 28, 2016

Sorry, NFS has nothing to do with FUSE, and I'd rather forget every single thing about it.

@itfanr
Copy link
Author

itfanr commented Jul 28, 2016

@tv42 I have made it by nfs-kernel-client + fuse + nfs-kernel-server.

@itfanr
Copy link
Author

itfanr commented Jul 29, 2016

I can only get the speed of 6M/s for write .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants