Description of problem:
If there are filesystems mounted that are either dependent on the rootfilesystem (i.e. bind mounts) or provide chroot environments for userspace programs the rootfilesystem depends on they should not be umounted during halt/reboot. One hotspot where this happens is the netfs initscript. The netfs initscript just umounts every network filesystem other then the rootfilesystem. But this can lead to huge problems if the rootfilesystem itself is dependent on other filesystems dependent on this.
Like the xrootfs approach this introduces a similar one. The patch attached will change the netfs behavior in so far that not only the rootfilesystem is not umounted but also all mountpoints listed in /etc/xtab.
Version-Release number of selected component (if applicable):
always when the rootfilesystem is dependent on other filesystems.
We use it very extensively as we are sharing the rootfs. For this we need a chroot filesystem holding the userspace programs dependent on the rootfilesystem that shouldn't be umounted by netfs. We also have a bindmount where we keep context dependent hostdependent files that should also not being umounted. For this the /etc/xtab approach would help us very much.
Steps to Reproduce:
All filesystems except the rootfs mounted on / is umounted. But this is not appropriate as we need more filesystems to survive.
This behavior should be configurable.
Created attachment 340520 [details]
This patch implements the /etc/xtab approach.
Honestly, I think your setup is somewhat pathological. A separate chroot off the rootfs that is needed to shutdown?
If you use gfs/nfs4/glusterfs/ocfs2 as rootfilesystem you need services being run independently from the rootfilesystem. Like the cluster itself or recovery functions. Even for nfs4 you will at least need rpc.idmapd and might need rpcbind. Cause those cannot run on a filesystem that requires then.
To nevertheless being able to use such a filesystem as rootfilesystem we are building (while booting) a chroot where we put those services and deps in. This needs to umounted "after" the rootfs is being umounted. So that's why we need it.
BTW: halt.local we then do the umounting of the chroot and the leaving of the cluster if need be.
Initscripts no longer handle this -> close.