1753472 Members
4679 Online
108794 Solutions
New Discussion юеВ

NFS mount in HPUX

 
Sreer
Valued Contributor

NFS mount in HPUX

Hello all,

I have a requirement in my production box.


file system /test need to exported from server A must be secured.

only server B must access have rw access to /test

All other servers must have read only access to the exported FS /test from server A.

How can we implement the same?

the entry I put in /etc/exports:

/local/home/INTACT -ro,-root=p650-n33

But while doing exportfs -a Iam getting the below error:

[root@pacfrp2:/]#exportfs -a
exportfs error: only specify one of rw or ro.

Could you pls provide the exact steps?
thanks in advance

rgds sree
3 REPLIES 3
V. Nyga
Honored Contributor

Re: NFS mount in HPUX

Hi,

from 'man exportfs':
The ro and rw options cannot be used on the same exportfs command line.

Use it this way (like mentioned in the man-pages):
rw=hostname[:hostname]...
Export the directory read-mostly. Read-mostly means read-only to most machines, but read-write to those specified.

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Matti_Kurkela
Honored Contributor

Re: NFS mount in HPUX

You just have a small problem in your /etc/exports syntax. Only the first option should start with the minus sign "-", not all of them.

To export the filesystem /test, you should use:

/test -rw=serverB

When you use the rw= option to list the systems allowed to write on the exported filesystem, all the other systems will automatically be read-only. So you don't need the "ro" option in this case. This is called "read-mostly" in the man page.

If you need the root access option, the syntax should be:

/test -rw=serverB,root=serverB

But you *really* should set up your user groups & group permissions so that you won't need the root option.

More details:
http://docs.hp.com/en/B2355-60127/exports.4.html

(the above detailed information is also available on your system, simply use the command "man exports")

MK
MK
Sreer
Valued Contributor

Re: NFS mount in HPUX

Hello All,
Thnaks for your reply.

I have solved the issue by giving only rw to the mentioned server.
Now it seems Ok.

Thanks again
rgds
sree