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.
wget http://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
apt-get install nfs-kernel-server
Enable some exports
Paste in something like this. I added the insecure option so that the export would work with my OS X boxes.
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.
cp /etc/default/grub /etc/default/grub.bak
Next, edit the file.
edit the GRUB_DEFAULT line from GRUB_DEFAULT=0 to this.
GRUB_DEFAULT="Previous Linux versions>0"
This will boot the first item in the list. Fnially, update the Grub Menu.