Author Topic: (SOLVED) network sharing with NFS, please help  (Read 2010 times)

Offline hankcurt

  • Sr. Member
  • ****
  • Posts: 446
Re: network sharing with NFS, please help
« Reply #15 on: September 25, 2010, 07:10:20 AM »
Hi Bullit,

I just wanted to stop you from doing something you might regret.  The /etc/fstab file is not involved in exporting files over NFS.  You don't want to delete it, your system will not boot if you do.

The /etc/exports file contains the NFS share configuration that the NFS server uses to share files.  You could look at it and see if the entries look like you want.

It seems to me you have a networking problem, because your machines can see their own shares.  Are you running a firewall on either of the computers?  That could be blocking ports that NFS needs.
« Last Edit: September 25, 2010, 07:13:32 AM by hankcurt »

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: network sharing with NFS, please help
« Reply #16 on: September 25, 2010, 07:24:57 AM »
No luck.  I really think I need to clean out the NFS network config file.  However, I'm not sure which one it is, I think it fstab.  Any thoughts on that?


Check PCC - System - Manage System services and ensure the following entries are present and ticked to start at boot

netfs
network
network-up
nfs-common
nfs-server

If you have to change any, reboot and check the shares again although it should not be necessary.

regards.
« Last Edit: September 25, 2010, 07:26:36 AM by JohnBoy »

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: network sharing with NFS, please help
« Reply #17 on: September 25, 2010, 07:31:57 AM »
Hi Bullit,

I just wanted to stop you from doing something you might regret.  The /etc/fstab file is not involved in exporting files over NFS.  You don't want to delete it, your system will not boot if you do.

The /etc/exports file contains the NFS share configuration that the NFS server uses to share files.  You could look at it and see if the entries look like you want.

It seems to me you have a networking problem, because your machines can see their own shares.  Are you running a firewall on either of the computers?  That could be blocking ports that NFS needs.

Just to clarify one part of that .....  the entries for mounting the shares are in the fstab file.
When NFS shares are set up using PCC those entries are made automatically for you.

So if you manually added entries to the fstab file previously, it would be a good idea to delete those entries again, so they do not interfere with the new setup. Alternatively you could just put a ' # ' in front of the line which will prevent it from being used.

A couple of fstab entries here as examples .....

Code: [Select]
192.168.3.12:/mnt/1.5TB/Films /mnt/Films nfs rsize=8192,wsize=8192,nosuid,soft 0 0
192.168.3.12:/mnt/1.5TB/Music /mnt/Music nfs rsize=8192,wsize=8192,nosuid,soft 0 0

Bullitt

  • Guest
Re: network sharing with NFS, please help
« Reply #18 on: September 25, 2010, 07:49:03 AM »
Hi Bullit,

I just wanted to stop you from doing something you might regret.  The /etc/fstab file is not involved in exporting files over NFS.  You don't want to delete it, your system will not boot if you do.

The /etc/exports file contains the NFS share configuration that the NFS server uses to share files.  You could look at it and see if the entries look like you want.

It seems to me you have a networking problem, because your machines can see their own shares.  Are you running a firewall on either of the computers?  That could be blocking ports that NFS needs.

I waited to get a response so I have not touched the fstab yet.  I did take a look at it and it shows that each machine is pointing to itself.  Notice entry two, this is the machine I am currently on so it is pointing to itself.

# Entry for /dev/sda5 :
UUID=8c5afc48-f175-40a8-af84-d93bb663f46e / ext4 defaults 1 1
none /dev/pts devpts defaults 0 0
# Entry for /dev/sda7 :
UUID=4251f8a3-a1d2-452e-9528-def14727f357 /home ext4 defaults 1 2
linux:/home/jan/Documents /mnt/Documents nfs rsize=8192,wsize=8192,nosuid,soft 0 0
none /proc proc defaults 0 0
# Entry for /dev/sda6 :
UUID=7245b3eb-9b46-45e4-84fa-4b7f6c2be128 swap swap defaults 0 0

I do have the firewall active, however, I opened the port for both samba shares and NFS shares.

« Last Edit: September 25, 2010, 07:51:12 AM by Bullitt »

Bullitt

  • Guest
