Operating System - HP-UX
1833043 Members
2303 Online
110049 Solutions
New Discussion

NFS configured read/write is read only

 
Bill Walter
Occasional Advisor

NFS configured read/write is read only

We have 2 identical HP itanium servers K and S. Box S exports 3 directories for
use by Box K. The files and directories are all rw for the owner, user O. The
same owner, O, is present on both boxes. In mid-March, Box K was properly
shut down and restarted due to server room maintenance. Since that time,
Box K can read but cannot write to the exported directories on Box S. When attempting to create a new directory:
"mkdir: cannot create test: Read-only file system"
Attempting to copy files also results in a similar error.

On box K, fstab appears correctly configured; e.g.,

s:/oraback/lback /oraback/sback nfs rw,suid,largefiles 0 2

On box S, the file /etc/exports is correctly configured and "exportfs -a" has
been executed with no change to the situation. However, documentation in MAN
on the server and at http://docs.hp.com/en/B2355-60130/exports.4.html indicate
that /etc/exports is obsolete being replaced by /etc/dfs/dfstab and
/etc/dfs/sharetab Both of these files are present and appear to be correctly
configured; e.g.,

dfstab has "share -F nfs -o rw=k.mycollege.edu /oraback/lback"

sharetab has "/oraback/lback - nfs rw=k.mycollege.edu,ro="

The other 2 shares are configured exactly as these.
The shares were "umount"ed on Box K followed by a "mount -a". No change.

On box K, mnttab reads, in part:
s:/oraback/lback /oraback/sback nfs rsize=32768,wsize=32768,
NFSv3,dev=100000f 0 0 1237918671

On box S, rmtab reads, in part:
k:/oraback/lback

We need to be able to write to the directories on Box S from Box K...
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: NFS configured read/write is read only

Shalom,

Suggest you do this:

tail -f /var/adm/syslog/syslog.log

/sbin/init.d/nfs.client stop
/sbin/init.d/nfs.server stop
/sbin/init.d/nfs.core stop

/sbin/init.d/nfs.core start
/sbin/init.d/nfs.server start
/sbin/init.d/nfs.client start

My guess here is the error will pop up or permissions are not consistent at the share point as defined in /etc/exports

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
Ganesan R
Honored Contributor

Re: NFS configured read/write is read only

Hi,

See this lines from share man page...

//If share commands are invoked multiple times on the same file system, the last share invocation supersedes the previous; the options set by the last share command replace the old options.//

Have you tried resharing/re-exporting the NFS share on box S.

Run this command and try...

share -F nfs -o rw=k.mycollege.edu /oraback/lback

or just for testing

share -F nfs -o rw /oraback/lback

Also make sure that box S is able to resolve the host name of box K
Best wishes,

Ganesh.
Bill Walter
Occasional Advisor

Re: NFS configured read/write is read only

Steven,
I did as you said on the server, the one exporting the files, Box S. All seemed well until I went to the client and the shared directories had disappeared. No problem, I umounted the 3 directories and attempted a mount -a...it hung (twice), so ctrl-c. The directories were recreated, indicating that the process had read fstab; however, no files were in sight.

Ganesan,
I did as you said on one of the shares on the server, to no avail. The tail -f is handy but shows no errors.

If I wish to restart the nfs.client on the client, must I also restart the nfs.core?

I also entered SAM and saw the file specs there so tried to mount them. Process failed, with no other explanation. I tried the SAM mount command as is from the command line, it hangs also.

Thanks, guys, for all your input
Taifur
Respected Contributor

Re: NFS configured read/write is read only

Hi Bill,

You can check below link for nfs


http://docs.hp.com/en/5992-0714/ch02s01.html


Rgds//
Taifur
Armin Kunaschik
Esteemed Contributor

Re: NFS configured read/write is read only

You're exporting/sharing without the sec option e.g. -o sec=sys. In this case you export "read/write mostly". This means, every resolvable(!!) host in the "rw" or "root" section get write permission, any other unlisted (or even unresolvable) host gets automatically read only permission.

So you need to check:
1. are all names resolvable in /etc/hosts or forward and reverse if DNS is used.
2. If you don't use the hostname for mounting (but a service address or an alias) make sure you additionally export the share for this alias.

In the future alway use at least "sec=sys" to export filesystems, you'll notice such problems earlier (because you get a permission denied while mounting).

My 2 cents,
Armin

PS: Please assign points, if you find answers useful!
And now for something completely different...