[Pkg-sysvinit-devel] New initscript to do all bind and loop mounts?

Miquel van Smoorenburg miquels at cistron.nl
Tue Jan 24 17:02:50 UTC 2006


On Tue, 2006-01-24 at 14:40 -0200, Henrique de Moraes Holschuh wrote:
> On Tue, 24 Jan 2006, Thomas Hood wrote:
> > The initscripts in the initscripts package are limited in purpose: they mount enough
> > filesystems, using the information in /etc/fstab, to make the basic things available,
> > including /usr and /var.
> > 
> > What's needed for more advanced setups is a program that can sort out the dependencies.
> > Fortunately, such programs already exist.  automounters.  automounters have their own
> > configuration files written in a language that is adequate to what automounters have
> > to do.
> > 
> > Taking care of arbitrary filesystem setups should not be considered to be a
> > responsibility of initscripts.  If someone's /usr or /var is a bind mount or a loop
> > mount then this should to be regarded as a custom setup.
> 
> I disagree.  IMHO anything that can be correctly represented in /etc/fstab
> AND does not depend on the network should be supported.  In fact, that's
> what we have right now, and I for one use it extensively to setup
> system-wide bind mounts for example.   Why break that?   As long as there is
> properly ordering in /etc/fstab, it works.
>
> Now, there's a *second* question: why do we special-case NFS?  We could
> simply have a mount-networked-filesystems script, that again uses
> /etc/fstab, and tries to mount everything in there that is auto and not
> mounted yet.   That would take care of all sane setups (and of nfs too).

Because of people with /my/chroot mounted on NFS and a
local /my/chroot/proc and /my/chroot/var mounted on top of that.

I agree that there should be a way to sort out the dependencies. In the
above situation I don't think automount would work (.. reliably.)

The network filesystems in /etc/fstab SHOULD all be marked as _netdev,
and mount/umount should be extended to understand that if /my/chroot
doesn't get mounted neither should it even try to mount /my/chroot/proc.
Ofcourse you could also mark /my/chroot/proc as _netdev but that's ugly.

For unmounting the same goes - if you want to unmount all network
filesystems you first need to unmount anything that is a non-network
filesystem and that is mounted on top of one of those.

Furthermore whoever implements this should also fix #200751.

A different angle:

If we can agree that /etc/fstab should only mount filesystems for which
support is present on the root filesystem, there would be no need to
keep the mount-networked-filesystems script seperate.

And if we can agree that we only need facilities present on the root
filesystem to unmount all filesystems there would be no need here to
keep the umount-networked-filesystem seperate either.

And then things would be way way simpler (esp. if #200751 gets
implemented).

I'm not sure this last idea is really feasible.

Mike.




More information about the Pkg-sysvinit-devel mailing list