Hi, if anyone is interested to test aufs with linux-vserver, the attached patch may be useful.
I tested the following cases: i) "normal" use of aufs on a vserver-kernel. That is using aufs for directories not used as a vserver-root-directory. Seems to be o.k. ii) using an aufs-union as the root-directory of a vserver. Seems to work, but tested only with very, very simple usecases (install, pkgmgmt, filesystem traversing). Especially the mmap-support needs care, I think. But no obvious quirks at the moment (well done, Junjiro!) The new nfs-export capability of aufs renders it very, very useful in the case of managing diskless-clients. The same applies to vservers, I think. Provisioning vservers in this way is very clear and simple. Vserver itself supports copy-on-write link-breaking, which has performance benefits compared to aufs, sure, but is sometimes awful to deal with. -- Wilhelm
diff -rupN --exclude=CVS aufs.cvs-28032007/aufs/fs/aufs/vfsub.h aufs.cvs-28032007.vserver/aufs/fs/aufs/vfsub.h --- aufs.cvs-28032007/aufs/fs/aufs/vfsub.h 2007-03-27 16:54:51.000000000 +0200 +++ aufs.cvs-28032007.vserver/aufs/fs/aufs/vfsub.h 2007-03-28 12:24:01.000000000 +0200 @@ -24,6 +24,8 @@ #include <linux/fs.h> #include <asm/uaccess.h> +#include "vserver.h" + #ifdef __KERNEL__ /* ---------------------------------------------------------------------- */ diff -rupN --exclude=CVS aufs.cvs-28032007/aufs/fs/aufs/vserver.h aufs.cvs-28032007.vserver/aufs/fs/aufs/vserver.h --- aufs.cvs-28032007/aufs/fs/aufs/vserver.h 1970-01-01 01:00:00.000000000 +0100 +++ aufs.cvs-28032007.vserver/aufs/fs/aufs/vserver.h 2007-03-28 12:34:29.000000000 +0200 @@ -0,0 +1,14 @@ +#ifndef __VSERVER_H +#define __VSERVER_H + +#ifdef VSERVER + +#define vfs_symlink(dir, dentry, symname, mode) vfs_symlink(dir, dentry, symname, mode, NULL) +#define vfs_mknod(dir, dentry, mode, dev) vfs_mknod(dir, dentry, mode, dev, NULL) +#define vfs_link(src_dentry, dir, dentry) vfs_link(src_dentry, dir, dentry, NULL) +#define vfs_mkdir(dir, dentry, mode) vfs_mkdir(dir, dentry, mode, NULL) +#define vfs_rmdir(dir, dentry) vfs_rmdir(dir, dentry, NULL) +#define vfs_unlink(dir, dentry) vfs_unlink(dir, dentry, NULL) +#endif + +#endif diff -rupN --exclude=CVS aufs.cvs-28032007/aufs/local.mk aufs.cvs-28032007.vserver/aufs/local.mk --- aufs.cvs-28032007/aufs/local.mk 2007-03-28 12:56:38.000000000 +0200 +++ aufs.cvs-28032007.vserver/aufs/local.mk 2007-03-28 12:26:58.000000000 +0200 @@ -11,15 +11,15 @@ CONFIG_AUFS_BRANCH_MAX_1023 = #CONFIG_AUFS_BRANCH_MAX_32767 = CONFIG_AUFS_SYSAUFS = y CONFIG_AUFS_HINOTIFY = -CONFIG_AUFS_EXPORT = +CONFIG_AUFS_EXPORT = y #CONFIG_AUFS_AS_BRANCH = #CONFIG_AUFS_DLGT = -CONFIG_AUFS_LHASH_PATCH = -CONFIG_AUFS_KSIZE_PATCH = -CONFIG_AUFS_DEBUG = y +CONFIG_AUFS_LHASH_PATCH = y +CONFIG_AUFS_KSIZE_PATCH = y +CONFIG_AUFS_DEBUG = CONFIG_AUFS_COMPAT = -AUFS_DEF_CONFIG = +AUFS_DEF_CONFIG = -DVSERVER -include priv_def.mk # Ubuntu Edgy (2.6.17-10-*)
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV