The autofs automounter provides this. It mounts file systems upon reference. There is no need for any scripts.
See Week 4 "NFS / Automounter" notes and lab work at : http://cis68c2.mikecappella.com/calendar.php
MrC
Printable View
The autofs automounter provides this. It mounts file systems upon reference. There is no need for any scripts.
See Week 4 "NFS / Automounter" notes and lab work at : http://cis68c2.mikecappella.com/calendar.php
MrC
Great! I'm glad you found the materials useful.
Cheers,
MrC
Excellent How-to. I have a suggestion for an addition (which one reader suggested above) that may save some clueless readers like myself hours of looking for a needle in a haystack. Users with edited /etc/hosts.allow and /etc/hosts.deny files may need to updated these files, either not to deny anyone (probably ok since it only listens locally) or, to be more secure, like this:
/etc/hosts.deny has to have this:
portmap: ALL
and /etc/hosts.allow has to have this:
portmap: 192.168.1. ALLOW
This blocks nfs to remote computers. I had originally had it set to deny but not to allow so I was getting this error:
mount: server:/home/joseph/files failed.
[with no explanation for why]
nice how-to, could someone make it sticky? :popcorn:
another edit:
second last line:
mount /files -> SUDO mount /files :)
could you try to distinguish between /files (mounting point/client-side) and /files (shared folder/server-side)?
so just in case a n00b like me doesn´t mix them up... :lolflag:
I'm hoping someone can help me with this.
I have 2 ubuntu computers both running Edgy.
I have an NFS share on PC called ubuntu, the share is called UbShr
The other computer is called Ubuntu-desktop (very original I know)
I need to have read and write access to the files and folders.
My FSTAB entry on ubuntu-desktop is this
192.168.0.107:/UbShr /mnt/UbuntuSh nfs rsize=8192,wsize=8192,timeo=14,intr
I followed this NFS how to
My exports entry is this (on ubuntu)
/media/maxtor/UbShr /192.168.0.1/24(rw.no_root_squash,async)
again I followed this same NFS how to guide.
I however get this error.
steve@Ubuntu-desktop:/mnt$ sudo mount -a
mount: 192.168.0.107:/UbShr failed, reason given by server: Permission denied
I know the IP of the computer is right (192.168.0.100) it's static on the router. Is it seeing the server but the server denies the mount. WHY?
I have restarted NFS kernel, exportfs -a and -r. I added lines in the hosts files of each computer.
I can ping the ip of the ubuntu pc but only by address not by name. By name gives me this;
ping: unknown host //ubuntu
Yes I need help.
There is a permissions problem with one of your exported directories:
All exported files and directories under the export directory need to provide sufficient privs for the mounting user (eg. all directories need to be at least 555, and UbShr needs to be 777).Code:ls -ld /media/maxtor/UbShr
ls -ld /media/maxtor
ls -ld /media
MrC
OK so I chmod'd the folders to 777, you were right the permissions weren't set right.
I then restarted the exportfs -a -r
I then restarted the NFS kernel
Now the bad news.
/media/maxtor/UbShr has been changed to 777
/media/maxtor has been changed to 777
I still have permission denied
Both computers are setup with the same user accounts and passwords (steve and *******)
Is there something samba's smbpasswd that needs to be done for NFS to work? Is there an NFS account that needs to be made?
The ip of ubuntu is 192.168.0.107
the ip of ubuntu-desktop is 192.168.0.100
I have something very strange happening on my ubuntu-desktop pc. Even though all entries the samba share have been commented out in the FSTAB file I have a persistent mount happening in
/mnt/UbSh
I don't know why it's mounting. I can reboot and it's still there. No entries in the FSTAB though. The folder is being shared both as SMB and NFS on the ubuntu pc does this matter? I noticed that the "shared folders" aplet doesn't seem to handle this very well.
when you first boot up, what does the command
mount
return, please paste the entire output. also, samba has nothing to do with NFS, they are 2 completely different protocols. also post
sudo cat /etc/fstab
sudo iptables -L
ls -la /media
and just because you see a folder called /mnt/UbSh doesn't mean that a samba network share is being mounted there. it just a folder on your computer. if there is stuff there, than that means that you put stuff there when the network share wasn't mounted so it's basically taking up room on the parititon that is mounted at /. unless of course you haev a seperate partition for /mnt but most don't. so make sure you post back everything I have asked and I can most likely help.
Quote;
and just because you see a folder called /mnt/UbSh doesn't mean that a samba network share is being mounted there. it just a folder on your computer. if there is stuff there, than that means that you put stuff there when the network share wasn't mounted so it's basically taking up room on the parititon that is mounted at /. unless of course you haev a seperate partition for /mnt but most don't. so make sure you post back everything I have asked and I can most likely help.
Unfortunately it is there. I stopped samba on the server and the files aren't there anymore. For some reason the share is being mounted without any reference in the FSTAB file. Yes I know it's strange but its true!
It may even have something to do with the access problem I'm experiencing. The trouble is I don't know.
OK,
So between Samba and NFS I tried using dmizer's unicode how to for samba shares and It worked.
The ghost mount of the share is gone and a proper RW share is established using samba.
I would really like to solve this NFS issue as well. It seems like it should be a good tool.
if you want my help than you need to provide what I asked for otherwise I can't help you troubleshoot if you don't give me any info..... post the output of everything i asked for as well as the following
sudo cat /etc/exports
ls -la /etc/init.d | grep nfs
ls /mnt/
Thanks for you willingness to help dannyboy79 I'll get to it tomorrow. I hope you're having a good Easter.
OK so here goes,
steve@ubuntu:~$ sudo cat /etc/exports
Password:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync) hostname2(ro,sync)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt)
# /srv/nfs4/homes gss/krb5i(rw,sync)
#
/media/maxtor/UbShr /192.168.0.1/24(rw,no_root_squash,async)
steve@ubuntu:~$ ls -la /etc/init.d | grep nfs
-rwxr-xr-x 1 root root 1087 2006-10-06 07:34 mountkernfs.sh
-rwxr-xr-x 1 root root 615 2006-10-06 07:34 mountnfs-bootclean.sh
-rwxr-xr-x 1 root root 6020 2006-08-31 14:38 nfs-common
-rwxr-xr-x 1 root root 3830 2006-08-31 14:38 nfs-kernel-server
-rwxr-xr-x 1 root root 1833 2006-10-06 07:34 umountnfs.sh
-rwxr-xr-x 1 root root 1939 2006-10-06 07:34 waitnfs.sh
ls /mnt/
Had absolutely no output
steve@ubuntu:~$ sudo iptables -L
Password:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
steve@ubuntu:~$ ls -la /media
total 28
drwxr-xr-x 7 root root 4096 2007-03-13 21:19 .
drwxr-xr-x 21 root root 4096 2007-03-23 15:09 ..
lrwxrwxrwx 1 root root 6 2006-11-16 15:28 cdrom -> cdrom0
drwxr-xr-x 2 root root 4096 2006-11-16 15:28 cdrom0
drwxr-xr-x 2 root root 4096 2006-11-16 15:28 cdrom1
lrwxrwxrwx 1 root root 7 2006-11-16 15:28 floppy -> floppy0
drwxr-xr-x 2 root root 4096 2006-11-16 15:28 floppy0
drwxrwxrwx 6 steve steve 4096 2007-02-23 11:53 maxtor
drwxr-xr-x 2 root root 4096 2006-11-20 13:59 mp3
Edit;
I just realized that I assumed something.
You wanted these commands run on the server (I use that term loosely, it serves files but is not actually an Ubuntu server install)
I did run them on the server if you want info from the workstation let me know.
Um, you have installed portmap and nfs-common on your client? (Just checking, i did it once too :-))
Thanks for the guide:)
I came close to posting a cry for help there after getting some silly permissions error half the morning...and some of the afternoon but eventually realised i had a "192.168.1.2" in my exports file as apose to the "192.168.0.2"it should have been](*,)
NOW we can go to the funfair kids :twisted:
Happy easter ppl
I'm having a similar problem to the dude with the melon on his head. ;)
I went about the shared folder setup a little differently, though. I just used the "Shared Folders" app (under System->Administration) on the machine doing the sharing, which is running 7.04.
My laptop (running 6.06) can't see the shared folder no matter what I do. Following the tuturial here isn't fixing the "Permission Denied" error, unfortunately.
On the bright side, remote desktop works like a champ. :D
the shared folder is only for setting up folders to share thru samba. I don't think you can share the same folders thru samba and NFS but I don't know for sure. If you followed the guide you wouldn't have made those folders shared thru the shared folder gui. just follow the guide.
I see other stuff relating to nfs within your /etc/init.d/ folder. DId you try to get automount to work with nfs? this could be the confussion. You can't share the same folder with automount and then do something manually with using your fstab file and nfs. I believe this is your issue I can't seem to find anything else. you already know you can't share the same folder with samba and nfs, at least not at the same time, you'll get premission denied because it's already mounted. and yes, I also need to
see some output from the workstation as that's the machine you're getting the access denided error on. I am betting that you have somethign in the workstation (client) that is already calling for this share. good luck
here's a link that helped out another guy who haad this same permission error.
http://forums.debian.net/viewtopic.p...7e50493081214c
Hi all,
I followed this howto and didn't get it working, for some reason I really can't understand.
This is the message i get when trying to mount:
Obviously the server is not "down", as you can see in this ps -A | grep nfs output:Code:mount to NFS server '192.168.2.222' failed: server is down.
Let's see if somebody can help me a little :PCode:2781 ? 00:00:00 nfsd
2782 ? 00:00:00 nfsd
2783 ? 00:00:00 nfsd
2784 ? 00:00:00 nfsd
2785 ? 00:00:00 nfsd
2786 ? 00:00:00 nfsd
2787 ? 00:00:00 nfsd
2788 ? 00:00:00 nfsd
Here goes my exports file in the server:
And here goes the line in the fstab file of the client machine:Code:/mnt/disc200/compartida 192.168.2.1/24(rw,no_root_squash,async)
/mnt/disc200/autocad 192.168.2.1/24(rw,no_root_squash,async)
/mnt/disc200/batxillerat 192.168.2.1/24(rw,no_root_squash,async)
/mnt/disc200/ESO 192.168.2.1/24(rw,no_root_squash,async)
/mnt/disc200/fotografia 192.168.2.1/24(rw,no_root_squash,async)
/mnt/disc200/primaria 192.168.2.1/24(rw,no_root_squash,async)
/mnt/Server/Documents 192.168.2.1/24(rw,no_root_squash,async)
Thanks in advance!Code:192.168.2.222:/mnt/disc200/compartida /media/compartida/ nfs rsize=8192,wsize=8192,timeo=14,intr
on the client, do you have a mount point called /mnt/disc200/compartida? if not, there is your problem. and from the looks of your fstab, that's what's wrong. also, did you make sure you did
sudo exportfs -a
from the server cause it appears as though the server is not working. did you do
sudo apt-get install nfs-kernel-server nfs-common portmap
not to mention you have a trailing slash (/) on the end of your client's mount point (/media/compartida/ versus /media/compartida )
I would just suggest following the guide verbatim and then post back.
I guess you mean if i have a mount point called /media/compartida, since the /mnt/disc200/compartida directory is on the server, that's why i added "/mnt/disc200/compartida 192.168.2.1/24(rw,no_root_squash,async)" to the exports file. Well, of course i do have that dir and that mount point on the server and the client respectively.
I did "exportfs -a" and it worked, and as you can see from the ps output, the server is running... so, if your solutions are exhaustive, it could only be the slash (and i hope so!) but, sincerely, most of the times "/foo/bar/" and "/foo/bar" are exactly the same... so it'd seem strange to me :) also, the error message says "server is down", while if it was an error from the client i guess it would say something like "mount point not found".
Anyway, now i'm at home, but tomorrow i'll try it at work and give you feedback, thanks a lot!
So as I suspected, the slash has absolutely nothing to do with the problem.
Actually some of the other lines of fstab mounting some partitions finish with a slash as well and work perfectly.
Does somebody have a clue about it? thanks!
as I stated, it appears as though your mount points are not matching up. according to the instructions, your mount point and the mount point your exporting need to be the same and your's are not. (mnt blah blah versus media blah blah) you wouldn't think that that would be it but it's worth a try right?
Also, here are some common Gotcha's for running NFS.
Ownership represented by numeric UID/GID values, which correspond to logins viathe /etc/passwd file on both client and server!(What if UIDs don't match?)
Security is a problem (e.g., can chown be used to give files away?).See Unix System Security Checklist for details.
NFS is a "stateless" protocol. What happens if the server goes down?
"NFS: stale file handle" error message means re-mount file systems
"Hard mount" is "Energizer Bunny" mode. Client keeps trying, and trying, and trying.... Unless interrupts allowed, client will "hang" until server comes back up
"Soft mount" means client gets an error message.
File locking can be a problem.
Easy to "waste" bandwidth by transferring files twice!(e.g., ftp to/from an NFS mounted file system on a client)
Forgetting to use -xdev (or -mount, etc)., when using find.
Differences in maximum block sizes between client/server file systems can cause programs to crash
Tried it, not working either :(
I needed to have the system working for today so i did it using smbfs, thanks anyway!
I can tell ya right now that cifs works better than smbfs in my own experience. it's to bad that you couldnt' troubleshoot longer and figure out what's wrong because the guide does work so if you're using feisty it's possible that something happened to NFS in Feisty
yeah, you know... companies put pressure :)
I'll keep investigating though, the thing is that the server is not running ubuntu but debian, so maybe the guide doesn't exactly fit it... when i have time and the server is not to be used for a while i'll try installing feisty server.
according to a more general NFS server guide, you should run this
rpcinfo -p
to see if the server is running the correct services. you should see something like this returned.
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100011 1 udp 749 rquotad
100011 2 udp 749 rquotad
100005 1 udp 759 mountd
100005 1 tcp 761 mountd
100005 2 udp 764 mountd
100005 2 tcp 766 mountd
100005 3 udp 769 mountd
100005 3 tcp 771 mountd
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
300019 1 tcp 830 amd
300019 1 udp 831 amd
100024 1 udp 944 status
100024 1 tcp 946 status
100021 1 udp 1042 nlockmgr
100021 3 udp 1042 nlockmgr
100021 4 udp 1042 nlockmgr
100021 1 tcp 1629 nlockmgr
100021 3 tcp 1629 nlockmgr
100021 4 tcp 1629 nlockmgr
this is all according to this guide: http://tldp.org/HOWTO/NFS-HOWTO/server.html#VERIFY
good luck
I have used this setup before and it worked great with my 100 meg router. I have since changed over to a 1gig router and three out of my four computers have 1 gig ethernet ports. I'm having trouble with the files stalling during copy & pasting. The transfer with work for 2 - 3 seconds and stalls for 10 - 15 seconds. This cycle continues until it is finished. Tis scenario happens between any computer ie 1 gig to 1 gig or 1 gig to 100 meg. Is there anything that needs to be setup differently since I changed routers or something else?
Thanks
I have changed over to Feisty since the last post. I ran a test with a 7 GB file and it transfered at a rate of 1 GB per minute. I'm not sure if this is good or bad but I didn't see the stalling as I did using KDE. Please advise.
Thanks
Bump...bump!
what would you like to know? i read your post as a comment and not a question.
The fact that your 7gigabBYTES file transferred in 7 minutes sounds low when you look at the raw numbers!
It's due to the PCI bus limitation and packet overhead. A 32bit wide PCI bus running at 33 Mhz, would give it a theoretical speed of about 130 MB/s. Now you would have to split that between the Ethernet Card and the Hard drive since you are transferring data, that would result in about 65MB/s or 3900MB/minute. You're saying your transfer went at 1gigaBYTE/s or 1024MB/minute (that's about 17MB/sec). That's double what I get thru Samba!
It's often troubleshooting network transfer speeds as there are so many variables. I have never used NFS but I do know it's way faster than Samba as I can only get around 8MB/s with samba.
So why did you bump your post? If you're wondering if your transfer speed is alright I would say YEAP, you are transferring files pretty fast. You'll never see 128MB/second
Yes I was looking for an answer as to if the transfer rate was good or bad.
Thanks
I'm posting this to save somebody the 90 minutes of cursing I just went through trying to figure this out. When mounting a SimpleShare drive with NFS, you have to ID the drive differently than you do for Samba.
For Samba, mounting my Photos Folder looked like this (from my fstab file):
However, to mount the same folder in NFS, it has to look like this.Code://mediaserver/Photos /mnt/photos smbfs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode 0 0
This assumes you have not screwed with the default disk pool set up. I have no idea why it needs that the fully qualified path, but it does. Not using it will get you permission denied errors.Code:mediaserver:/shares/SimplePool/Photos/ /mnt/photos nfs rsize=8192,wsize=8192,timeo=14,intr
You could have saved yourself the 90 minutes and your bllod pressure level if you had read the guide more closely as it already stated that. From the very first page, if you want to add the mount to your fstab, the syntax should be: server.mydomain.com:/files /files nfs rsize=8192,wsize=8192,timeo=14,intr
Which if I am not mistaken, is exaclty what you are telling us again. I guess thanks anyway for the other readers who don't follow the guide precisely.
Hi:
I´m new and I now the last post here was a while ago, but I still wanted to follow a thread.
I´ve found this thread very helpfull... but i´m still stuck on something. I set up a freeNas box so I could share a common folder with several computers. After having great trouble ironing out permissions problems, I finally got full ownership and rw permissions.
However, until now, I can only manually mount the share. Although I have a "auto" option in my fstab, nothing happens until i issue the "mount /local/share/name" comand. ¿Is this supposed to be like this? ¿I though that putting mounting points in fstab (with the correct options: "auto"?) made the whole process automatic?
I tried to fiddle with autofs but was not sucessfull. I´m not too concerned about server/client load just yet. If it was not for this detail, I would be great. I´m going to set up a login script and see how it goes, but I would really like my fstab to work. ](*,)
Also, I have my mount point on the desktop. When I mount the share, another folder appears there with the same name and a "connected tube" personalized icon (with an "nfs" tag on it). Both folders work, in fact they point to the same place. I don´t get it? If I have to create a folder in the first place, why does it then go an make another one? Or is it because most of the time (generally) you mount under the /mnt directory, and nfs-common tools are being helpfull and putting an icon on the desktop?
My fstab setup looks like:
Quote:
freenas:/mnt/sharename /home/Desktop/sharename nfs rw,auto,user,rsize=8192,wsize=8192,intr,soft,retry =5,timeout=20,port=2049
Thanks a lot for any help!!!
EDIT: I rather answered my own question and my mounts work properly. I rewrote fstab to:
freenas:/mnt/sharename /mnt/sharename nfs rw,auto,user,rsize=8192,wsize=8192,intr
And now it works like I was looking for. The user dosen´t have to dive into /mnt, but the share appears on the desktop ... so, that it.
I did the export and mount read-write (rw) but I can still only read. If I try to write I get an error that says "read-only filesystem".
and who is the owner of the folder you mounted your exported NFS share to? also, what are the permissions on that folder? those would be the last 2 things to check
Here are more details... There are 2 computers (say A and B). Each 1 has a single user on it (but different from each other), i.e. computer A has user A and computer B has user B. I want to set up a world-writable directory (called "Xfer") under user A's home directory (on computer A) so that user B, working on computer B, can copy documents to computer A for user A to work on.
I created the /home/A/Xfer directory, on computer A, owned by user A, with "777" permission (i.e. world-writable). I set up a read-write (rw) /etc/exports line on computer A for that directory and a mount point and read-write (rw) /etc/fstab line on computer B to access it.
On computer B, the mount suceeds and I can read files in /home/A/Xfer, but I can't write or create files there. If I try (e.g. using the "touch" command), I get a "read-only filesystem" error.
ok, again, I'll ask the same question, who is the owner of the folder where you are mounting the /home/A/Xfer folder on computer B? Where is the mount point, what does your computer B fstab file look like, and what are the permissions?????
Caveat: Say "nnn" then go "oooo" for about five minutes, then say "b".
I found this guide very helpful and have been able to share folders on my laptop with my desktop computer and vice versa. Thank you.
I'm wondering...
Is it possible to share a folder on an ntfs disk via nfs? Both machines running Kubuntu Feisty? Or must I use samba?
Is it necessary for a folder to be somewhere in /home[/...] in order to share it?
Is it possible to share a symbolic link? I have a folder on my desktop that is actually just a link (in Windows we called them shortcuts) to the ntfs folder. Can I share that?
I have tried these things, but there is so much opportunity for missed slashes and misspellings. Thought I'd ask if these things were even possible before I spent more time on them.
Thanks in advance
Once a file system is mounted, it does not matter what type it is - you can share it with NFS.
You can NFS export any directory; it does not have to be in /home.
It doesn't make sense to share a symbolic link. A symbolic link is a file that has some special indirection properties. What are you trying to do here?
MrC
Mr C
Thanks for the quick answer.
Not necessary to share the link. I was using it to try to get around the restriction (which does not exist!) that you can share only in /home[/...]
So I guess it's my spelling. will keep trying
Thanks again
******************
Still banging my head.
I'm trying to share
/media/sda1/dirname
sda1 is a data disk from Windows days. It's 500GB of NTFS. A SATA drive, in case that matters.
I have given mode 777 to everything in the path, even though I have shared directories that do not have full 777 permissions.
I have tried to sudo mount -t ntfs and was told "special device not present"
When I try to mount without -t then it just says "permission denied". Using sudo.
I am able to share at will on the main GNU/Linux partition.
I guess I should try mounting as root. Every time I write PART TWO of this I think of something else to do. Sheesh. Well, I'll leave this up. If there is a reason I can't share /media/sda1 I would love to know before my brain goes soft. Ooops. Too late.
TIA
So I kind of chickened out. After another hour or so it occurred to me that there is no reason to keep the disk in NTFS. My goal is to be Free by September.anyway so why spend more time on this?
I copied the files to a directory on another disk,used gparted to delete the ntfs partition and create an ext3 one., copied everything back, and the NFS shares I set up yesterday worked perfectly.
I'm hesitant to say that this is clear evidence that it was something Wiindowish that was the problem. It's possible that what I did reset a lot of stuff.
In case no one has mentioned it yet, in Kubuntu you can set up NFS shares in a GUI under Settings/Shared Folders. You specify which directory you want shared, which network you want to share it with ( NFS or Samba), and who gets access. In the case of NFS, this configures /etc/exports for you with (rw) privieges. You still have to
sudo exportfs -a
but after that it's ready to be mounted by the other machine(s).
Thanks again for the help and the great howto.
I am trying to allow my Yellow Dog Linux distro installed on my PS3 to mount my files on my Ubuntu PC. I followed the instructions, but am getting this error on my client machine (YDL on PS3)...
"failed, reason given by server: Permission denied."
Any thoughts?
The issue raised by jabb and george_apan is resolved in this post.
the above link takes you to a blank page? Also, it's much easier to copy and paste for users unless of course it's to much for your copy and paste (clipboard limit?) or unless the page is more than just text.
What happens if I have a dynamic ip address ?
Say I have 2 laptops, I want one to share files to another via NFS.
Problem is that I have dynamic ip for both of them since they connect through a router.
So, if I write this:
/home/czar/tmp 192.168.1.1/24(rw,no_root_squash,async)
next time I will start my host laptop the ip for the host can be different, meaning I have to change it on the client.
Is there any other way to connect maybe via laptop name or MAC address or something ?
you didn't read it correctly, what this line on the NFS server does is allow ANY ip address within that range (192.168.1.1 thru 192.168.1.255) to connect to the server.
The client is where you'll want to call out the system name of the machine or hostname by either manually mounting it or putting it in your fstab.
"The client is where you'll want to call out the system name of the machine or hostname by either manually mounting it or putting it in your fstab."
Where do I on the Host machine edit my l name of the machine ? I only found in manual configuration that I can define host name.
I set my host name to be: laptopishe
Now, on the client side. this command
sudo mount laptopishe:/home/user/media /media/user2/shares
tells me that "can't get address for laptopishe"
What is the problem ?
Either use static IP addresses (which is a function of how you configured your systems, not of your router), or export your file systems to your entire subnet.
The address range you are using makes no sense (192.168.1.1/24). 192.168.1.1 is a HOST address, yet /24 is a subnet specifier. You'd want either 192.168.1.1 (for a single host) or 192.168.1.0/24 (for tghe entire subnet).
If you are going to use dynamic IP addresses, then hostnames will not be an option unless you change the pair in /etc/hosts, or configure a dynamic updating DNS server (which sounds beyond what you're likely to do right now).
The NFS client and server software, and Unix / Linux server software in general, was developed with static IPs in mind - server's should not be changing IPs.
MrC
He is doing everything correctly. If you're going to try to help please be aware of what you're saying.
192.168.1.1/24 means the IP address of 192.168.1.1 with a CIDR of /24, or class 1 C network, and netmask of 255.255.255.000. This effective means a range from 192.168.1.0 to 192.168.1.255, 256 hosts.
(NOTE: I copied and pasted the above info, credit goes to the author of post #28 within this thread)
NOt only is he following the guide bit for bit, but it's correct even if the guide didn't say to do it that way.
As far as hostname resolution, it sounds like you don't have it setup properly. I haev written up a little explaination on hostname resolution options within a linux/windows mixed environment. (http://ubuntuforums.org/showthread.php?t=391601) If you don't want to read it, then I would just suggest you setup a static ip on the server and just use that instead of the hostname.
Danny, your combative, threatening, and policing responses get tiresome. Please stop.
While the address specified *may* work in some implementations or situations, it is technically incorrect, and *will* fail with some software (such as bind). The specification being used is confusing at best, because it violates common practice and shows a misunderstanding of CIDR.
The correct and commonly practiced mechanism to show a range if IP addresses is to specify the network IP along with the host part of all zeros, as in 192.168.1.0/24. This is unambiguous, clear to all, and doesn't rely on how the software might parse net and host parts. The specification 192.168.1.1/24 is confusing at best, as it is not clear that the author meant a single IP address, or a range from 1 to 255, or 0 to 255. It becomes even more confusing with non 8-bit aligned networks. You may examine all examples in the Wikipedia link references in post #28, and more importantly, in RFC 4632:
http://tools.ietf.org/html/rfc4632
I teach the background, theory, and principles; i have no interest in matching up with some (possible naive, or incorrect) user's guide or posts. The response in #28 is not authoritative.
MrC
To the original author.
Thanks a lot!
I can reconfirm (others have already done so) that this works for UFF just as stated.
Regards
Luis
I still need help. When I try to mount from the client I get this error:
mount to NFS server '192.168.10.200' failed: server is down.
I have all of the parts and pieces configured exactly as stated on the orginal post, on the client and server, but I still cannot connect.:(
I am setting up a VMWare image just for FTP but I don't want a 200G VMware image. All of the data for the FTP server is on the host machine with the NFS share and the client is in a VM.
Hi.
See if /etc/network/interfaces is setup correctly, ...in my own case, this would be my configuration
Sorry if this is not the correct answer but I've not seen previous posts..Code:# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.50
netmask 255.255.255.0
network 192.168.1.1
broadcast 192.168.1.255
gateway 192.168.1.254
Kind Regards
Luis
My /etc/network/interfaces is setup very similar. The network works fine, Internet, ICMP etc..
I am currently doing a tcpdump on the client. The client is tring to communicate with the server by IP on the sunrpc port and then it changes to port 48482. The server never replies. Every couple seconds the server does a reverse-arp for the client by name with no answer.
AVOID FRUSTRATION! MAKE SURE YOU CHECK YOUR FIREWALL!
I could not get my Ubuntu laptop client to connect to the NFS server. I kept getting "failed: server is down".
I rechecked everything in my exports folder and my mount command. All looked OK. After two days of swearing and begging, I thought "FIREWALL"
I fired up the GUI Firestarter on the server and noted that I had setup INBOUND rules. I added the IP of the client and BINGO it worked.
BTW what is the syntax for allowing all IPs on my network to the inbound rule?
hey, im new to linux and i'm trying to setup NFS server but i cant find the /etc/exports file in my installation and i have no internet connection on the machine. is there somewhere i can download the files i need on this machine copy them to usb and then install them on the linux machine?
Having issues with Ubuntu NFS & VMWare so I'll post the setup and let the guru's check it out.
I have 3 HP dc7700 workstations for my testing. 1 with Ubuntu Feisty (7.0.4) and 2 with VMWare ESX 3.0
NFS Setup:
Ubuntu 7.04 (feisty), I am remote controlling via tightvnc
IP: 192.168.14.235
Subnet Mask: 255.255.254.0
Shared folder /svr
Here's a copy of my terminal:
So, it would seem that NFS is set up. Now, I move over to my VMWare test box.Code:alloy@asc-nfs:/etc$ sudo apt-get install nfs-kernel-server nfs-common portmap Reading package lists... Done
Building dependency tree
Reading state information... Done
nfs-kernel-server is already the newest version.
nfs-common is already the newest version.
portmap is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
alloy@asc-nfs:/etc$ sudo dpkg-reconfigure portmap
* Stopping portmap daemon... [ OK ]
* Starting portmap daemon... [ OK ]
* Restoring old RPC service information... [ OK ]
There are RPC services which registered with the portmapper before the configuration was changed.
You need to manually restart them in order for the changes to take effect.
Current registered services:
------------------------------------------------
100024 1 udp 32771 status
100024 1 tcp 60132 status
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100021 1 udp 32796 nlockmgr
100021 3 udp 32796 nlockmgr
100021 4 udp 32796 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 tcp 59301 nlockmgr
100021 3 tcp 59301 nlockmgr
100021 4 tcp 59301 nlockmgr
100005 1 udp 1000 mountd
100005 1 tcp 1003 mountd
100005 2 udp 1000 mountd
100005 2 tcp 1003 mountd
100005 3 udp 1000 mountd
100005 3 tcp 1003 mountd
------------------------------------------------
alloy@asc-nfs:/etc$ sudo /etc/init.d/portmap restart
* Stopping portmap daemon... [ OK ]
* Starting portmap daemon... [ OK ]
alloy@asc-nfs:/etc$ sudo /etc/init.d/nfs-kernel-server restart
* Stopping NFS kernel daemon [ OK ]
* Unexporting directories for NFS kernel daemon... [ OK ]
* Exporting directories for NFS kernel daemon... [ OK ]
* Starting NFS kernel daemon [ OK ]
alloy@asc-nfs:/etc$ sudo exportfs -a
I log in with the VI Client to the machine @ 192.168.14.236
Here's an image of my net settings:
http://www.4cpp.com/images/vmware_nic.jpg
So, I go to storage -> Add Storage and I select Network File System
Like so:
http://www.4cpp.com/images/vmware_storage.jpg
http://www.4cpp.com/images/vmware_storage2.jpg
I see the message like this:
http://www.4cpp.com/images/vmware_storage32.jpg
And then error!
http://www.4cpp.com/images/vmware_storage_err.jpg
Any idears?
Thanks,
~Shop
--ALSO--
My exports has 1 entry
/svr 192.168.14.233(rw,no_root_squash,async,subtree_che ck) 192.168.14.234(rw,no_root_squash,async,subtree_che ck) 192.168.14.235(rw,no_root_squash,async,subtree_che ck) 192.168.14.236(rw,no_root_squash,async,subtree_che ck) 192.168.14.237(rw,no_root_squash,async,subtree_che ck)
I'm not exactly sure, but I think this file is created by "portmap or by nfs-kernel" (I could be wrong) and the next thing you must do once you create the file is to to insert a line like this:
So in order to give you an idea my file looks like this:Quote:
/home/your_user_name/Your_exported_file XXX.XXX.XXX.XXX/24(rw,no_root_squash,async)
As you can see, 192.168.1.1/24 is granting read and write access to everybody in my Music network folder.Quote:
/home/luis/Musica 192.168.1.1/24(rw,no_root_squash,async)
I hope this will help u.
Regards
Luis
@Shop
Your problem above looks like it is realted to Router access (not sure but I see no otheroption)
I'm getting a "permission denied" error, and find by reading /var/log/syslog that
My hosts.allow:Code:Sep 4 00:48:47 server mountd[6466]: mount request from unknown host 192.168.2.7 for /public (/public)
and exportsCode:rpc.mountd portmap mountd nfsd statd lockd rquotad : 192.168.2.*
Any ideas about how I can fix this?Code:/public 192.168.2.*(rw,no_root_squash,async,subtree_check)
I do not think you can use * as a wild card here.
Try 192.168.2.0/255.255.255.0 or 192.168.2.1/24
So in hosts.allow
ALL: 192.168.2.0/255.255.255.0
And in exports
/public 192.168.2.1/24