NFS export of a squashfs

Phillip Lougher phillip.lougher at gmail.com
Sun Mar 22 23:47:55 UTC 2009


Gabriel A. von Winckler <winckler <at> campogeral.com.br> writes:

> 
> Hi,
> 
> I'm trying a very unusual setup, and I need to export a squashfs over
> NFS.
> 
> Every document say that it should be possible (if generate the squash
> image without the -no-export flag), but I receive the follow error from
> exportfs (nfs-kernel-server):
> 
>  exportfs: Warning: /mountpoint does not support NFS export.
> 
> A unionfs mountpoint, that should work, doesn't either.
> 
> I tried that with a livecd of PCLinuxOS, kernel 2.6.26.8, and works.
> 
> Is that the expected behavior in Ubuntu? In which package should start
> to debug?
> 

Exporting Squashfs via NFS should work.  Unfortunately after checking Ubuntu's
kernels (9.04 and 8.10) the reason it doesn't work is clear.  Ubuntu has the
export code in Squashfs in their kernels disabled,..

Why?  It's because Ubuntu are using an older version of Squashfs (3.3)
originally written for kernels 2.6.24 and older, which they have incompletely
forward ported to later kernel versions.  Unfortunately the NFS export interface
changed in kernels 2.6.25 and later, which means export code written for 2.6.24
and earlier kernels no longer works.  Evidently rather than forward port the NFS
export code to later kernels they have disabled it.

The solution to this problem is to use a later version of Squashfs (3.4) in
which I rewrote the NFS export code for later kernels.  Why the Ubuntu kernel
team aren't using the latest 3.4 Squashfs release which officially supports
newer kernels than 2.6.24 is something you'll have to ask them.

You can patch the Ubuntu kernel source with the latest Squashfs 3.4.  Squashfs
3.4 is available from http://squashfs.org.uk.  Because Ubuntu put their version
of Squashfs inside the ubuntu directory, the kernel patches in the Squashfs 3.4
release should almost fully apply.  You will get rejects for mm/do_mounts_rd.c
but the rejects for this file can be safely ignored.

Building the new Squashfs version in fs/squashfs as a module should get you a
working module that supports NFS exporting (check dmesg to make sure you're
inserting the Squashfs 3.4 release module).

Phillip

> Thanks,
> 
> Winckler
> 
> P.S: I'm using 9.04 alpha, but I also tried on a 8.10. 
> 
> 








More information about the ubuntu-server mailing list