Ubuntu AUFS NFS Export
I’ve had many people ask in the comments on my original thread how to get NFS exports working with their stock kernel. The default Ubuntu kernel does not have the option for NFS exports on AUFS filesystems enabled. Rather than walk you through the process of compiling your own custom kernel, I decided to compile the current kernel and headers on my 64 bit system. If you use the 64 bit Ubuntu 12.04 server, you should be able to grab this package, untar, install, reboot, and have NFS support.
1
2
3
4
5
wget https://zackreed.me/wp-content/uploads/2013/10/ubuntu_12.04_64bit_kernels.zip
tar xvf ubuntu_12.04_64bit_kernels.zip
dpkg -i linux-image-3.2.51-customsds5+_3.2.51-customsds5+-10.00.Custom_amd64.deb
dpkg -i linux-headers-3.2.51-customsds5+_3.2.51-customsds5+-10.00.Custom_amd64.deb
reboot
Install NFS Server
1
apt-get install nfs-kernel-server
Enable some exports
1
nano /etc/exports
Paste in something like this. I added the insecure option so that the export would work with my OS X boxes.
1
/storage 192.168.172.0/24(rw,fsid=0,sync,insecure,no_subtree_check,crossmnt,anonuid=1000,anongid=1000)
1
exportfs -a
At this point NFS exports should be working on your AUFS filesystem.
**Is the wrong / old kernel booting instead of your new, fancy NFS-enabled kernel?**
One problem you may have is that this new kernel is not showing up as the default in your Grub Boot menu. It’s likely that it is showing up at the top of the previous linux versions list in Grub. If this is the case, you can easily set it as default. First make a backup of your default Grub list.
1
cp /etc/default/grub /etc/default/grub.bak
Next, edit the file.
1
nano /etc/default/grub
edit the GRUB_DEFAULT line from GRUB_DEFAULT=0 to this.
1
GRUB_DEFAULT="Previous Linux versions>0"
This will boot the first item in the list. Fnially, update the Grub Menu.
1
update-grub