LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-15-2007, 08:11 PM   #1
tiger.woods
Member
 
Registered: Mar 2006
Posts: 122

Rep: Reputation: 15
FSTAB and exports...


I have what I think is a quick question for someone with more Linux knowledge than myself.

I've created an export in my /etc/exports file on my server that I want to mount on my client via /etc/fstab.

I think I've set up the exports correctly - /directorytoexport 192.168.1.1(rw,no_root_squash,async) and the fstab correctly on the client - 192.168.1.1:/directorytoexport /directorytomount nfs rw, defaults 0 0

The share is identified on the client but is unmounted even after rebooting and I'm having a problem manually mounting it, the sytem just hangs. Anyone have any ideas what I've done wrong???

This is on an Ubuntu Edgy if that help.

T.I.A

TW,
 
Old 02-15-2007, 08:19 PM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,410

Rep: Reputation: 141Reputation: 141
"I think I've set up the exports correctly - /directorytoexport 192.168.1.1(rw,no_root_squash,async) and the fstab correctly on the client - 192.168.1.1:/directorytoexport /directorytomount nfs rw, defaults 0 0"

It's hard to figure out exactly what's in which file the way you have it posted. It's much easier on us if you either put the entries on separate lines, or if it's more than a couple of lines, enclose it within [ code ] and [ /code ] blocks. Is it possible that what you really want is:

/directorytoexport 192.168.1.0(rw,no_root_squash,async)
or perhaps
/directorytoexport 192.168.1.y(rw,no_root_squash,async)

where 192.168.1.y is the system you are wanting to export to

and

192.168.1.x:/directorytoexport /directorytomount nfs defaults 0 0

Where "x" is the correct number from your exporting system.


Here is an example of a working export in my /etc/exports file, if that's any help:

/data 192.168.1.0/255.255.255.0(ro,sync)

Last edited by Quakeboy02; 02-15-2007 at 08:21 PM.
 
Old 02-15-2007, 08:40 PM   #3
tiger.woods
Member
 
Registered: Mar 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Sorry about that. Yes, I want to export to a particular IP.

/directorytoexport 192.168.1.1(rw,no_root_squash,async)

and yes you are correct it was a typo on my behalf so the fstab should have read -

192.168.1.2:/directorytoexport /directorytomount nfs defaults 0 0

Since I'm seeing the directory on the client, it's just unmounted, wouldn't that mean it's been correctly exported? Would that leave me looking at the fstab for the problem?

[EDIT] after a long delay at the terminal I was able to mount the directory manually. Why isn't it mounting via the fstab?

Last edited by tiger.woods; 02-15-2007 at 08:59 PM.
 
Old 02-15-2007, 09:00 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,410

Rep: Reputation: 141Reputation: 141
"Since I'm seeing the directory on the client, it's just unmounted, wouldn't that mean it's been correctly exported? Would that leave me looking at the fstab for the problem?"

I don't understand what you mean by this. How can you see it if it's unmounted? Do you just mean that you can see your mountpoint? You did create a directory for the mountpoint, right?

I just hacked together an fstab entry and made sure it mounted. Maybe this will help?

192.168.1.10:/data /wendy nfs ro 0 0
 
Old 02-15-2007, 09:08 PM   #5
tiger.woods
Member
 
Registered: Mar 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Well I guess it's the mount point that I'm seeing? It's a picture of a drive and when I hover over it the tooltip says, "unmounted NFS share".

Since I finally was able to get it to mount manually from the command line it now says, "Mounted NFS share". It should have mounted via fstab on the reboot...

"192.168.1.10:/data /wendy nfs ro 0 0"

Won't this set the drive as read-only "ro"? I'm not familiar with all the fstab jargon needed to mount a drive so I was kind of guessing as to what I needed.

thanks,
 
Old 02-15-2007, 09:22 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,410

Rep: Reputation: 141Reputation: 141
Won't this set the drive as read-only "ro"? I'm not familiar with all the fstab jargon needed to mount a drive so I was kind of guessing as to what I needed.

Hey, don't count on that being the best or even right way to do this. I just hacked it together by guessing. I don't mess with fstab much, so there might be other stuff that should be added for nfs mounts. I dunno.

Good luck. At least you have something working, now. Look to the man pages now. You should know enough at this point to be able to follow what it says.
 
Old 02-15-2007, 11:46 PM   #7
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
I encountered this problem and you need to install 2 packages on your client(s)

Code:
sudo aptitude install portmap nfs-common
BAM! All done. Your exports will mount quickly and will mount on boot up in /etc/fstab

This is how my fstab looks like on the client:
Code:
192.168.1.1:/home /home nfs auto,rw,hard,intr 0 0
Remember, NO WHITE SPACE in /etc/fstab. In other words, no space after the comma

Last edited by Micro420; 02-15-2007 at 11:52 PM.
 
  


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
NFS exports ip masking jxrod2000 Linux - Networking 1 07-12-2006 04:55 AM
X exports to server, never out Doc Hodges Linux - General 1 02-19-2005 09:02 PM
Exports Walter Sobchek AIX 13 06-16-2004 01:25 PM
/etc/exports in Solaris retoon Solaris / OpenSolaris 7 06-19-2003 08:13 AM
/etc/exports: insecure meshcurrent Linux - Security 2 03-16-2003 04:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 08:47 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