User Tools

Site Tools



As we are limited on disk space, we are using NASes lurking on the end of xDSL connections. The problem with this is that obvious the xDSL uplinks are slow, but fortunately we can call upon CacheFS to speed things up.


NAS Side

NAT Firewall

Unfortuantely Debian squeeze does not support IPv6 NFS mounts so we have to jump through a bunch of NAT hoops.

If you only plan on using NFSv4 (ie. not NFSv2 and/or NFSv3) then you can set in /etc/default/nfs-common:


You will need to tinker with /etc/default/nfs-kernel-server to make it bind to a non-dynamic port:

RPCMOUNTDOPTS="--manage-gids -p 32767"

Add to your /etc/hosts.allow file whitelistings for marmot (you can pin it to portmap/mountd/nfsd if you wish):

## wormnet
# marmot
ALL: [2a03:9800:10:2d::]/64

You will also need to tinker with your firewall to port forward everything that is required. In the below example (for the 'nat' table), is your public facing router IP and is your internal NFS NAS:

# NFS marmot -> internal-server
-A PREROUTING -i ppp0 -s -d -p tcp -m multiport --dports 111,2049,32767 -j DNAT --to-destination
-A PREROUTING -i ppp0 -s -d -p udp -m multiport --dports 111,2049,32767 -j DNAT --to-destination

LDAP Replication

NFS Replicas


Jamie and I plan to have an rsync session keeping content between our NASes in sync (probably with inosync or lsyncd). Once done we can use 'replicas' in /etc/exports to tell marmot that it can pull the file contents from either of our xDSL links.

marmot side

Until the NFS replica is set up a sraight forward mount point is configured in /etc/fstab:       /home/alex/bitbucket/photos     nfs4    relatime,nodev,nosuid,noexec,sec=none,soft,bg,fsc,ro       0  0

The “bg,soft” hopefully helps out if the xDSL link is down when marmot reboots and “fsc” instructs marmot to use CacheFS (using the 'cachefilesd' daemon).

nas.txt · Last modified: 2011/11/22 11:09 by alex