Koozali.org: home of the SME Server

nfs-trouble

claus

nfs-trouble
« on: September 22, 2004, 08:09:38 PM »
Hello-
I have trouble setting up a nfs network. I have installed nfs on the SME after the contribs:

http://forums.contribs.org/index.php?topic=24054.0

My /var/log/messages says:
Sep 22 20:02:01 best rpc.mountd: refused mount request from pc-00007.topshoppen.dk for /home/e-smith/files/ibays (/): no export entry

Regards Claus

Damian

nfs-trouble
« Reply #1 on: September 24, 2004, 12:40:09 AM »
Hi Claus,

What does your /etc/exports file say ?
What's the output of the command 'exportfs' ?
Did you do the /etc/exports customisation ?

>mkdir -p /etc/e-smith/templates-custom/etc/exports
>echo "/home/e-smith/files/ibays 192.168.100.117(rw)" > /etc/e-smith/templates-custom/etc/exports/ibays
>/sbin/e-smith/expand-template /etc/exports

In my example I exported the SME directory /home/e-smith/files/ibays out only to one remote host - my laptop on 192.168.100.117
I assume your NFS client has a different IP address.

Damian

claus

nfs-trouble
« Reply #2 on: September 28, 2004, 06:34:36 PM »
Well, /etc/exports is empty-

/etc/e-smith/templates-costum/etc/exports/ibays says:
/home/e-smith/files/ibays "mylocalipnetwork"(rw)

exportfs gives no input

When i try this:
>mkdir -p /etc/e-smith/templates-custom/etc/exports
>echo "/home/e-smith/files/ibays 192.168.100.117(rw)" > /etc/e-smith/templates-custom/etc/exports/ibays
>/sbin/e-smith/expand-template /etc/exports

I have a problem here:

[root@best exports]# /etc/e-smith/templates-custom/etc/exports/ibays
bash: /etc/e-smith/templates-custom/etc/exports/ibays: Permission denied
[root@best exports]#

I have changed the ip to my own network adress.

I have 3 machines i want to joint the nfs-network.

Regards Claus

Damian

nfs-trouble
« Reply #3 on: September 28, 2004, 08:18:31 PM »
Hi Claus,

On my system where I export to two clients, my /etc/e-smith/templates-custom/etc/exports/ibays file says:

/home/e-smith/files/ibays       192.168.100.117(rw) 192.168.100.118(rw)

Then I run:
/sbin/e-smith/expand-template /etc/exports

and check the contents of /etc/exports again - it should contain the new info.

Damian

claus

nfs-trouble
« Reply #4 on: September 28, 2004, 10:07:42 PM »
Well, most of it works now, and suse9.1 nfsclient can see the SMEnfsserver. It can see the server(host), but not the ibays.
I think this is the trouble:
bash: /etc/e-smith/templates-custom/etc/exports/ibays: Permission denied
[root@best etc]#

Some kind of permission trouble. Maybe i have to change permissions for /etc/e-smith/files/ibays ?

Best regards Claus

Damian

nfs-trouble
« Reply #5 on: October 01, 2004, 11:20:26 PM »
Claus,

Please run the following commands and post the outputs without editing:

ls -ld /etc/e-smith/templates-custom/etc/exports/ibays

more /etc/e-smith/templates-custom/etc/exports/ibays

You shouldn't need to change the permissions. The error seems to be that your'e trying to run a path as a command.

Please post the responses.

Damian

claus

nfs-trouble
« Reply #6 on: October 05, 2004, 10:32:02 PM »
ls -ld /etc/e-smith/templates-custom/etc/exports/ibays
-rw-r--r--    1 root     root           43 Sep 22 18:18 /etc/e-smith/templates-custom/etc/exports/ibays
[root@best root]#

[root@best root]# more /etc/e-smith/templates-custom/etc/exports/ibays
/home/e-smith/files/ibays 169.254.0.0(rw)

[root@best root]#

Best regards Claus

Damian

nfs-trouble
« Reply #7 on: October 05, 2004, 10:46:18 PM »
Hi Claus,

Thanks for posting.

The permissions on the ibays file are OK. The contents are different from the way I did it but not necessarily wrong. From the man page, if you want to export to a subnet (especially B class as in your case) you probably need to define the netmask. In that case the contents of the ibays file should look like:

/home/e-smith/files/ibays 169.254.0.0/16(rw)

This assumes that you do want to export this nfs share to all hosts on the 169.254 network.

I seem to remember that if a windows PC can't get a DHCP lease that it defaults to a 169.254 network address. Is this what's happening on your network ?

Anyway, please try the above (and restart nfs) and post the response.

Damian

claus

