1833737 Members
2883 Online
110063 Solutions
New Discussion

NFS export as ro

 
Bruce Baillie
Regular Advisor

NFS export as ro

I have exported a directory to 10 nodes as rw, now I need to export it to one more as ro. How can I do it?
Why can't we all get along?
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor

Re: NFS export as ro

You need to export it as "read-mostly".

/mydir rw=host1,host2,host3

This will allow host1,host2, and host3 read-write access but any other hosts not explicitly listed will be read-only.

Man exports for details.
If it ain't broke, I can fix that.
Muthukumar_5
Honored Contributor

Re: NFS export as ro

If you are using with rw then you don't need to specify (can not) ro to one node. Other nodes which are not configured with rw can access the file system with read-only mode.

Try to mount from the node as,

# mkdir /tmp/testfs
# mount fileserver:/filesystem /tmp/testfs

will work.

PS: Both machines are needed to be reachable through network.
--
Muthu
Easy to suggest when don't know about the problem!
Senthil Kumar .A_1
Honored Contributor

Re: NFS export as ro

Hi,

Check the excel attachment to get a brief idea about the config files behaviour.

Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Sivakumar TS
Honored Contributor

Re: NFS export as ro


Hi Bruce,

use the follwoing enrty in /etc/exports to make a readonly export,

/directory -ro

Regards,

Siva.
Nothing is Impossible !
Sivakumar TS
Honored Contributor

Re: NFS export as ro


Hi Bruce,

use the follwoing enrty in /etc/exports to make a readonly export,

/directory -ro

optionally, you can give a selective read write access by adding

/directory -rw=hosta:hostb

Regards,

Siva.
Nothing is Impossible !
Sivakumar TS
Honored Contributor

Re: NFS export as ro


dont forget to run,

#exportfs -av

after modifying the /etc/exports

Regards,

Siva
Nothing is Impossible !
Muthukumar_5
Honored Contributor

Re: NFS export as ro

Siva,

Are you asking Bruce to add two entry with ro and rw for one file system? If so it is not possible. Read exports man page.

--
Muthu
Easy to suggest when don't know about the problem!
Bruce Baillie
Regular Advisor

Re: NFS export as ro

OK, here is how the exports file looks, and it works.

/dir -rw=node1:node2:node3,access=node4
Why can't we all get along?