Setting up a Network File System

From PCLinuxOS Knowledgebase
Jump to navigation Jump to search

YOU ARE HERE :: Main Page >> HowTo >> Setting up a Network File System

  • Relevant to ALL editions of PCLinuxOS.

Setting Up A Network File System (NFS)

Requirements:

We are going to assume that you have a fully updated version of PCLinuxOS installed and updated.

In addition, you need the following files:

nfs-utils-clients * nfs-utils * lib64nfsidmap0

You can check your system to see if the NFS files are already installed.

Open a console window and enter the following command:

rpm -qa | grep nfs

If they are there, you should see something like this:

[dwmoar@ChimpBoxPrototype ~]$ rpm -qa | grep nfs
nfs-utils-clients-1.3.4-1pclos2017
nfs-utils-1.3.4-1pclos2017
lib64nfsidmap0-0.27-3pclos2019
lib64nfs14-5.0.2-1pclos2022
lib64nfs13-4.0.0-1pclos2021
unionfs-fuse-3.5-1pclos2024
[dwmoar@ChimpBoxPrototype ~]$ 


If you have the files already installed, good. If not open Synaptic and install the missing files.

Setting up NSF

Open PCC (PCLinuxOS Control Center). Enter your password and click OK

Select "Network Sharing," and then select "Share Drives and Directories using NFS."

Image13.png

Image04.png

Now we want to add the directory(s) we want to share, and with whom we want to share with. So click on ADD, and you should see a window like this:

Image14.png

Now add the directory that you are wanting to share. In my example, it is /home/dwmoar/Pictures.

Image06.png

Now click OK and you should see something like this.

Image17.png

Now click OK again and you should be returned back to the main PCC screen.

Select Network and Internet and then under others select Hosts definitions

Image09.png

Now click on add. You should be greeted with the following dialog box.

Image05.png

We need to add the IP address of each and every machine that you wish to share files with. In my case, I want to share with my laptop, so I would enter the following information.

Image03.png

Enter your IP address and the alias name or domain of machine that you want to share information with. When you have entered the information, press OK. You will be returned to the Hosts Definitions screen. At the bottom of the list, you should see the new machine that you have added.

NOTE: the above step 'MUST BE done for each and every machine that you want to share information with.

Image10.png

When you have finished, adding the machines you want, then press OK. You will then be back to the main PCC screen.

Now select Local Disks and then select Share your hard disk partitions

Image02.png

The screen will will show three options. We will use the default selection, Allow all users. Click OK.

You will now see the Share your hard disk partitions screen. Again, we will select the default.

Image12.png

Once more, click OK. We will be returned to the main PCC screen.

Once again, click on Network Sharing, and this time select Access NFS shared drives and directories. You then will see the Access NFS shared drive and directories screen. At this point, it will be empty.

Image11.png

Click on Search servers button. Be patient, as this might take a little time. When it has found all your NFS devices, it will display them, as in my example.

Image08.png

You can see more information on your NFS device by clicking on the name or the ip address.

Image15.png

You can specify where you want the NFS directory to be mounted on the local machine by clicking on the Mount Point button at the bottom of the window.

In my case, I am going to select the default directory of /mnt/Pictures

Image00.png

The NFS folder is not mounted yet. At this point, you must click the Mount button at the bottom of the screen. Note that the icon next to the mount point will change from a lightning bolt to a connected plug once mounted

Once everything is to your liking, press the "Done" button at the bottom of the screen. If you want the NFS to be mounted automatically each time you start your machine, you will need to make sure that you save the information to the fstab. Click YES.

Image16.png

Once again, you will be returned to the main PCC screen. Now, click on the Share drive and directories using NFS. If all goes well, you should see a dialog box saying Starting the NFS-server, and after a few seconds, you should see something like this:

Image17.png

Congratulations! You should now have a NFS share working on your system.

As in my example the NFS share was set for the mount point /mnt/Pictures. If I browse to the folder /mnt/Pictures, I should see all my pictures.

Image07.png