Skip to contentSkip to conversation

exports(5) formatting question

DISCUSSION Alexander Reeder 2 participants 2 messages May 16, 2002 – May 17, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

There seems to be a problem in the behavior of exports(5) evaluation of /etc/exports.

For example, how would I write an /etc/exports file to export a file system to 172.16.x.x read-only, with an exception of read-write to 172.16.4.1?

The following would seemingly be the answer:

/export 172.16.0.0/16(ro) 172.16.4.1(rw)

But after server reboot, the client 172.16.4.1 can't write to NFS.

Sorry but I've not yet looked at it in detail. On Solaris I can write an equivalent request like this:

share -F nfs -o ro=-172.16.4.1:@172.16.0.0/16 ,rw=172.16.4.1 /export

On a similar, but different note, it'd be nice to allow the following expression:

/home 172.16.0.0/16(rw)
/home/jondoe 172.16.0.0/16(ro)

Solaris displays an error message (parent-directory (/home) already shared) and cannot do this; *BSD's NFS server is per-filesystem-basis and allow this only if /home/jondoe is on a different filesystem.

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [email protected]
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#1 lore raw
Quoted 7 lines · On Thursday May 16, [email protected] wrote:

There seems to be a problem in the behavior of exports(5) evaluation of /etc/exports.

For example, how would I write an /etc/exports file to export a file system to 172.16.x.x read-only, with an exception of read-write to 172.16.4.1?

Quoted 6 lines

The following would seemingly be the answer:

/export 172.16.0.0/16(ro) 172.16.4.1(rw)

But after server reboot, the client 172.16.4.1 can't write to NFS.

That should work.....
What does /var/lib/nfs/rmtab contain at the point of server reboot?

Quoted 9 lines

Sorry but I've not yet looked at it in detail. On Solaris I can write an equivalent request like this:

share -F nfs -o ro=-172.16.4.1:@172.16.0.0/16 ,rw=172.16.4.1 /export

On a similar, but different note, it'd be nice to allow the following expression:

Quoted 7 lines

/home 172.16.0.0/16(rw)
/home/jondoe 172.16.0.0/16(ro)

Solaris displays an error message (parent-directory (/home) already shared) and cannot do this; *BSD's NFS server is per-filesystem-basis and allow this only if /home/jondoe is on a different filesystem.

Not "*BSD's NFS server" but "The NFS protocol by design".

You cannot reliably do what you want using NFS. It might be possibly to hack something together that would work 99% of the time. But it would be a hack.
For example, supposing some file under /home/jondoe was hard-linked into /home/janedoe.
Should that file be writable or not?

NeilBrown

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [email protected]
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs