Author Topic: NFS (mount problems)  (Read 862 times)

mskarl

  • Member
  • **
  • Posts: 77
  • Kudos: 0
    • http://www.fuckmicrosoft.com
NFS (mount problems)
« on: 26 March 2002, 12:51 »
Ok now I've been on Linux for a little bit I want to network them my two computers together.  

I'm running SuSE 7.3 on both of them.

I checked to make sure thatNFS is running by the
'rpcinfo' command.

On Linux01 I have 3 nic cards.  eth1 10.10.32.11/255.255.255.0 as the one with a cross connect to the hpserver.
On hpserver I have 2 nic cards.  One is setup for DCHP for the net and eth1 is setup up as 10.10.32.1/255.255.255.0


my user name is msk  (on both computers)

I've set up the 'ect/exports' file with the following information on hpserver.
/export/home                msk(rw)

On linux01 I have nothing in the 'ect/exports' file

I read in a book that if I type
'mount -o rw,bg,intr,soft hpserver:/export/home'

I sould be able to mount the network folder.

But when I type that on Linux01 as user msk I get

'mount: only root can do that'

same command as su
'mount: can't get address for hpserver'

so I tried
'mount -o rw,bg,intr,soft 10.10.32.1:/export/home /home

I get messages
'mount: RCP: Unable to recieve; errno = Connection Refused
mount: backgrounding "10.10.32.1:/export/home"'


I have a feeling this is because of user stuff.
Big brother Microsoft sucks!!! (And my spelling is horrible)

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
NFS (mount problems)
« Reply #1 on: 27 March 2002, 04:31 »
First of all, the exports file uses hostname/ip addresses and not userids. Try making your /etc/exports file look like this on hpserver:

/export/home 10.10.32.11(rw)

