# NFS problem [solved with samba instead]

## termite

I have a server at home running nfsd.  The /etc/exports looks as follows:

```
# /etc/exports: NFS file systems being exported.  See exports(5).

/media 192.168.1.0/24(async,rw,subtree_check)
```

From my laptop, I can mount the share with the command: 

```
mount 192.168.1.104:/media /media/MediaServer
```

However, when I enter the /media/MediaServer folder and do (say) an ls, it hangs.

Just as an experiment, I tried adding the line 

```
/media/Music 192.168.1.0/24(async,rw,no_subtree_check)
```

 to the /etc/exports file on the server and restarting nfs.  When I try to mount that directory from the laptop, it gives me a 'permission denied' error.

Any ideas?Last edited by termite on Sun Jul 22, 2007 2:33 pm; edited 1 time in total

----------

## alex.blackbit

do you have portmap running on all hosts?

----------

## termite

yep

----------

## termite

anyone?

----------

## Veldrin

 *Quote:*   

> However, when I enter the /media/MediaServer folder and do (say) an ls, it hangs. 

  Sounds like a disconnected server to me. I had this too, when I accidentially shut down the server.

Have you tried sync mode? 

Who is the owner (uid/gid) of the nfs-share, and is this a valid user on your notebook?

cheers

V.

----------

## termite

I haven't tried sync mode.  I'm not quite sure I understand what the difference between sync and async is, could you explain?

The share is owned by root:root, but has universal read/write access.

----------

## embobo

Do you have a firewall running?

What is the ouput of "rpcinfo -p <server>" when run from the laptop?

I'd try the "ls" while running a packet sniffer (e.g., wireshark) on both computers to see what is actually happening.

----------

## termite

There's no firewall between the laptop and the server, nor is there one running on either.

----------

## termite

sync has pretty much the same results, except that instead of hanging, the directory shows as empty.

```
rpcinfo -p 192.168.1.104

   program vers proto   port

    100000    2   tcp    111  portmapper

    100000    2   udp    111  portmapper

    100024    1   udp  32777  status

    100024    1   tcp  45131  status

    100003    2   udp   2049  nfs

    100003    3   udp   2049  nfs

    100021    1   udp  32778  nlockmgr

    100021    3   udp  32778  nlockmgr

    100021    4   udp  32778  nlockmgr

    100003    2   tcp   2049  nfs

    100003    3   tcp   2049  nfs

    100021    1   tcp  55748  nlockmgr

    100021    3   tcp  55748  nlockmgr

    100021    4   tcp  55748  nlockmgr

    100005    1   udp    837  mountd

    100005    1   tcp    840  mountd

    100005    2   udp    837  mountd

    100005    2   tcp    840  mountd

    100005    3   udp    837  mountd

    100005    3   tcp    840  mountd
```

----------

## termite

can anyone help?

----------

## embobo

 *termite wrote:*   

> can anyone help?

 

Are both laptop and server running gentoo?

Play around with rsize and wsize, nfsvers, noac, tcp, and udp mounting options. I'd try udp vs tcp first.

Review your kernel options.

Look at the output of nfsstat on client and server. "nfsstat -v -23", especially the rpc stats. Here are good stats:

```

Server rpc stats:

calls      badcalls   badauth    badclnt    xdrcall

4334735    0          0          0          0

Client rpc stats:

calls      retrans    authrefrsh

2490512    0          0

```

Failing that try running wireshark to see what is actually going over the wire.

----------

## termite

I seem to have some badcalls and badauth on the server (both 4)

How do I do the udp/tcp thing?

----------

## embobo

 *termite wrote:*   

> I seem to have some badcalls and badauth on the server (both 4)
> 
> How do I do the udp/tcp thing?

 

```

mount -o tcp,nfsvers=2 192.168.1.104:/media /media/MediaServer

mount -o tcp,nfsvers=3 192.168.1.104:/media /media/MediaServer

mount -o udp,nfsvers=2 192.168.1.104:/media /media/MediaServer

mount -o udp,nfsvers=3 192.168.1.104:/media /media/MediaServer

```

Are both of these systems Gentoo?

----------

## termite

yep, both gentoo.  I'll do this when I get home.

----------

## embobo

 *termite wrote:*   

> yep, both gentoo.  I'll do this when I get home.

 

That's good. I'd have to beat you if I found out one was Solaris, Irix, or FreeBSD   :Very Happy:  (Historically they don't get along well with Linux NFS).

----------

## termite

nope, still nothing.  Tried all of those  :Sad: 

----------

## GNUtoo

for me NFS works fine and fast but...i can only export one folder...

should i bugreport?

for instance when i mount the second share it mount me the content of the first share

----------

## termite

I'm really close to just switching to samba    :Sad: 

By the way, appletalk works fine, my partner's macbook has no trouble....

----------

## embobo

Wow, at this point I am stumped. Perhaps you have your kernel misconfigured? Have a look at

https://forums.gentoo.org/viewtopic-t-236974-highlight-nfs+howto.html

http://gentoo-wiki.com/HOWTO_Share_Directories_via_NFS

Sorry.   :Sad: 

----------

## GNUtoo

samba is great but it's so slow...it doesn't scale well(specialy on a gigabit link)

i am also searching an autentification mecanism to remplace samba with NFS on my wireless connection

because the ip autentification could easely be faked

----------

## termite

I'm on a 54mbit wireless network here.  I need to be able to play video off the server (which appletalk handles fine server->mac laptop).  Will samba be good enough for that?

I could also use appletalk, but it seems a bit silly.

----------

## GNUtoo

 *termite wrote:*   

> I'm on a 54mbit wireless network here.  I need to be able to play video off the server (which appletalk handles fine server->mac laptop).  Will samba be good enough for that?
> 
> I could also use appletalk, but it seems a bit silly.

 

don't know...personaly i have problems playing music with a bad wifi link

but why not trying in order to findout?

----------

## termite

ok, will try and report back  :Smile: 

----------

## termite

ok, samba works, currently building amarok collection.

Edit: Music seems to work fine over samba.  

Now I must go drink beer.   :Cool: 

Edit 2: Beer drinking was completed with great success.  As for the samba shares: I can play video off them fine, it's a touch skippy, but not seriously so.

----------

