This a patch to make openafs-kernel buildable on openvz system (it changes build-system and uses #if's to make sure that it will not break other builds). Patch was posted to upstream and to openvz bugzilla. There is also a patch on openafs-gentoo patchset, which contains init.d scripts, to make them respect mount --bind's on containers. Reproducible: Always Steps to Reproduce:
Created attachment 183199 [details, diff] openafs-kernel-1.4.8-openvz.patch That patch don't virtualize libafs kernel module - it's too hard and useless, it just allows /afs from HN to be mount --bind'ed into CT. Two important things: 1) CT must be started before mount and bind must be completed into root/ (simfs), not private/. 2) After openafs-client restart on HN all binds will be blanked, so you must remount them every time on client restart (that's done by patch below)
Created attachment 183202 [details, diff] openafs-1.4.8-r1-gentoo-scripts.patch This patch modifies {configs,scripts}/openafs-client. It adds to new operations for init.d script - unbind and restore. unbind looks for `mount --binds` on /afs root (maybe it will be usefull to search for /afs[^[:space:]]* instead, if someone need only specific binds), saves them into /tmp/some/file/from/conf.d and unmounts them to make umount /afs possible. Restore looks into /tmp/some/file/from/conf.d and runs each command-line to restore `mount --bind`'s to pre-stop state.
Reassigning to maintainer, CCing net-fs herd.
openafs is lacking an active maintainer atm; get openvz stuff integrated upstream as for the init.d stuff, that looks like the last thing we want to do ... random mount management in non-baselayout init.d scripts