Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I would want to share a directory via NFS only read-only (data should not be corrupted).

However I would want the client to be able to use the mounted folder as if it was read write, as transparently as possible.

Basically I would want updates to go only one way, from server to client and not the other way around.

I don't really mind if my local updates are not 100% reliable (if they can be overriden by the reference server).

Is there a way ? With NFS options directly ? With some kind of mount trick ? I'm using Ubuntu 12.04 on both sides.

Thanks !

share|improve this question
    
do you want client to wire, but writes must not be sent to the server? –  tigran Nov 21 '13 at 7:22
    
that's what I'd want, yes –  Such Nov 21 '13 at 9:20
1  
I think you need overlayfs, where lover fs your nfs server, and upper fs some local directory. git.kernel.org/cgit/linux/kernel/git/mszeredi/vfs.git/tree/… –  tigran Nov 21 '13 at 11:21
    
This looks like exactly what I was looking for... Thanks! –  Such Nov 21 '13 at 15:26
    
I will post this as an answer. –  tigran Nov 21 '13 at 22:55

1 Answer 1

up vote 2 down vote accepted

The overlay fs provides a possibility to mount one filesystem on top of other one. You can use your nfs mount as lower fs and some local directory as upper fs. The local change will not be sent to the NFS server. More info: https://git.kernel.org/cgit/linux/kernel/git/mszeredi/vfs.git/tree/Documentation/filesystems/overlayfs.txt?h=overlayfs.current

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.