Operating System - HP-UX
1753603 Members
6011 Online
108797 Solutions
New Discussion юеВ

Re: How to restart NFS server safely

 
SOLVED
Go to solution
Michal Kapalka (mikap)
Honored Contributor

Re: How to restart NFS server safely

hi Steven,

yes you have right, my misteak,

in the attachment you will find the man page.

sorry for my wrong response.

mikap
Viktor Balogh
Honored Contributor

Re: How to restart NFS server safely

>1)How to view what are the NFS clients are accessing NFS shares available in NFS server?

you can check it this way:

# showmount -a

>2)What happen if we are restarting the NFS server while NFS client is accessing some NFS shares?

the client will report a stale NFS file handle, and then you must forcibly umount the share, or you should start serving NFS again on the server
****
Unix operates with beer.
senthil_kumar_1
Super Advisor

Re: How to restart NFS server safely

So that other users can not access the same file if one user is accessing, am i correct?
Viktor Balogh
Honored Contributor

Re: How to restart NFS server safely

>So that other users can not access the same file if one user is accessing, am i correct?

No, this locking is only for writing. Concurrent acces is permitted, but only one can write to the file at once. Before every write this logfile will be stat'ed, if it fails then it cannot be written to the file.
****
Unix operates with beer.
Viktor Balogh
Honored Contributor

Re: How to restart NFS server safely

s/logfile/loCKfile/
****
Unix operates with beer.
senthil_kumar_1
Super Advisor

Re: How to restart NFS server safely

Hi All,

I have configured NFS server in HP-UX 11.31.

I have done following steps:

1)Created NFS share entry in /etc/exports on sys1 (host name of NFS server):

# vi /etc/exports

/var -root=sys3:sys2


2)Restarted NFS services needed for NFS server:

# /sbin/init.d/nfs.core start
Starting NFS CORE networking

Starting up the rpcbind
/usr/sbin/rpcbind


# /sbin/init.d/lockmgr start
Starting up the Status Monitor daemon
rpc.statd already started, using pid: 987
Starting up the lock manager daemon
/usr/sbin/rpc.lockd


# /sbin/init.d/nfs.server start
Starting NFS SERVER subsystem

Reading in /etc/dfs/dfstab
Starting up the mount daemon
/usr/sbin/rpc.mountd
Starting up the NFS server daemon
/usr/sbin/nfsd
Starting up nfsmapid daemon
/usr/sbin/nfsmapid

3)Now i have executed the below command to view the NFS shares in NFS server (sys1):

# showmount -e
no exported file systems for emdlaghpvm05

# showmount -a


4)Then i executed the below command since the NFS shares are not shown by "showmount -e":

# exportfs -va
shareall -F nfs


5)I am getting below mentioned error while mounting NFS share from NFS client (sys3):

# mount -F nfs sys1:/var /nfs
nfs mount: sys1:/var: Permission denied


How to solve this issue.


sujit kumar singh
Honored Contributor

Re: How to restart NFS server safely

Hi Senthil

As this is 11.31 you need to use the /etc/dfs/dfstab insted of /etc/exports


add the entries in the /etc/dfs/dfstab as follows:

share -F nfs /var -o root=sys1:sys2
save and exit

exportfs -au
exportfs -a

make sure that on the nfs server as well as the nfs clients the /etc/hosts have the each others entries.



if you /etc/exports there and want to convert the saem to the /etc/dfs/dfstab format, just run the commands as

exportfs -au
exp2dfs
exportfs -a
showmount -e

make sure the nfs server and the nfs clients have each others entries in the /etc/hosts file.



regards
sujit
sujit kumar singh
Honored Contributor

Re: How to restart NFS server safely

Hi Senthil

As this is 11.31 you need to use the /etc/dfs/dfstab insted of /etc/exports


add the entries in the /etc/dfs/dfstab as follows:

share -F nfs /var -o root=sys1:sys2
save and exit

exportfs -au
exportfs -a

make sure that on the nfs server as well as the nfs clients the /etc/hosts have the each others entries.



if you /etc/exports there and want to convert the saem to the /etc/dfs/dfstab format, just run the commands as

exportfs -au
exp2dfs -- this shall convert the /etc/export entries to /etc/dfs/dfstab entries.
exportfs -a
showmount -e

make sure the nfs server and the nfs clients have each others entries in the /etc/hosts file.



regards
sujit
Steven E. Protter
Exalted Contributor

Re: How to restart NFS server safely

Shalom,

showmount -e localhost

To see after all these changes you have made have altered your NFS shares.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
senthil_kumar_1
Super Advisor

Re: How to restart NFS server safely

So both "/etc/exports" and "/etc/dfs/dfstab" are differing lot in configuration method.


What about the options like root, rw, ro, anon, aync.


Could you please explain about what those options are meaning in /etc/dfs/dfstab.