Ubuntu This forum is for the discussion of Ubuntu Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-15-2007, 08:11 PM
|
#1
|
Member
Registered: Mar 2006
Posts: 122
Rep:
|
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,
|
|
|
02-15-2007, 08:19 PM
|
#2
|
Senior Member
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,410
Rep: 
|
"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.
|
|
|
02-15-2007, 08:40 PM
|
#3
|
Member
Registered: Mar 2006
Posts: 122
Original Poster
Rep:
|
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.
|
|
|
02-15-2007, 09:00 PM
|
#4
|
Senior Member
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,410
Rep: 
|
"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
|
|
|
02-15-2007, 09:08 PM
|
#5
|
Member
Registered: Mar 2006
Posts: 122
Original Poster
Rep:
|
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,
|
|
|
02-15-2007, 09:22 PM
|
#6
|
Senior Member
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,410
Rep: 
|
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.
|
|
|
02-15-2007, 11:46 PM
|
#7
|
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:
|
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.
|
|
|
All times are GMT -5. The time now is 08:47 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|