Then from Linux01 do a "showmount -e hpserver" (or use IP address if you don't have name resolution).  This command shows what the server actually has shared via NFS. It's best to add entries to your /etc/hosts file for all of your addresses (if you don't want to set up named that is) so then you can use names in all of your config files rather than IP addresses.

And I assume you ran the "exportfs" command after modifying the /etc/exports file, and you have mountd, portmap, and nfsd running.

Let me know if it still fails. Also look in your /var/log/messages after trying to mount the share and see what IP address is actually being used on your Linux01 box (also you can telnet/ssh into hpserver and do a "who -l" to see what IP you are coming in from since you have multiple addresses).

Another note about NFS.  In order for the permissions to be correct across the NFS shares you have to make sure your users have the same user number on both machines (in /etc/passwd).  That why NIS/YP are usually used in combination with NFS.

Also, once you get it where you can mount it manually you can add it to your /etc/fstab so it mounts on bootup automatically. If you get really froggy you can set up the auto_home or other automount features.

[ March 26, 2002: Message edited by: VoidMain ]

Someone please remove this account. Thanks...

mskarl

  • Member
  • **
  • Posts: 77
  • Kudos: 0
    • http://www.fuckmicrosoft.com
NFS (mount problems)
« Reply #2 on: 27 March 2002, 11:09 »
quote:
Originally posted by VoidMain:
First of all, the exports file uses hostname/ip addresses and not userids. Try making your /etc/exports file look like this on hpserver:

/export/home 10.10.32.11(rw)

Then from Linux01 do a "showmount -e hpserver" (or use IP address if you don't have name resolution).  This command shows what the server actually has shared via NFS. It's best to add entries to your /etc/hosts file for all of your addresses (if you don't want to set up named that is) so then you can use names in all of your config files rather than IP addresses.

And I assume you ran the "exportfs" command after modifying the /etc/exports file, and you have mountd, portmap, and nfsd running.

Let me know if it still fails. Also look in your /var/log/messages after trying to mount the share and see what IP address is actually being used on your Linux01 box (also you can telnet/ssh into hpserver and do a "who -l" to see what IP you are coming in from since you have multiple addresses).

Another note about NFS.  In order for the permissions to be correct across the NFS shares you have to make sure your users have the same user number on both machines (in /etc/passwd).  That why NIS/YP are usually used in combination with NFS.

Also, once you get it where you can mount it manually you can add it to your /etc/fstab so it mounts on bootup automatically. If you get really froggy you can set up the auto_home or other automount features.

[ March 26, 2002: Message edited by: VoidMain ]




I just noticed you posed a message are you online?  If so do you have a chat program that I can talk to you on.  I still can't get it to work
Big brother Microsoft sucks!!! (And my spelling is horrible)

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
NFS (mount problems)
« Reply #3 on: 27 March 2002, 11:15 »
Is one of your boxes connected directly to the internet and have talkd running?
If so, PM me the address and your logon name and I'll hook up with you. I really need to get some more coding done but could take a break...
Someone please remove this account. Thanks...

mskarl

  • Member
  • **
  • Posts: 77
  • Kudos: 0
    • http://www.fuckmicrosoft.com
NFS (mount problems)
« Reply #4 on: 27 March 2002, 11:21 »
quote:
Originally posted by VoidMain:
Is one of your boxes connected directly to the internet and have talkd running?
If so, PM me the address and your logon name and I'll hook up with you. I really need to get some more coding done but could take a break...




talkd running???


I don't know what that is.
ICQ has a chat thing that I don't have to download anything on. If you are willing to do that the link is
http://groups.icq.com/Computing/irc.asp?no=700917
and no one is in the chat room
Big brother Microsoft sucks!!! (And my spelling is horrible)

mskarl

  • Member
  • **
  • Posts: 77
  • Kudos: 0
    • http://www.fuckmicrosoft.com
NFS (mount problems)
« Reply #5 on: 27 March 2002, 11:31 »
quote:
Originally posted by Anti M$:



talkd running???


I don't know what that is.
ICQ has a chat thing that I don't have to download anything on. If you are willing to do that the link is
http://groups.icq.com/Computing/irc.asp?no=700917
and no one is in the chat room




ok I tried it install talkd and it said I already had it installed.  Then I tried to run talkd and talk and nothing came up.  My Ip is 207.173.207.62/255.255.255.128 if you can connect to me.
Big brother Microsoft sucks!!! (And my spelling is horrible)

mskarl

  • Member
  • **
  • Posts: 77
  • Kudos: 0
    • http://www.fuckmicrosoft.com
NFS (mount problems)
« Reply #6 on: 27 March 2002, 11:38 »
quote:
Originally posted by Anti M$:


thanks

Big brother Microsoft sucks!!! (And my spelling is horrible)

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
NFS (mount problems)
« Reply #7 on: 27 March 2002, 12:50 »
Well, as you know we got it all worked out. You can share directories on your NFS server and then add them to your /etc/fstab on your clients so they automatically mount when you boot them. Now that you've done one, you have the "basics" of NFS.
Someone please remove this account. Thanks...

mskarl

  • Member
  • **
  • Posts: 77
  • Kudos: 0
    • http://www.fuckmicrosoft.com
NFS (mount problems)
« Reply #8 on: 27 March 2002, 12:55 »
quote:
Originally posted by VoidMain:
Well, as you know we got it all worked out. You can share directories on your NFS server and then add them to your /etc/fstab on your clients so they automatically mount when you boot them. Now that you've done one, you have the "basics" of NFS.


VoidMan thanks again.  I've been trying to recap what we did so I have record of it.  then I add to this post what you told me to do.  this was someone else can look at it.  I forget what we did in the /ect/init.d to find out what services were running.  I tried to save our chat but couldn't  :(   that sucked.  

But thanks for the hour or more of you time!!!!!!!!
Big brother Microsoft sucks!!! (And my spelling is horrible)

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
NFS (mount problems)
« Reply #9 on: 27 March 2002, 13:16 »
Basically on SuSe (which I never touched until our chat) you have to make sure the NFS server services are running on the NFS server.  These services are started from /etc/init.d/nfsserver. If it's not running you can type "/etc/init.d/nfsserver start". You'll want to make sure this automatically starts when you boot your NFS server machine. In SuSe this probably can be done in Yast, or by creating the appropriate symbolic links in /etc/rc*.d. You create your NFS share in /etc/exports, you share it by typing "exportfs -a".  Then on the server you can type "showmount -e localhost" to see if the server indeed has it shared properly.  On the client you would type "showmount -e <servername_or_IP>". If that works, you *should* be able to mount the share on the client by typing "mount servername_or_IP:/sharename /localmountpoint".  

I think that is a recap of what we did, other than determining why you were originally getting "permission denied" messages. We figured that out by "ssh'ing" to your server from your client and typing "who -l" to determin the address or name that your server sees you coming from and making sure that address or name matches what you have in /etc/exports. After making a change you can do another "exportfs -a" to make the change effective and then retry the mount command.

You can put it into your own words.  Again, this is just scratching the surface but it shows the basics of how to create an NFS share and mount it.  You really should set up DNS so you can use names instead of IP addresses (or at least enter records in your /etc/hosts files for all of your machines).  Like I mentioned earlier, NIS and NFS are a good combo, you might look at attempting to set up NIS next. This can be a little more difficult than NFS but once you get them all set up it's a piece of cake. NIS comes in really handy when you have a lot of machines and a lot of user logins and the users need to be able to log in to any of the machines using the same password. And it makes sure their userIDs are equivelant (same number which is critical in NFS). In addition, when they log in their "home" directories can be automatically mounted on the client from the server when the user logs in.  But now that you hopefully have the very basic understanding of how to do it, search around google for some other docs to gain more ideas..

Normally you do not want to have NFS/portmap/mountd etc running on a machine that is directly attached to the public Internet as it is not the most secure protocol, depending on which version of NFS you are running. The older version is not encrypted and portmap is one of the most exploited *NIX services. It's fine for internal network use though.

Also we didn't get into detail on your multiple NIC configuration on your machines. I'm not sure what you have intended with them but I can see where you can run in to problems the way you currently have it set up.  Normally a machine that has multiple NICs is connected to multiple networks (on different subnets).  You had your NICs assigned addresses on the same subnet.  But again, I do not know what you intend on setting up so you may have a valid reason for this.

[ March 27, 2002: Message edited by: VoidMain ]

Someone please remove this account. Thanks...