LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-25-2007, 11:10 PM   #1
hyjalsoul
Member
 
Registered: Jul 2007
Distribution: ArchLinux, Ubuntu, Slackware, Fedora
Posts: 46

Rep: Reputation: 15
linux noob's NFS question on mounting directories


Hey,guys,I'm really new to Linux and Fedora Core
During these days,I met a problem when configuring NFS for server and client,because my client cannnot mount /home or /media directory from my server. My exports file is like this:
/home 192.168.104.3(rw,no_root_squash,sync)
/media 192.168.104.3(rw,no_root_squash,sync)

when I try to mount my /home directory from the server like:

mount 192.168.104.1:/home /mnt/home

it will show: mount.nfs /home failed, reason given by server: Permission denied

but when I try to mount my /media directory from the server like:

mount 192.168.104.1:/media /mnt/media

it will show: mount point /mnt/media does not exist.

But my /media directory exists on my server.
Does anyone know what's going on? Do I have to change the /home directory permission or what?

Plus,I checked an article here
http://nfs.sourceforge.net/nfs-howto/ar01s07.html
ther is one reason mentioned for causing permission denied,and the author said that I might also look at the file /var/lib/nfs/xtab for an unabridged list of how all the active export options are set.If they are not, then you have not re-exported properly.
But I've exported the directories from my server successfully,why does that permission problem happen again?
 
Old 07-26-2007, 09:48 AM   #2
drdosman
LQ Newbie
 
Registered: Sep 2004
Location: VA
Distribution: Fedora
Posts: 20

Rep: Reputation: 0
Welcome to Linux, sounds like permission problems to me. I got similar errors until I figured it out as permission issues and made my fstab (I auto mount them) have these parameters on the line for the NFS folder I was mounting:

192.168.1.51:/shared /home/netdrive nfs bg,user,users,suid,rw,exec,intr,wsize=32768,rsize=32768 0 0
192.168.1.51:/var/www /home/webdev nfs bg,user,users,suid,rw,exec,intr,wsize=32768,rsize=32768 0 0

The key one you need is user or users option on the line and others like exec, suid, rw etc depending on your requirements..bg is background mounting in case not there during start up...

Here is a decent link on the NFS client setup options, it goes over cmd line entry approach too.
http://www.redhat.com/docs/manuals/l...nt-config.html

Make sure you own/have permissions for the media directory your trying to mount to. Also make sure you have permissions on the folders your are mounting from the other system. Your exports file looks ok to me, so I think it is the permissions.

Last edited by drdosman; 07-26-2007 at 09:50 AM.
 
Old 07-28-2007, 02:42 PM   #3
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
I'm a noob to NFS. Which are the better options

Code:
(rw,no_root_squash,sync)
or

Code:
ro,insecure,no_subtree_check,nohide,fsid=0
and in the last one with fsid=0 removed?
 
Old 07-28-2007, 04:22 PM   #4
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
Here's what I now get

Code:
10.0.0.3:/nfs4exports/share1    /mnt/shares     nfs4    bg,user,users,suid,rw,exec,intr,wsize=32768,rsize=32768 0 0
If I have nfs instead of nfs4 I get the original error message. Both PCs are using FC7.

Code:
[root@Jongi-MythTV ~]# mount -a
mount: can't get address for Jongi-MythTV
[root@Jongi-MythTV ~]# ls /mnt/shares/
[root@Jongi-MythTV ~]#
 
Old 07-29-2007, 12:26 AM   #5
drdosman
LQ Newbie
 
Registered: Sep 2004
Location: VA
Distribution: Fedora
Posts: 20

Rep: Reputation: 0
Quote:
Originally Posted by Jongi
Here's what I now get
Code:
10.0.0.3:/nfs4exports/share1    /mnt/shares     nfs4    bg,user,users,suid,rw,exec,intr,wsize=32768,rsize=32768 0 0
If I have nfs instead of nfs4 I get the original error message. Both PCs are using FC7.
Code:
[root@Jongi-MythTV ~]# mount -a
mount: can't get address for Jongi-MythTV
[root@Jongi-MythTV ~]# ls /mnt/shares/
[root@Jongi-MythTV ~]#
Is 10.0.0.3 even on your network??? Your first post had 192.168.104.1 for your server. Might be why it can't find it.
You should be fine with just nsf as file system type
You prolly want the earlier code for your exports:
IF you are going to write files to the directory (usually a must for all /home) you will need rw option. Sync makes sure stuff is written right away, no waiting to write files
Not sure about the fsid, would have to read up on it.

You can check the following thread on setup too.
http://www.linuxquestions.org/questi...ight=nfs+setup

Last edited by drdosman; 07-29-2007 at 12:46 AM.
 
Old 07-31-2007, 02:49 PM   #6
hyjalsoul
Member
 
Registered: Jul 2007
Distribution: ArchLinux, Ubuntu, Slackware, Fedora
Posts: 46

Original Poster
Rep: Reputation: 15
the problem got solved happily,the /media problem is because I didn't create a folder, and the reason I can't mount /home is because I didn't turn off the autofs service on the server machine. Now the nfs is working. Thank you for all the people who posted here, I appreciate so much for your help. And I hope this thread can help other newbies to Linux.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Digital Picture Frame Project (nOOb's attempt) drdiesel Red Hat 1 05-16-2007 09:25 PM
nfs client on knoppix 3.9 - problem mounting nfs drive Rod Butcher Linux - Networking 1 09-21-2005 04:18 AM
Export directories via NFS nifflerX Linux - Networking 3 07-07-2005 01:21 AM
Which linux best for noob's?? ecology447 Linux - Distributions 11 07-07-2004 04:07 AM
NFS mounting directories 98steve600 Linux - General 1 01-24-2001 06:26 PM


All times are GMT -5. The time now is 07:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration