LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-28-2011, 03:25 PM   #1
formar
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Rep: Reputation: 0
Noobie NFS4 question


**Edit: path for mount was incorrect
Distro
Server: CentOS 5.5

Clients:
Fedora(latest)
OSX(latest)

Backround
I am attempting to setup a server in my house mostly(for the first time) for backups and file sharing. It is important to me that file permissions are preserved. So its my understanding that I must use idmapd in order for this to work. As of now I'm only working with the linux distros while osx will be dealt with once these two work together. portmapper is up and running, along with lockd on both machines. Firewalls are also down on both machines for now. The server side was all setup using the GUI interface with no extra options selected.

Problem
When attempting to "mount -t nfs4 10.0.0.2/$sharedfolder /mnt" I get an error operation not permitted with no error printing in /var/log/message. If I use "mount -t -o nolock nfs4 10.0.0.2/$sharedfolder /mnt" it mounts just fine. Ive checked both machines multiple times to make sure that lockd is up and running. In the idmapd.conf file I the domain as "localdomain" for both machines but I doubt that is right; like I stated above this is my first attempt at a server. I'm assuming the problem is a whole missing step that involves some kind of id mapping server I need to setup. If someone could point me in the right direction it would be much appreciated.

Thanks for your time
Anthony

*also UID and GID are the same on both machines

Last edited by formar; 01-28-2011 at 04:00 PM.
 
Old 01-28-2011, 03:50 PM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Can you paste your /etc/exports file? Do you known that in NFS4 has changed format in comparison to NFS3?

Last edited by eSelix; 01-28-2011 at 04:08 PM. Reason: My mistake
 
Old 01-28-2011, 04:05 PM   #3
formar
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by eSelix View Post
Can you paste your /etc/exports file?
/tmp 10.0.0.0/24(rw,async,nohide,no_root_squash)

Quote:
Originally Posted by eSelix View Post
Do you known that in NFS4 has changed format in comparison to NFS3?
I did not though I seem to get the same error either way, but thank you I'm sure you saved me some confusion after i fix this problem =D
 
Old 01-28-2011, 04:11 PM   #4
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
So you have configuration for NFS3. To mount directory exported that way try:
Code:
mount -t nfs 10.0.0.2/tmp /mnt
Give answer if this works or if you prefer NFS4.
 
Old 01-28-2011, 04:19 PM   #5
formar
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Wow special does not quite explain that....oversight. Thanks though! It did work though I would prefer nfs4 simple for the learning experience. Where/How did I go wrong?
 
Old 01-28-2011, 04:38 PM   #6
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
For NFS4 you have to:
1. Define root directory for sharing, for example I have /srv/nfs.
2. Create there directories which will act as mountpoints for shared directories, for ex.
Code:
mkdir -p /srv/nfs/tmp
mkdir -p /srv/nfs/Music
3. Mount there with option bind what you want to share, by fstab or manualy, for example in fstab
Code:
/tmp /srv/nfs/tmp none auto,bind 0 0
/home/data/Music /srv/nfs/Music none auto,bind 0 0
4. Modify /etc/exports (note fsid option):
Code:
/srv/nfs       10.0.0.0/24(rw,async,nohide,no_root_squash,fsid=0)
/srv/nfs/tmp   10.0.0.0/24(rw,async,nohide,no_root_squash)
/srv/nfs/Music 10.0.0.0/24(rw,async,nohide,no_root_squash)
5. And if you want to mount on the client you first specify -t nfs4 and second give path relative to root defined on the server in 1. point:
Code:
mount -t nfs4 10.0.0.2/tmp /mnt/tmp
mount -t nfs4 10.0.0.2/Music /mnt/Music
I think, you can also mount whole structure, but I do not tested that:
Code:
mount -t nfs4 10.0.0.2/ /mnt
 
  


Reply



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
nfs4 - mount.nfs4: access denied by server while mounting edwin11 Linux - Networking 1 12-07-2010 10:06 AM
NOOBIE C++ Question donaldfarkas Linux - Newbie 16 10-15-2010 03:12 PM
Noobie Command Question help!! pheardotcom Linux - Newbie 3 10-29-2008 09:23 PM
Noobie rpm question itz2000 Linux - Newbie 4 08-31-2007 06:37 PM
smart noobie question alaios SUSE / openSUSE 1 10-27-2006 10:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:35 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration