LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-13-2005, 04:25 AM   #1
numbersix
LQ Newbie
 
Registered: Feb 2005
Posts: 9

Rep: Reputation: 0
Unable To Create LAN Using NFS


I finally made the decision to ditch Windows and installed SuSE 9.2 Pro on our four machines at home a couple of weeks ago. Three are desktops one a laptop. The install was painless on each machine. I left one as a dual boot with Win XP (only so that we could use three applications that I have yet to try and find open source equivalents for).
We have broadband via a cable modem and all machines access the internet through this one connection using a Netgear RP614 v2 Cable/DSL Router Gateway. This has a built in firewall that uses NAT. It is also a 4 port 10/100 Mbps network switch.
When we had Win XP we had all machines networked to share files and printers using the same NIC's/cables as we used for the internet.
When I installed SuSE there was no problem with the internet connection on any machine, it was available immediately. The SuSE firewall is running on all machines as Zone Alarm used to be with Windows.
One of the reasons I changed to Linux was security and I do understand that many things that were 'defaults' and 'easy to set up' in Windows need to be specifically set up in Linux. Networks can be a serious security issue and I'm pleased that I have to take the time to ensure correct configuration.
I don't need network access to the Windows installation so I don't need to use SAMBA, that is correct isn't it? What I should use is NFS?
I have carefully gone through setting up an NFS server and client, opening the SuSE firewall to allow internal networking. I've set the files/directories I want to share correctly. Yet I am unable to 'see' the other machines on the network or access the shares.
I'm obviously doing something wrong and would appreciate a talk through of the steps necessary to set up NFS.
On my machine I have two NIC's that are part of the motherboard (ASUS A7N8X DeLuxe Rev 2) one is a 3Com 3C920B-EMB Integrated Fast Ethernet Controller and the other an Nvidia nforce 2 Ethernet which is configured with DHCP and used for my internet connection.
The other machines have only one NIC each and I have only ever used one of my onboard cards.
Do I need additional NIC's for each machine to create a seperate LAN from the Internet connection?
I've looked in books, forums, the internet, Google and am now very confused. I have every intention of learning about TCP/IP etc, but for now all I want is to get our LAN up and running. Then we can settle down and start to learn. Sorry about the length of this post.
 
Old 02-13-2005, 06:08 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
You seem to have made a good start. congratulations on getting this far.

Your connectivity problems are probably due to the firewalls you have running: You probably do not need these (unless you fear mischief from within your network. Your netgear kit is running a firewall, so you can turn off the suse firewalls, this'll be much easier than configuring them all!

Then check that you can "ping" your machines. You should be able to, either by their LAN IP numbers, or names if you have /etc/hosts set up correctly. When I was setting up a similar network, having started with DHCP, I later found it much easier to dispense with DHCP, and allocate all my machines static IP numbers. The DSL modem/router/switch/firewall gets its WAN (Internet) dynamic IP address from my ISP, and I do not really care what this is (unless I want to connect from the internet)

NFS was relatively easy to set up, ssh was a bit more of a challenge.

So, I'd suggest you connect to your netgear router/switch, check its firewall is properly enabled, then disable the firewalls on your LAN.

You do not need additional network cards: Inter-machine traffic, and internet traffic will be routed correctly. If you cannot "ping" then you have a basic network problem: No NIC, no/bad cable, or a firewall in the way. There's nothing wrong with your cabling or cards as all machines can access the internet, so just connect each machines eth0 port to the netgear router/switch and turn the suse firewalls off.

Hope this helps.
 
Old 02-13-2005, 06:44 AM   #3
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
What have you tried to do to "see" the other machines? Do you have their IP addresses? Are you running DHCP or have you assigned static IP's. Do the machines have names or FQDN's? Can you "ping" them?

Setting up NFS is generally a two step process once networking is setup. On the host (while the file systems reside), permission is given to other machines in /etc/exports (see "man exports"). Mounting on the client can be done manually (for a temporary connection), or through fstab (for a mount that can last through reboot).

I will give you an abbreviated version of how I would do this on my network, depending on where you are in your setup, expect some variation, but perhaps it will get you started. Once you have some specific errors, I (or someone) can help you through it.

I have two machine bat and fly. My domain is mslahome.net. I have static IP's. In my /etc/hosts file, I have the following:

192.168.0.77 bat.mlsahome.net bat
192.158.0.123 fly.mlsahome.net fly

bat is the host. I wish to export the /data filesystem. Therefore, I have the following line in /etc/exports

/data fly.mlsahome.net(rw,async,no_root_squash)

Your options will likely vary. I want read/write access, I trust my network and want faster writes, and I want root access to the filesystem. Again, look at "man exports", particularly the examples at the bottom and don't worry if you don't understand it all.

I need to start nfs services. (I don't generally use Suse, so I am somewhat guessing here). I type the following as root "chkconfig nfs 35;chkconfig nfslock 35;chkconfig nfsserver 35" to setup automatic service starting at reboot for unlevel 3 and 5. I also start the services now (to avoid reboot): "cd /etc/init.d;./nfs start;./nfslock start; ./nfsserver start:.

I then go to fly make a mount point (mkdir /data_bat) and add the following line to /etc/fstab:

bat:/data /data_bat nfs rw,async 0 0

This will mount the filesystem at the next boot, I want it now. Therefore I type "mount /data_bat".
 
Old 02-13-2005, 01:46 PM   #4
numbersix
LQ Newbie
 
Registered: Feb 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Hi

Thanks for the replies and help. I'm still getting nowhere. This will sound silly to you but how do I ping the other machines?
The SuSE firewall is turned off but it didn't seem to make any difference.
I've been configuring NFS via YAST as I'm very new to command line stuff.
 
Old 02-14-2005, 03:49 AM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
To "ping":

Open a terminal.
The command is ping name.or.number.of.machine eg
ping localhost (to ping yourself)
ping 127.0.0.1 (the same as the above)
ping 192.168.0.77 (a different machine on your LAN)

The above pings will continue indefinitely: to stop them, use <CTRL>-C.

man ping will tell you more.
 
Old 02-14-2005, 11:20 PM   #6
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
What have you tryed with yast? Are there any messages that might illumiinate the problem either on the console or perhaps in /var/log/messages or /var/log/syslog or such? (Error messages are your friend, even if sometimes a bit obscure.) What does the /etc/exports look like on the server, and /etc/fstab on the clients?

I found the following on the web: http://www.novell.com/documentation/...l/ch14s09.html . How far have you gotten. Don't worry, you will get through it.
 
Old 02-15-2005, 08:07 AM   #7
numbersix
LQ Newbie
 
Registered: Feb 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Hi
Yesterday when I pinged I was successful in every direction.
I've followed the instructions in the SuSE Administrators Manual that came with the software to set up an NFS server on my machine.
I've also followed the instructions for setting up NFS clients on the other three. The problem is when I cick on 'add' in 'NFS Client' in Yast, I get the window asking for the host name of the NFS server. I click on 'choose' and a message comes up telling me it's 'scanning for hosts on this LAN'. After a short wait I get a small window titled 'NFS Servers' and there's nothing there to select.
This indicates, based on my minimal knowledge, that I can't have set up the server correctly. I could enter the info manually but the information in the book and on the SuSe website doesn't make it clear what exactly to enter - I've set host names for all the computers so I can identify them - do I use those names or IP addresses?
I also have a problem accessing /etc/fstab and /etc/exports etc. I log in as root correctly but get "Permission denied" messages -
Password:
linux:~ # /etc/fstab
-bash: /etc/fstab: Permission denied
linux:~ # /etc/exports
-bash: /etc/exports: Permission denied
linux:~ # /var/log/messages
-bash: /var/log/messages: Permission denied
I'll try again 'by the book'
 
Old 02-15-2005, 08:56 AM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Some progress then.....
Ping is working so the network is functioning & connected: good.
I do not use suse, so I do not use yast, I do not much like mandrake's "Control centre" either. So we'll try and do things by hand.

To start with your errors:

Quote:
linux:~ # /etc/fstab
-bash: /etc/fstab: Permission denied
The # sign is the root prompt. It is waiting for you to type a command.
/etc/fstab is a text file. It is true that almost everything in linux is a file, (including commands), but this is a plain ordinary text file, and you cannot execute it, so you get "Permission denied". Same for the other files. If you typed cat /etc/fstab the cat command would give you a listing of the contents of the file /etc/fstab.

You need to edit some files. You can do this from the command line (You really should learn a tiny bit about vi the command-line editor. It only takes 5mins to learn the basics, and one day, when your GUI has failed, knowing how to use vi will save you. Yes, being a newbie is hard at first, there are a lot of things to learn about!)

The easiest way for you to edit a file as root is:

Open a terminal.
Give the su command and password. (You know how to do this already)
Give the following command kwrite &
That will start up kwrite ( which is very easy to use ) as the root user because it was started from a "root console". You need to be root because the /etc/hosts file belongs to root, and root has set it so that only root can write to that file.

Open up /etc/hosts with kwrite. (File...Open...Navigate to it etc)

In here you need a list of your computers names and their IP addresses, and their short names. Mine looks like this:

127.0.0.1 localhost
10.0.0.77 p4.home.net p4
10.0.0.66 p3.home.net p3

You have more computers than I do, so add them all in. You need the localhost line, but you do NOT need the names or IP addys of my computers! You will have to do this on all your computers.

Save the file, do not close the (root's) kwrite window just yet. You need to edit /etc/exports and /etc/fstab as it says in the link fsbooks gave you.

Good luck, you will get there.
 
  


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
Unable to mount via NFS calebsg Linux - Networking 3 03-11-2005 09:37 PM
Create NFS installation source from 5 CDs dlublink SUSE / openSUSE 1 02-06-2005 09:51 AM
Create NFS Mounts at boot time rwalkerphl Linux - Newbie 1 11-17-2004 03:59 AM
cannot create new files on fat32 via nfs TheOneAndOnlySM Linux - Networking 1 06-02-2004 04:32 PM
I have an nfs mounted /home and 'adduser' fails to create a new user dipukm Linux - Software 4 06-01-2004 07:38 PM


All times are GMT -5. The time now is 11:00 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration