# Problem with /etc/exports



## balanga (May 15, 2021)

Can someone explain what I'm doing wrong with this /etc/exports file?


```
# exports

/usr    -mapall=root -alldirs    -network 192.168.1.0 -mask 255.255.255.0
/var    -mapall=root -alldirs    -network 192.168.1.0 -mask 255.255.255.0
```

`showmount -e 127.0.0.1`:-

```
Exports list on 127.0.0.1:
/usr                               192.168.1.0
```

I have restarted nfsd and mountd after making those changes. Here are some relevant entries from /etc/rc.conf:


```
## NFS
rpcbind_enable="YES"
nfs_server_enable="YES"
#nfsv4_server_enable="YES"
mountd_enable="YES"
mountd_flags="-r"
```

I must be missing something very basic, but what?


----------



## T-Daemon (May 15, 2021)

Exported mount points (/usr /var, ...), when from the same file system, can be specified only once to the same host (host here 192.168.1.0 subnetwork). If /usr  and /var are on separate file systems (partitions, ZFS data sets) then they must be set on separate lines for the same host.

/usr /var same file sytem:

```
/usr /var    -mapall=root -alldirs    -network 192.168.1.0 -mask 255.255.255.0
```

/usr /var separate file sytem:

```
/usr    -mapall=root -alldirs    -network 192.168.1.0 -mask 255.255.255.0
/var    -mapall=root -alldirs    -network 192.168.1.0 -mask 255.255.255.0
```


----------



## balanga (May 15, 2021)

I've done exactly  that, as I've seen such examples, now after restarting nfsd, mountd...
`showmount -e 192.168.1.20`:

```
Exports list on 192.168.1.20:
```

ie nothing.  192.168.1.20 is the IP address of localhost.

This should be very straightforward, but I must be overlooking something.


----------

