Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to mount and NFS is not working

Status
Not open for further replies.

talam

MIS
Jun 22, 2001
47
CA
I can get NFS working from one box to another and vice-versa. But NFS does not work from the SAME host to another host. The same exports (develop01:/u01/app ) were able to be mounted from many other hosts. All the deamons are running on all the hosts.

Any input appreciated... Thanks!

This is jupiter host (10.34.4.55) and I am logged in as root
# mount develop01:/u01/app /test
mount: 1831-011 access denied for develop01:/u01/app
mount: 1831-008 giving up on:
develop01:/u01/app
The file access permissions do not allow the specified action.
# lssrc -g nfs
Subsystem Group PID Status
biod nfs 11614 active
nfsd nfs 11876 active
rpc.mountd nfs 12644 active
rpc.statd nfs 12138 active
rpc.lockd nfs 13160 active
#

The /etc/exports file in "develop01" server below:
/u01/app -root=10.34.4.55
exports: END
 
My guess is that the mount is coming across perhaps a different network interface, thereby having a different hostname and/or IP address.

Also - did you run "exportfs -av" recently ? It might help.

Bill.
 
talam,

try this:

ON THE SERVER:

To add the filesystem for NFS exporting:
- Enter smitty mknfsexp .
- Enter the PATHNAME of the directory to export (for example, <dir_name>).
- Change the MODE of export directory to read-only.
- Enter the HOSTS & NETGROUPS allowed client access.
- Enter HOSTS allowed root access.
- Press Enter to export the filesystem.

NOTE : If you are going to be installing on the client machine, you MUST enter the client name for HOSTS allowed root access Verify that the server has the filesystem exported:

Enter showmount -e <server_name> .

NOTE : <server_name> will be the hostname of the server.

- Create the directory you will be using to access the software.
- Enter mkdir <dir_name>.

ON THE CLIENT:

- Check the NFS daemons:
- Enter lssrc -g nfs .
- If they are not active, start them by running startsrc -s portmap and then startsrc -g nfs .

- Verify that the server has the filesystem exported:
- Enter showmount -e <server_name> .

NOTE : <server_name> will be the hostname of the server.

- Create the directory you will be using to access the software.
- Enter mkdir <dir_name?

- Enter smitty mknfsmnt .
- Enter the PATHNAME of the mount point (for example, <dir_name>).
- Enter the PATHNAME of the remote directory (for example, <dir_name>).
- Enter the HOST where the remote directory resides.
- Change the MODE for this NFS file system to read-only.

NOTE: HOST will be the hostname of the server.
Press enter to NFS mount the filesystem.


 
Thanks for the input... But &quot;re-exporting&quot; did not seem to have any effect. Also, I followed Jonney2001 steps and got the same result (error message). [smit output bellow]

COMMAND STATUS

Command: failed stdout: yes stderr: no

Before command completion, additional instructions may appear below.

mount: 1831-011 access denied for develop01:/u01/app
mount: 1831-008 giving up on:
develop01:/u01/app
The file access permissions do not allow the specified action.

 
talam,

have you tried checking out your &quot;/etc/hosts&quot; file? if not - try to define servers that you need to have access.

are you using &quot;root&quot; ID while doing these stuff?

btw, are you trying to copy or move files from one server to another? if so, you may try remote login:

- create a &quot;.rhosts&quot; file under &quot;/&quot; - if you still don't have it. define server name and user that will be allowed to have access.

- you can use cpio, tar commands.

these are just some possibilities and it works for me.
 
/etc/hosts file is upto-date with all the hosts info.

are you using &quot;root&quot; ID while doing these stuff? YES, but I have root permission defined in the /etc/exports file.

/u01/app -root=10.34.4.55
exports: END

I need to mount to install latest &quot;patches&quot; which resides on the server. The problem is that I can mount one-way, but can not mount the other way.

Thanks Johny2001!
 
talam,

for unknown reason to me - i dunno why you can not mount in two-way.

i just tried it now, and it's working fine.

here's what i did:

- created &quot;.rhosts&quot; file for each server, with the following line inside the file:

server## root

## - server number, say - 01 or 02 on this example.

***for this sample purposes, i used /usr/xxx FS for both machines (i considered they have both same file system/FS); mount point /mnt***

Procedure #1:

- Enter smitty mknfsexp
- Enter the PATHNAME of the directory to export (for example, /usr/xxx).
- Change the MODE of export directory to read-only.
- Enter the HOSTS & NETGROUPS allowed client access (server02)
- Enter HOSTS allowed root access (server02)
- Press Enter to export the filesystem.
- Check by &quot;showmount -e&quot;; should display:

export list for server01:
/usr/xxx server02

---------------------------

Procedure #2:

- Enter smitty mknfsmnt
- Enter the PATHNAME of the mount point (for example, /mnt).
- Enter the PATHNAME of the remote directory (for example, /usr/xxx).
- Enter the HOST where the remote directory resides (server#01)
- Change the MODE for this NFS file system to read-only
- Press enter to mount the FS /usr/xxx under /mnt
- Check by df -k ; you should have a line similar to this:

server01:/usr/xxx 962560 82784 92% 7155 3% /mnt

let me know or gimme feedback - let's try to fix your problem.

NOTE: for two-way mounting, do Procedures #1 & #2 for both machines
 
I tried step-by-step, but fail to get NFS working both ways... Here, I can get NFS working from &quot;develop01&quot; to &quot;chqedi04&quot;

>df -k
.....
chqedi04:/usr/mqm 1114112 32544 98% 29466 11% /test


But when I am trying the other way (from chqedi04), it still gives the same EXACT error message.

# showmount -e develop01
.....
/u01/app chqedi04

# mount develop01:/u01/app /test
mount: 1831-011 access denied for develop01:/u01/app
mount: 1831-008 giving up on:
develop01:/u01/app
The file access permissions do not allow the specified action.
#

I really don't know why it does not work? I created the .rhosts in the &quot;/&quot; directory.

THANKS!
 
check &quot;nfs&quot; first, by:

/etc # ps -ef | grep nfs <enter>

root 41640 2456 0 Nov 26 - 36:28 /usr/sbin/nfsd 8

if not active, run it by:

startsrc -s nfs
 
[on chqedi04 box]
# ps -ef | grep nfs
root 13676 10630 0 Dec 07 - 0:01 /usr/sbin/nfsd 3891
root 18242 18990 1 11:00:23 pts/0 0:00 grep nfs
# showmount -e develop01
/u01/app chqedi04,jupiter3
/usr chqedi04


NFS is up and active (develop01 and chqedi04 )... But &quot;chqedi04 &quot; can not mount develop01 server. But from the same box (chqedi04), I can mount a different NFS server (jupiter3).

# showmount -e
export list for jupiter3:
/usr/mqm (everyone)
# mount jupiter3:/usr/mqm /test
# df -k
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 65536 55668 16% 1034 4% /
/dev/hd2 1114112 32544 98% 29466 11% /usr
/dev/hd9var 65536 48836 26% 288 2% /var
/dev/hd3 65536 62160 6% 80 1% /tmp
/dev/hd1 9633792 5441796 44% 15351 1% /home
/dev/lv00 1310720 607228 54% 2781 1% /ora816_hp
jupiter3:/usr/mqm 1212416 3052 100% 32263 11% /test

THANKS johny2001

Merry Christmas and Happy holidays!
 
talam,

If you still need to mount develop01, log onto develop01, :

Re-export all filesystems type:

exportfs -a

Then re-try the NFS mount on chqedi04.

Also ensure nfsd is running on devleop01 - as you can mount another NFS filesystem on chqedi04 then NFS appears to o.k. on this server. PSD
IBM Certified Specialist - AIX V4.3 Systems Support
IBM Certified Specialist - AIX V4 HACMP
 
Re-exported and ensured that nfsd is running on &quot;develop01.&quot;

Still getting the same error!

# mount develop01:/u01/app /test
mount: 1831-011 access denied for develop01:/u01/app
mount: 1831-008 giving up on:
develop01:/u01/app
The file access permissions do not allow the specified action.
#


Thanks again. Something goofy here :(

/Tanvir
 
Just a thought, and I am probably off base here...is there a user nobody
on both system? in /etc/passwd?
If that is screwed up it will not work as well... also can you ping loopback
in /etc/hosts....is the entry there? rpc.mountd will not start if it is incorrect
or has extra spaces or garbage in the host file.?

Also on the client side the biod, portmap and rpc.statd and rpc.lockd are running
On server portmap, inetd, nfsd, and rpc.mountd
lssrc -g nfs


IF you are running NIS you can complicate it and get authent errors



Good Luck
 
One last thing...sometimes the locks for nfs get out of wack and require a reboot
of both the client and server...not saying that is your problem but an 1831-011
says reboot since the locks are in use......

 
talam,

Or unexport everything on develop01:

exportfs -au

re-export everything :

exportfs -a

Restart. PSD
IBM Certified Specialist - AIX V4.3 Systems Support
IBM Certified Specialist - AIX V4 HACMP
 
Thanks for the feedback... checked the /etc/passwd for &quot;nobody&quot; and pinging the &quot;loopback&quot; works fine on both the boxes. Also, No NIS here!

&quot;lssrc -g nfs&quot; shows the needed deamons Active! un-export and re-exported eveything back... Still getting the same error... I cannot shutdown one of the server (develop01) at this time. Will update when it is rebooted and tested.

THANKS... really appreciate all the feedbacks! Merry Christmas and Happy New year.

/Tanvir
 
Looks like you have tried just about everything but just for grins I will make a suggestion. Have you tried to set the NFS export in smitty to 00 for anonymous? By no means would I leave it that way but it might get what you need done.

Just a thought, hope it helps

Tcorum
 
Hi Tanvir!

I had exactly the same problem you have faced in mounting remote file systems. The mount command gave the same error that it gave to you. I could mount one way but not the other way.

Mounting a directory of machine tunga ( a machine name corresponding an IP address found in /etc/hosts file) on to a directory of nile (another machine name corresponding to another address found in /etc/hosts file) was possible but not the opposite way. I wanted to mount file system /space of nile machine on to a directory /nile_space on tunga machine. The problem seems to be entry &quot;/space -access=tunga&quot; in /etc/exports file of nile machine. In order to make mounting successful I did the following:

On nile machine:

1) unexported all file systems by following command:

exportfs -a -u

After this /etc/xtab did not contain anything.

2) Changed /etc/exports to have following one line

/space -root=tunga

Note that I have not used IP address of the machine
directly in the file

3) Exported the file system as follows

exportfs -a

After this, /etc/xtab contained the same line that
/etc/exports file contained.

Show mount command, showmount -e nile, should show
results as follows:

export list for nile:
/space (everyone)

On tunga machine:

1) Issued following command to mount

mount nile:/space /nile_space

where nile_space is a local directory on tunga.

It worked!

Probably, you try similar steps.

Best luck
sagar
 
Great... I will try it out!

Thanks Sagar!
 
Hi,
Try this out on nfs server.
# stopsrc -g nfs - stop nfs daemon
# stopsrc -s portmap - stop portmap daemon
# cd /etc
# rm -rf sm sm.bak state rmtab xtab - cleaning the files
# startsrc -s portmap - start portmap
# startsrc -g nfs - start nfs

regards
sree.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top