I just setup a new Debian OpenVZ container on a commercial VPS. It was installed as Lenny, but since I want to install a newer version of Varnish, I upgraded to Squeeze.
uh-oh::/var/cache/apt/archives# dpkg -i dpkg_1.14.26_i386.deb
(Reading database ... 12216 files and directories currently installed.)
Preparing to replace dpkg 1.14.26 (using dpkg_1.14.26_i386.deb) ...
Unpacking replacement dpkg ...
Replaced by files in installed package base-files ...
Setting up dpkg (1.14.26) ...
touch: setting times of `/var/log/dpkg.log': Bad address
Oh-no! A little digging reveals that there is a conflict between the newer version of coreutils and the kernel that is running on the openvz host. I’m surprised as I have an openvz host which is running 2.6.18 with squeeze containers… I think. I’ll have to check that.
This is too bad - Debian’s kernel with openvz doesn’t support nfs mounts within containers. Its supposed to work, but it doesn’t.
My VZ setup:
* Linux pro-100-gl.savonix.com 2.6.26-1-openvz-686 #1 SMP Mon Dec 15 20:27:00 UTC 2008 i686 GNU/Linux
* kernel.ve_allow_kthreads = 1
* modprobe nfs
* vzctl version 3.0.22
* FEATURES=”nfs:on”
# vzctl exec 101 cat /proc/filesystems
ext3
ext2
nodev sysfs
nodev proc
nodev tmpfs
nodev devpts
On a machine with the original etch kernel (2.6.18), NFS client in a container works:
$ cat /proc/filesystems
ext3
ext2
nodev rpc_pipefs
nodev proc
nodev sysfs
nodev tmpfs
nodev devpts
nodev nfs
http://forum.openvz.org/index.php?&t=msg&th=6974
CC arch/x86/kernel/process_32.o
CC arch/x86/kernel/signal_32.o
AS arch/x86/kernel/entry_32.o
CC arch/x86/kernel/traps_32.o
arch/x86/kernel/traps_32.c:827: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘nmi_ipi_callback’
arch/x86/kernel/traps_32.c: In function ‘do_nmi’:
arch/x86/kernel/traps_32.c:882: error: implicit declaration of function ‘nmi_ipi_callback’
arch/x86/kernel/traps_32.c: At top level:
arch/x86/kernel/traps_32.c:889: error: expected ‘)’ before ‘callback’
arch/x86/kernel/traps_32.c: In function ‘unset_nmi_ipi_callback’:
arch/x86/kernel/traps_32.c:896: error: ‘nmi_ipi_callback’ undeclared (first use in this function)
arch/x86/kernel/traps_32.c:896: error: (Each undeclared identifier is reported only once
arch/x86/kernel/traps_32.c:896: error: for each function it appears in.)
make[1]: *** [arch/x86/kernel/traps_32.o] Error 1
make: *** [arch/x86/kernel] Error 2
Hmmmm. I read up on “do_nmi” and it appeared to have to do with multiple cpus, so I enabled Symmetric multi-processing support, tried again, and it appears to work now.
I changed this in /etc/init.d/nfs-user-server:
start-stop-daemon --start --oknodo --quiet --exec /usr/sbin/rpc.nfsd -- -r
printf " nfsd"
start-stop-daemon --start --oknodo --quiet --exec /usr/sbin/rpc.mountd -- -r
printf " mountd"
printf ".\n"
;;
stop)
printf "Stopping $DESC:"
start-stop-daemon --stop --oknodo --quiet --exec /usr/sbin/rpc.mountd
printf " mountd"
start-stop-daemon --stop --oknodo --quiet --exec /usr/sbin/rpc.nfsd
printf " nfsd"
printf ".\n"
;;
reload | force-reload)
printf "Reloading $DESC' configuration files.\n"
start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/rpc.mountd -- -r
start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/rpc.nfsd -- -r
Specifically the “– -r” text at the end of the start-stop-daemon lines. Debian should probably include options in the /etc/default/nfs-user-kernel file.