nfs/another try
« Reply #8 on: November 14, 2004, 07:14:26 PM »
[root@best root]# exportfs
[root@best root]#
------------------
[root@best root]# ls -ld /etc/e-smith/templates-custom/etc/exports/ibays
-rw-r--r--    1 root     root          103 Nov 14 18:20 /etc/e-smith/templates-custom/etc/exports/ibays
[root@best root]#
-------------------------
root@best root]# more /etc/e-smith/templates-custom/etc/exports/ibays
/home/e-smith/files/ibays 169.254.0.5/16(rw), 169.254.0.6/16(rw),169.254.0.7/16(
rw),169.254.0.8/16(rw)
[root@best root]#
-----------------------------
14 18:36:32 best rpc.mountd: refused mount request from 169.254.0.6 () for /home/e-smith/files/ibays (/home/e-smith/files/ibays): DNS forward lookup does't match with reverse
Nov 14 18:38:44 best dhcpd: Reclaiming REQUESTed abandoned IP address 169.254.0.7.
Nov 14 18:38:44 best dhcpd: DHCPREQUEST for 169.254.0.7 from 00:69:00:01:02:e3 via eth0
Nov 14 18:38:44 best dhcpd: DHCPACK on 169.254.0.7 to 00:69:00:01:02:e3 via eth0
Nov 14 18:38:51 best rpc.mountd: refused mount request from 169.254.0.7 () for /home/e-smith/files/ibays (/home/e-smith/files/ibays): DNS forward lookup does't match with reverse
Nov 14 19:10:02 best sshd[3127]: Accepted password for root from 169.254.0.7 port 1066 ssh2
Nov 14 19:10:02 best sshd[3133]: Address 169.254.0.7 maps to , but this does not map back to the address - POSSIBLE BREAKIN ATTEMPT!
--------------------
Etc/exports:
ov 14 18:36:30 best dhcpd: DHCPACK on 169.254.0.6 to 00:07:e9:60:b4:fe via eth0
Nov 14 18:36:32 best rpc.mountd: refused mount request from 169.254.0.6 () for /home/e-smith/files/ibays (/home/e-smith/files/ibays): DNS forward lookup does't match with reverse
Nov 14 18:38:44 best dhcpd: Reclaiming REQUESTed abandoned IP address 169.254.0.7.
Nov 14 18:38:44 best dhcpd: DHCPREQUEST for 169.254.0.7 from 00:69:00:01:02:e3 via eth0
Nov 14 18:38:44 best dhcpd: DHCPACK on 169.254.0.7 to 00:69:00:01:02:e3 via eth0
Nov 14 18:38:51 best rpc.mountd: refused mount request from 169.254.0.7 () for /home/e-smith/files/ibays (/home/e-smith/files/ibays): DNS forward lookup does't match with reverse
Nov 14 19:10:02 best sshd[3127]: Accepted password for root from 169.254.0.7 port 1066 ssh2
Nov 14 19:10:02 best sshd[3133]: Address 169.254.0.7 maps to , but this does not map back to the address - POSSIBLE BREAKIN ATTEMPT!
[root@best log]#

Regards Claus

Damian

nfs-trouble
« Reply #9 on: November 14, 2004, 11:10:50 PM »
Hi Claus,

Nearly there. I didn't realise that your nfs clients were also DHCP clients. It seems that DHCP leases given by SME are not added to SME's DNS zone files. That's why you're seeing access denied errors (because tcpwrapper is doing what it does- checking the nfs request originator by doing a reverse lookup on the IP address). Where are your DHCP leases issued ? (which machine).

If the leases come from SME then need to check the rest of the forum but I think there are posts related to DHCP leased addresses not appearing in DNS. In general, DHCP and NFS clients don't mix well because tcpwrapper will always give this problem when your client IP addresses change. If possible give them static IP leases so that each MAC address is always assigned the same IP address. Then add them as hosts in Server Manager -> Hostnames & Addresses.

Your /etc/exports line is incorrect though. I can see how you got there but if you want to export to those four IP addresses only, change it to read:

/home/e-smith/files/ibays 169.254.0.5/24(rw), 169.254.0.6/24(rw),169.254.0.7/24(rw),169.254.0.8/24(rw)

Damian

claus

nfs-trouble
« Reply #10 on: November 22, 2004, 09:58:59 PM »
/home/e-smith/files/ibays 169.254.0.5/24(rw), 169.254.0.6/24(rw),169.254.0.7/24(rw),169.254.0.8/24(rw)

Its done now.

If i do esportfs -ra it says:

Syntax error i export file ( line 10): bad options list.

The line above is line 10.

Best regards Claus

claus

nfs-trouble
« Reply #11 on: November 22, 2004, 10:03:33 PM »
Hello again:

My /proc/fs/nfs/exports are empty.

My /var/lib/nfs/xtab are empty

Can i set it up without using the e-smith server?

I mean, just write the clients into the files directly?

Best regards Claus

Damian

nfs-trouble
« Reply #12 on: November 22, 2004, 11:01:12 PM »
Hi Claus,

My mistake. There shouldn't be commas separating the client list. My /etc/exports file is:

home/e-smith/files/ibays       192.168.100.117(rw) 192.168.100.118(rw)

Retry it with that.

You can just write the files directly to get the syntax right, then when it's working, add it again SME-wise.

Damian