Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: rfc: improve file system mounting and unmounting in OpenRC
Date: Wed, 05 Aug 2015 15:27:30
Message-Id: 20150805152633.GA1357@linux1.gaikai.biz
In Reply to: Re: [gentoo-dev] Re: rfc: improve file system mounting and unmounting in OpenRC by Ian Stakenvicius
1 On Wed, Aug 05, 2015 at 10:18:13AM -0400, Ian Stakenvicius wrote:
2 > -----BEGIN PGP SIGNED MESSAGE-----
3 > Hash: SHA256
4 >
5 > On 05/08/15 10:01 AM, William Hubbs wrote:
6 > > On Wed, Aug 05, 2015 at 04:50:40AM +0000, Duncan wrote:
7 > >> Ian Stakenvicius posted on Tue, 04 Aug 2015 17:17:51 -0400 as
8 > >> excerpted:
9 > >>
10 > >>> So what you are suggesting here now is that you want to (A)
11 > >>> potentially break mounting with the need to externally manage
12 > >>> mounts via services in openrc instead of just using /etc/fstab,
13 > >>> and (B) also break services if something doesn't start, which
14 > >>> is one of the reasons why you wanted to go through with this
15 > >>> per-mount service in the first place. My point is that no, we
16 > >>> should keep localmount as succeeding even if one of the
17 > >>> dependent services fails to mount, *just like it does right
18 > >>> now*, *for the same reasons* as it succeeds on failure right
19 > >>> now.
20 > >>
21 > >> +1
22 > >>
23 > >> IMO, localmount must continue to succeed /by/ /default/, even if
24 > >> some mounts fail, because it's basically legacy, and must
25 > >> maintain legacy behavior. Turning it into a wrapper "internally"
26 > >> is fine, but the overall localmount must still succeed, as too
27 > >> much depends on that behavior as it is.
28 > >
29 > > Here's what I'm trying to deal with. Consider what happens if
30 > > service a still has "need localmount" and service b has "need
31 > > mount.foo".
32 > >
33 > > Mounting a file system twice causes failures the second time it is
34 > > mounted, so I either have to add special handling in the new
35 > > mount script for file systems that are already mounted or come up
36 > > with a way to make sure localmount runs after all instances of the
37 > > new mount script.
38 >
39 > Yes. I sincerely hope this was always part of the plan???
40 >
41 > If localmount is kept as a 'mount -a' then it won't remount anything
42 > that's already been mounted, so nothing to worry about there. If it's
43 > a wrapper to the individual local mount.*'s then it just has to
44 > depend() on them all via a need/want (so that they will be brought in
45 > even if they aren't in the runlevel) and/or the mount.*'s need a
46 > 'before localmount' so that they're definitely started/attempted
47 > first. Am I missing something that makes this harder than it seems?
48
49 It isn't localmount that would have the issue, but mount.* because they
50 are lexically after localmount, so you would end up with localmount
51 doing a mount -a then mount.* coming later trying to mount file systems
52 again that were mounted by localmount.
53
54 >
55 >
56 > >
57 > > The issue with making sure all mount scripts run before localmount
58 > > would complicate things more for users because they would have to
59 > > add the mount.foo symlinks to the appropriate runlevels (boot for
60 > > local file systems and default for network ones).
61 >
62 > Likely true as things stand now, which is why I expect major changes
63 > would be needed in openrc internals to make it so this is not
64 > necessary. At minimum, "want" dependencies would need to be used so
65 > that if mount.foo's don't exist they won't cause depend() failures.
66 >
67 > (You thought this system was going to let you get away with -not-
68 > using 'want' for mounting, didn't you? :)
69
70 Not exactly, I just don't want to use want along with fstab scanning in
71 netmount to try to make netmount start network file system daemons. I
72 never was opposed to the want dependency on its own.
73
74 > Of course this still doesn't handle how depend() sections will be
75 > dynamically generated from /etc/fstab in the first place, nor how the
76 > cache will be affected by this; so there's still lots of work to do to
77 > sort that out.
78
79 There is no plan to dynamically generate depend() functions.
80
81 William

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-dev] Re: rfc: improve file system mounting and unmounting in OpenRC Duncan <1i5t5.duncan@×××.net>