Tuesday, August 16, 2011

Fix for NFS v4 inverse squashing

Due to an NFS Bug, when ZFS is shared over NFS4 on the client side all files will appear owned by nobody:nogroup. If idmapd is not set it will be 4294967294: 4294967294.

The client can still read and write and the files will appear normally on the server. Chown will fail, which means you cannot run VM images off this share.

Mounting this with nfs option vers=3 in /etc/fstab is the only workaround until the bug is fixed.

Native (non-FUSE) ZFS on linux

Thanks to Darik Horn, we can have native ZFS on linux. Instructions here. Works on natty, but may have issues on Lucid.


  1. Preemptible kernels not supported. This should be OK for servers. 
  2. The ppa does not actually cover all dependencies. I had to figure out zlib1g-dev and uuid-dev

sudo add-apt-repository ppa:dajhorn/zfs
sudo apt-get update
sudo apt-get install zlib1g-dev uuid-dev ubuntu-zfs 

If you get the following error, the build is unsuccessful:

Failed to load ZFS module stack.
Load the module manually by running 'insmod /zfs.ko' as root.

To determine missing dependencies:

cd /var/lib/dkms/zfs/*/build
./configure. # Error message will tell you what dependencies are missing
make install

Repeat or other directories under dkms if they had errors. If you get any error regarding unknown symbol or module format, you have booted the wrong kernel.

Update: As of Ubuntu precise 12.04, ubuntu-zfs installs flawlessly and takes care of all dependencies.