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.
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
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: 126.96.36.199/255.255.255.255 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),
192.0.2.1 is your public facing router IP and
192.168.64.96 is your internal NFS NAS:
# NFS marmot -> internal-server -A PREROUTING -i ppp0 -s 188.8.131.52 -d 192.0.2.1 -p tcp -m multiport --dports 111,2049,32767 -j DNAT --to-destination 192.168.64.96 -A PREROUTING -i ppp0 -s 184.108.40.206 -d 192.0.2.1 -p udp -m multiport --dports 111,2049,32767 -j DNAT --to-destination 192.168.64.96
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.
Until the NFS replica is set up a sraight forward mount point is configured in
router.foobar.wormnet.eu:/photos /home/alex/bitbucket/photos nfs4 relatime,nodev,nosuid,noexec,sec=none,soft,bg,fsc,ro 0 0
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).