Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: rfc: improve file system mounting and unmounting in OpenRC
Date: Wed, 29 Jul 2015 21:00:03
Message-Id: pan$c7153$9d1b866b$4f63fe10$74e8dbb7@cox.net
In Reply to: Re: [gentoo-dev] rfc: improve file system mounting and unmounting in OpenRC by "Daniel Campbell (zlg)"
1 Daniel Campbell (zlg) posted on Wed, 29 Jul 2015 01:54:03 -0700 as
2 excerpted:
3
4 > On 07/28/2015 06:57 AM, William Hubbs wrote:
5 >>
6 >> I don't quite understand your question, but I'll give it a shot.
7 >>
8 >> With the new mount service, it will not matter whether the file systems
9 >> are local or on the network. It will be up to you to configure the
10 >> mounts for each file system to start in the right order and configure
11 >> their dependencies.
12 >>
13 >> I am not looking at deprecating fstab at this point; I'm not sure how I
14 >> would go about figuring out the locations of mount points without it
15 >> yet.
16 >>
17 > Okay, so OpenRC's filesystem management is more like an enhancement for
18 > standard /etc/fstab mounts?
19 >
20 > My apologies for the vague questions. Perhaps I should spend my next
21 > weekend off learning a bit more about how OpenRC handles mounting.
22
23 What openrc does now is the traditional three-stage (plus fscks where
24 appropriate) mount.
25
26 1) root
27
28 The initial root mount is of course normally read-only, and handled
29 either in the initr* or directly in the kernel. What openrc does is
30 remount it (after fsck if appropriate) using the options in fstab,
31 normally including mounting it writable, altho some installations may
32 keep root read-only by default, as I do here.
33
34 2) other local filesystems
35
36 Openrc's localmount service mounts these (after fsck if appropriate)
37 using the standard mount -a, which basically mass-mounts everything (not
38 marked noauto or on the remote filesystem types exclusion list) in
39 fstab. There's no explicit dependency handling other than processing
40 remote filesystems separately, so the only ordering done is the sequence
41 in which they appear in fstab, and that only because mount -a happens to
42 do it that way.
43
44 So an admin must handle nested mountpoints, etc, manually, either by
45 ensuring that the fstab listing sequence is correct if that's enough, or
46 by setting them noauto in fstab, and either creating creating a custom
47 service to mount them, or doing it entirely manually, issuing the mount
48 commands at the CLI after boot, every time.
49
50 3) other remote/network filesystems
51
52 I have no personal experience with these, but presumably they work the
53 same way as the local filesystem processing, no explicit dependency
54 handling, only minimal implicit fstab-sequential dependency handling.
55
56
57 What williamh is proposing here is the addition of explicit dependency
58 handling via mount service multiplexing, similar to the way openrc
59 multiplexes its network interface services, thus making explicit
60 dependencies on specific networks, and now filesystems, possible.
61
62
63 [While I'm now subsumed into systemd, I ran live-git openrc-9999 for many
64 years, submitting and sometimes proposing patches for a significant
65 number of bugs along the way. My system setup is customized
66 sufficiently, including multiple mounts, some of them nested, that I
67 found ~arch openrc problematic as it was too granular, dropping a whole
68 bunch of potentially troublesome changes at once, making troubleshooting
69 difficult. By running live-git openrc and religiously checking for
70 updates and reviewing git log orig_head.., and git show-ing any commits
71 that looked interesting, I could follow individual commit-level changes
72 and see where things broke, giving me a head start in patching back to
73 workability, when necessary. Of course this helped catch some of those
74 bugs before they ever made it into an ~arch release, let alone stable, so
75 ~arch users in particular were the beneficiaries. =:^) Anyway, as a
76 result of that, I tend to be rather familiar with openrc's workings,
77 certainly at the service level, tho troubleshooting that did get me
78 exploring the more esoteric functionality of some of the C-coded helper
79 binaries from time to time, as well. Now I'm subsumed into systemd, but
80 as I said, by the time I switched, several other folks were evidently
81 running openrc-9999 as well, filing bugs as necessary, and williamh was
82 doing good things with openrc -- witness this thread -- so I think it was
83 left in good hands. =:^) And I still care about it as even if I'm
84 subsumed, I think it's important that there continues to be *some*
85 alternative to systemd, for much the same reason I make it a practice to
86 note the location of fire extinguishers and exits when I'm traveling -- I
87 want them available should worse come to worse and I have to use them!]
88
89 --
90 Duncan - List replies preferred. No HTML msgs.
91 "Every nonfree program has a lord, a master --
92 and if you use the program, he is your master." Richard Stallman