# Troubleshooting NFS [SOLVED]

## slackline

Hi,

I've an NSLU2 that I'd unslung with SlugOS.  I recently updated to the new 5.3 release from 4.8 and am having trouble getting my NFS partitions mounted now.  Tried soliciting assistance from nslu2-linux but traffic is low and nothing forthcoming.

On the server (NSLU2) I've not really modified anything between configurations, my /etc/exports file only reflects the changes in mount points (I disabled automounting and instead mount by UUID to defined mount points, so naturally I had to modify /etc/exports to reflect the current mount points of the partitions).

```

## /dev/sda1

UUID=4c56a407-97fd-491c-9032-c5068a8f1f16       /mnt/backup        ext3    noatime,users,rw       1  2

## /dev/sda2 (swap)

#UUID=

## /dev/sda3

UUID=4c375f41-e91d-4fe3-aadb-6ac7f312c4db        /                ext3        noatime,users,rw       1  1

## /dev/sda5

UUID=f1909c33-a679-4c39-967b-2a8a246e5b38       /mnt/portage    ext3    noatime,users,rw       1  3

## /dev/sda6

UUID=55f82e1f-8fc1-479f-bbae-06611eb40142       /mnt/torrents   ext3    noatime,users,rw       1  4

## /dev/sda7

UUID=3d5fad71-9aea-4ce4-89ee-6017fc479eca       /mnt/albums     ext3    noatime,users,rw       1  5

## /dev/sdb1

UUID=aa5f1bb9-573d-40e2-b001-d0d3336e852f       /mnt/music      ext3    noatime,users,rw       1  1

## /dev/sdb2

UUID=39f901a5-e345-4198-8af3-648bee321a20       /mnt/video      ext3    noatime,users,rw       1  1

## /dev/sdb3

UUID=3db6ca09-c7f3-4204-bab8-3fdda5a52da9       /mnt/pics       ext3    noatime,users,rw       1  1

## /dev/sdb5

UUID=1a823ba7-2374-4217-92d9-acf0ab26bd94       /mnt/doc        ext3    noatime,users,rw       1  1

## /dev/sdb6

UUID=a0dc2378-713c-4baf-8a68-bdd6da270436       /mnt/work1      ext3    noatime,users,rw       1  1

## /dev/sdb7

UUID=e6657696-2cfe-48f1-98b0-802e8eb18c1c       /mnt/work2      ext3    noatime,users,rw       1  1

## /dev/sdb8

UUID=282acb86-7e36-4958-bcda-37d2dc82d3e6       /mnt/ref        ext3    noatime,users,rw       1  1

sysfs                /sys                sysfs        defaults        0  0

proc                /proc                proc        defaults        0  0

tmpfs                /var/volatile        tmpfs        mode=0755        0  0

tmpfs                /dev/shm        tmpfs        mode=0777        0  0

usbfs                /proc/bus/usb        usbfs        defaults        0  0

```

```

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

## /usr/portage

/mnt/portage        192.168.1.0/255.255.255.0(rw,async,subtree_check,no_root_squash)

## 250Gb LaCie

## pics1

/mnt/torrents        192.168.1.0/255.255.255.0(rw,async,subtree_check)

## music1

/mnt/albums        192.168.1.0/255.255.255.0(rw,async,subtree_check)

## 500Gb LaCie

## music2

/mnt/music        192.168.1.0/255.255.255.0(rw,async,subtree_check)

## video

/mnt/video        192.168.1.0/255.255.255.0(rw,async,subtree_check)

## pics2

/mnt/pics        192.168.1.0/255.255.255.0(rw,async,subtree_check)

## doc

/mnt/doc        192.168.1.0/255.255.255.0(rw,async,subtree_check)

## misc

/mnt/work1        192.168.1.0/255.255.255.0(rw,async,subtree_check)

## work

/mnt/work2        192.168.1.0/255.255.255.0(rw,async,subtree_check)

## ref

/mnt/ref        192.168.1.0/255.255.255.0(rw,async,subtree_check)

```

```

# df -h

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/root                 6400      5468       932  85% /initrd

/dev/sda3              9843308    226788   9116500   2% /

/dev/sda3              9843308    226788   9116500   2% /dev/.static/dev

udev                      2048        96      1952   5% /dev

/dev/sda5              9841097   3812100   5528976  41% /mnt/portage

/dev/sda6            109969760  42062680  62320880  40% /mnt/torrents

/dev/sda7            109969760  29739320  74644240  28% /mnt/albums

/dev/sdb1            196870980 154984336  31886184  83% /mnt/music

/dev/sdb2             98435476  85452732   7982516  91% /mnt/video

/dev/sdb3             98435476  93433356      1892 100% /mnt/pics

/dev/sdb5             19694836  14750992   3943400  79% /mnt/doc

/dev/sdb6             19694836   3840028  14854364  21% /mnt/work1

/dev/sdb7             29538432   6112296  21925668  22% /mnt/work2

/dev/sdb8             18050192   4360360  12772924  25% /mnt/ref

tmpfs                    15120         0     15120   0% /var/volatile

tmpfs                    15120         0     15120   0% /dev/shm

```

```

$ ls -l /mnt/

drwxrwxrwx    6 root     users        4096 Jul 12 07:03 albums

drwxrwxr-x    2 root     users        4096 Jul 12 07:03 backup

drwxrwxrwt   43 root     users        4096 Jun  7 21:49 doc

drwxrwxrwt   20 root     users        4096 Jun  7 10:22 music

drwxrwxrwt   20 root     users        4096 Nov 23  2008 pics

drwxrwxr-x  162 root     users        5120 Jun 28 23:07 portage

drwxrwxrwt  215 root     users       12288 Jul  7 14:07 ref

drwxrwxr-x   46 root     users        4096 Jul 12 05:12 torrents

drwxrwxrwt   14 root     users        4096 Feb 12 08:30 video

drwxrwxrwt   18 root     users        4096 Jun 15 12:56 work1

drwxrwxrwt   15 root     users        4096 May  7 07:08 work2

```

On the server (NSLU2) I have the requisite nfsserver software and kernel modules installed and running...

```

1214 root      1904 S    /usr/sbin/mountd -f /etc/exports  

 1216 root      1664 S    /usr/sbin/statd 

```

So as far as I can tell things are looking ok on the server.  But when I come to mount the partitions on my Gentoo client I'm told...

```

# mount -v /usr/portage/

mount.nfs: timeout set for Sun Jul 12 08:40:33 2009

mount.nfs: text-based options: 'addr=192.168.1.101'

mount.nfs: mount(2): Permission denied

mount.nfs: access denied by server while mounting slug:/mnt/portage

```

Yet as far as I can tell I've set things up as they should be.  There's not output on the server (NSLU2) under dmesg to indicate what might be going wrong.

Can anyone suggest how I might investigate further or where I've gone wrong?

Cheers

slack

----------

## fangorn

NFS needs quite a pack of services configured/running. Main Pitfall is the portmap daemon, that has to be running on server and client. 

check your /etc/hosts.allow and /etc/hosts.deny 

hosts.allow should have entries for these services minimum

```
portmap:    192.168.1.0/255.255.255.0

portmap:    255.255.255.255 0.0.0.0

mountd:     192.168.1.0/255.255.255.0

lockd:      192.168.1.0/255.255.255.0

statd:      192.168.1.0/255.255.255.0

rquotad:    192.168.1.0/255.255.255.0
```

while hosts.deny can be 

```

ALL: PARANOID
```

Then all of the services have to be running on the server and some even on the client. Distributions differ in how they call / package these services in the /etc/init.d directory, so you have to see for yourself if they are running. 

It also is possible that your new SlugOS uses iptables rules. That is - from the NFS point of view - not a good idea.

----------

## slackline

Thanks for the reply fangorn.

 *fangorn wrote:*   

> NFS needs quite a pack of services configured/running. Main Pitfall is the portmap daemon, that has to be running on server and client. 

 

On the client side (my gentoo system) nothing has changed I've not modified anything with rc-update and ps shows that portmap/mountd/statd/rpc.*d etc. are all running.  So I don't think the problem is going to be on the client.

On the server there is portmap / mountd -f/etc/exports / statd running.

On both server and client though there is not rquotad service running, what does this do, is it a definite requirement (don't think I've ever noticed it running) and what package is it under on gentoo?

 *fangorn wrote:*   

> 
> 
> check your /etc/hosts.allow and /etc/hosts.deny 
> 
> hosts.allow should have entries for these services minimum
> ...

 

I did have...

```

ALL EXCEPT in.ftpd:192.168.1.*

```

```

ALL:ALL

```

So I tried out your suggestion above (restarted the nfsserver/statd/portmap services), but no dice, still get permissions denied.

 *fangorn wrote:*   

> Then all of the services have to be running on the server and some even on the client. Distributions differ in how they call / package these services in the /etc/init.d directory, so you have to see for yourself if they are running. 

 

Just to check, these are the daemons running on the client whilst these are all those running on the server.

 *fangorn wrote:*   

> It also is possible that your new SlugOS uses iptables rules. That is - from the NFS point of view - not a good idea.

 

No, no iptables running, install is fairly basic and you have to add things yourself (just to check I ran the following with the package manager and got nil points 'opkg list_installed | grep iptab').

Thanks for your suggestions though, I'm still stumped   :Crying or Very sad: 

----------

## slackline

Right solved this, it was attributable to mixing up packages from the two possible software feeds on the NSLU2 SlugOS 5.3 install.

Full details are in this thread

slack

----------