Re: network sharing with NFS, please help
« Reply #19 on: September 25, 2010, 08:01:19 AM »
Hi Bullit,

I just wanted to stop you from doing something you might regret.  The /etc/fstab file is not involved in exporting files over NFS.  You don't want to delete it, your system will not boot if you do.

The /etc/exports file contains the NFS share configuration that the NFS server uses to share files.  You could look at it and see if the entries look like you want.

It seems to me you have a networking problem, because your machines can see their own shares.  Are you running a firewall on either of the computers?  That could be blocking ports that NFS needs.


Just to clarify one part of that .....  the entries for mounting the shares are in the fstab file.
When NFS shares are set up using PCC those entries are made automatically for you.

So if you manually added entries to the fstab file previously, it would be a good idea to delete those entries again, so they do not interfere with the new setup. Alternatively you could just put a ' # ' in front of the line which will prevent it from being used.

A couple of fstab entries here as examples .....

Code: [Select]
192.168.3.12:/mnt/1.5TB/Films /mnt/Films nfs rsize=8192,wsize=8192,nosuid,soft 0 0
192.168.3.12:/mnt/1.5TB/Music /mnt/Music nfs rsize=8192,wsize=8192,nosuid,soft 0 0


Are you suggesting that I may need to load some other network programs from the package manager?  By looking at my fstab, I do not see any of those entries.  (See below)

# Entry for /dev/sda5 :
UUID=8c5afc48-f175-40a8-af84-d93bb663f46e / ext4 defaults 1 1
none /dev/pts devpts defaults 0 0
# Entry for /dev/sda7 :
UUID=4251f8a3-a1d2-452e-9528-def14727f357 /home ext4 defaults 1 2
linux:/home/jan/Documents /mnt/Documents nfs rsize=8192,wsize=8192,nosuid,soft 0 0
none /proc proc defaults 0 0
# Entry for /dev/sda6 :
UUID=7245b3eb-9b46-45e4-84fa-4b7f6c2be128 swap swap defaults 0 0

Bullitt

  • Guest
Re: network sharing with NFS, please help
« Reply #20 on: September 25, 2010, 08:05:55 AM »
No luck.  I really think I need to clean out the NFS network config file.  However, I'm not sure which one it is, I think it fstab.  Any thoughts on that?


Check PCC - System - Manage System services and ensure the following entries are present and ticked to start at boot

netfs
network
network-up
nfs-common
nfs-server

If you have to change any, reboot and check the shares again although it should not be necessary.

regards.

I checked the system services and all of the items you have listed are "on at boot".  

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: network sharing with NFS, please help
« Reply #21 on: September 25, 2010, 08:28:21 AM »
If you have no fstab entries for the NFS shares then you did not set up a mount point for a share, and say Yes to having the fstab written when exiting that section of the setup.

Lets go back a step ........

You have set up to share out a directory on each of your PC ......  correct?

You know which directory on each that you have set to share?

  Please post the IP of each PC and the directory which you have shared.

You have, as Hankcurt posted, checked that your firewall on both PCs cannot be interfering with the shares?

For the purposes of testing this it might be a good idea to disconnect from the internet and disable the firwalls in the PCs.

regards.

EDIT
          For the purposes of this exercise I have just set up shares between two PCs running PCLOS ....  this one with KDE and the other with LXDE .....  using the procedure outlined above.
Neither have a firewall enabled as both are behind the router firewall.
« Last Edit: September 25, 2010, 08:30:52 AM by JohnBoy »

Offline hankcurt

  • Sr. Member
  • ****
  • Posts: 446
Re: network sharing with NFS, please help
« Reply #22 on: September 25, 2010, 09:03:55 AM »
Just for testing purposes, I would suggest you temporarily stop the firewall on both machines and give NFS a try again.  If it starts working we know that it is the firewall for sure, and if it doesn't we can look somewhere else.  Depending upon how it is configured, NFS can get random port numbers assigned to it by portmapper.

Unfortunately, I'm not in front of my PCLinuxOS machine so that I could check it my self.

edit:
OOps, sorry, I didn't notice that JohnBoy already suggested this.
« Last Edit: September 25, 2010, 09:05:29 AM by hankcurt »

Bullitt

  • Guest
Re: network sharing with NFS, please help
« Reply #23 on: September 25, 2010, 09:07:08 AM »
Just for testing purposes, I would suggest you temporarily stop the firewall on both machines and give NFS a try again.  If it starts working we know that it is the firewall for sure, and if it doesn't we can look somewhere else.  Depending upon how it is configured, NFS can get random port numbers assigned to it by portmapper.

Unfortunately, I'm not in front of my PCLinuxOS machine so that I could check it my self.

edit:
OOps, sorry, I didn't notice that JohnBoy already suggested this.

I will give a try.  I was thinking along the same lines that just to be sure it is not the firewall I should set it to allow everything.

Thanks, Bullitt

Offline moniac

  • Full Member
  • ***
  • Posts: 198
Re: network sharing with NFS, please help
« Reply #24 on: September 25, 2010, 09:10:48 AM »
No luck.  I really think I need to clean out the NFS network config file.  However, I'm not sure which one it is, I think it fstab.  Any thoughts on that?


Check PCC - System - Manage System services and ensure the following entries are present and ticked to start at boot

netfs
network
network-up
nfs-common
nfs-server

If you have to change any, reboot and check the shares again although it should not be necessary.

regards.

Along with those listed start rpcbind and check to run at boot.

Bullitt

  • Guest
Re: network sharing with NFS, please help
« Reply #25 on: September 25, 2010, 09:16:55 AM »
I now have file sharing working with NFS, I will mark this topic Solved.  Here is what I did, first I want to thank JohnBoy who stuck with me for two days, whew, and hankcurt who stopped me from doing something stupid.  Okay here is what I did to get the NFS file system to work.

I followed the steps first outlined by JohnBoy, however, because of my many previous attempts my fstab file had wrong entries.  I entered as root found the old fstab (fstab.old) file, rename the current fstab as fstab.2 and renamed fastab.old to fstab.  This was done on both computers.

Then I opened my firewall to allow every thing.

The next few steps were as directed by JohnBoy in one of his first responses to the topic.  Now I could see both computers, I set the mount point, did the same on the other computer and puff, I could now share files on both computers.  Boy does this feel good after a long fight.  

Again a big thanks to JohnBoy and hankcurt.
« Last Edit: September 25, 2010, 09:32:05 AM by Bullitt »

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: network sharing with NFS, please help
« Reply #26 on: September 25, 2010, 09:20:47 AM »
Glad to see you got it sorted   ;)

good luck!

regards.

Bullitt

  • Guest
Re: network sharing with NFS, please help
« Reply #27 on: September 25, 2010, 09:31:02 AM »
A few more questions.  In the network services folder, I have two folders, Remote disk (fish) and Remote disk (sftp).  Within (fish) there is are two folders labeled Remote Access on linux, and Remote Access on linux-2.  They seem to do nothing.  

In the (sftp) folder there are four more folders.  They are labeled linux, linux-2, Remote Access on linux, Remote access on linux-2.    I can choose either the linux-2 folder or Remote Access on linix-2 to gain access to my laptop and vise-versa on the laptop.

So here are my questions.  Do I need to keep the (fish) folder / directory? Also, do I need both folders in (sftp) that appear to do the same thing?

Again, thanks for any help or suggestions.

Bullitt

Bullitt

  • Guest
Re: network sharing with NFS, please help
« Reply #28 on: September 25, 2010, 09:41:10 AM »
But wait, there's more.  Yes, I have another question.  It seems that the firewall does interfere with NFS, how do I find what port(s) NFS is using so that I can restart my firewall.  When the firewall is up I have the NFS file share check, along with cups, and samba, however, this blocks file-sharing.  Maybe this would be better as a new topic.

Thanks again for any help or suggestions.

Bullitt
« Last Edit: September 25, 2010, 09:42:41 AM by Bullitt »

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: (SOLVED) network sharing with NFS, please help
« Reply #29 on: September 25, 2010, 10:06:32 AM »
I do not use a firewall on the PC, but looking through the boxes to tick I would suggest that for NFS you would need

NFS Server
Network Services autodiscovery (zeroconf)

If that does not work then I suggest that you tick everything at first, and gradually untick boxes (retick those that cause a problem) until you only have what is needed ticked.

regards.