# NFS newbie question coming from Debian



## mrgoatman (Jan 30, 2014)

Hey all,

I've been trying to get NFS server configured exactly the same as I had on my previous Debian setup and have read through the FreeBSD guide (http://www.freebsd.org/doc/en_US.ISO885 ... k-nfs.html) with no avail. Here was my previous setup on NFS: 

```
/nfs           192.168.128.0/24(rw,sync,no_root_squash,no_all_squash,no_subtree_check)
```
Here is my FreeBSD setup

```
/nfs   -alldirs -maproot=root -network 192.168.128.0/24
```
Am I missing something to replicate it 100%?

Thanks 
goat


----------



## trh411 (Jan 30, 2014)

What version of FreeBSD are you running? What is not working as you want/expect it to work?


----------



## mrgoatman (Jan 30, 2014)

```
9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825
```

Just trying to get an exact replica of my Debian machine, I believe FreeBSD is having trouble communicating with NFS version 2 and 3 clients.


----------



## trh411 (Jan 30, 2014)

mrgoatman said:
			
		

> I believe FreeBSD is having trouble communicating with NFS version 2 and 3 clients.


And you believe this because you are seeing error messages and/or unexpected behavior on the client side mounting or accessing the exported filesystem? If so, please provide details. Vague, general statements are not helpful.


----------



## mrgoatman (Jan 30, 2014)

*S*orry I wasn't clear, I'm trying to load a kernel with _NFS_ via u-boot on a client, It works perfectly in *D*eb*ia*n.

*H*ere's my rc.conf:

```
rpcbind_enable="YES"
nfs_server_enable="YES"
nfsv4_server_enable="YES"
nfs_server_flags="-u -t -n 4"
nfsuserd_flags="-verbose"
mountd_flags="-r -l"
```


----------



## mrgoatman (Jan 30, 2014)

*W*ell, after some wiresharking I found the error, my FreeBSD only has mountd version 1 and 3 running.


```
100005    1    udp6      ::.3.215               mountd     superuser
    100005    3    udp6      ::.3.215               mountd     superuser
    100005    1    tcp6      ::.3.215               mountd     superuser
    100005    3    tcp6      ::.3.215               mountd     superuser
    100005    1    udp       0.0.0.0.3.215          mountd     superuser
    100005    3    udp       0.0.0.0.3.215          mountd     superuser
    100005    1    tcp       0.0.0.0.3.215          mountd     superuser
    100005    3    tcp       0.0.0.0.3.215          mountd     superuser
```

The RPC mountd on Debian supports version 2, and while mountd has an option to do `mountd` with -2 version, I still have no luck,


```
ps -aux | grep mountd,
```


```
/usr/sbin/mountd -2 -r
```

and still my table looks like 


```
100005    1    udp6      ::.3.215               mountd     superuser
    100005    3    udp6      ::.3.215               mountd     superuser
    100005    1    tcp6      ::.3.215               mountd     superuser
    100005    3    tcp6      ::.3.215               mountd     superuser
    100005    1    udp       0.0.0.0.3.215          mountd     superuser
    100005    3    udp       0.0.0.0.3.215          mountd     superuser
    100005    1    tcp       0.0.0.0.3.215          mountd     superuser
    100005    3    tcp       0.0.0.0.3.215          mountd     superuser
```

Any thoughts why it doesn't force version 2? I don't see jack in the logs.

Thanks,
goat


----------



## mrgoatman (Jan 31, 2014)

Fixed my problem using TFTP instead of mountd. Cheers FreeBSD.


----------



## wblock@ (Jan 31, 2014)

mrgoatman said:
			
		

> Fixed my problem using tftp() instead of mountd(). Cheers FreeBSD.



How?


----------



## mrgoatman (Feb 1, 2014)

Sorry for the brevity, I decided to ditch NFS to host my kernel and device tree files, and instead came upon a great resource to start a TFTP server on freebsd FreeBSD, link here. http://www.wonkity.com/~wblock/docs/html/pxe.html

After I was out of the u-boot enviro*n*ment, I normally went about and mounted NFS as my root file system on the u-boot machine and all was gravy, except for one bug.


```
Sleeping thread (tid 100091, pid 3303) owns a non-sleepable lock
KDB: stack backtrace of thread 100091:
.
.
.
#11 0xffffffff80844893 at nfsvno_namei+0x273
#12 0xffffffff80836e76 at nfsrvd_lookup+0xd6
#13 0xffffffff80828961 at nfsrvd_dorpc+0x981
#14 0xffffffff80836767 at nfssvc_program+0x447
.
.
.
panic: sleeping thread
cpuid = 0
```

Essentially the same problems seen here, http://lists.freebsd.org/pipermail/free ... 69828.html

Now *I*'m in the process of upgrading to 10 RELEASE.


----------

