1 |
On Sat, 1 Aug 2015 10:05:44 -0500 |
2 |
William Hubbs <williamh@g.o> wrote: |
3 |
|
4 |
> On Fri, Jul 31, 2015 at 05:29:37PM -0700, Patrick McLean wrote: |
5 |
> > On Fri, 31 Jul 2015 17:28:03 -0500 |
6 |
> > William Hubbs <williamh@g.o> wrote: |
7 |
> > |
8 |
> > > On Fri, Jul 31, 2015 at 11:57:59PM +0200, Peter Stuge wrote: |
9 |
> > > |
10 |
> > > What I'm asking about is whether anyone knows of a smoothe way to |
11 |
> > > transition users from local/netmount to mount.<filesystem> |
12 |
> > > dependencies, without breaking systems. If that doesn't exist, 1.0 |
13 |
> > > will have to sit in p.mask until major packages catch up. |
14 |
> > |
15 |
> > You could make "localmount" and "netmount" scripts that |
16 |
> > read /etc/fstab and generate "need" dependencies on the network or |
17 |
> > local filesystems that exist in there. That should emulate current |
18 |
> > behaviour with the new system. |
19 |
> |
20 |
> This is exactly what I'm thinking about. Researching this as I go, there |
21 |
> are reasons to keep localmount and netmount around, but I want to |
22 |
> rewrite them to depend on mount.*. |
23 |
> |
24 |
> There will still be a change in behaviour, because localmount and netmount |
25 |
> never fail in the current setup, but they potentially will in the new setup |
26 |
> based on whether or not one of the file systems they depend on fails to mount. |
27 |
> |
28 |
> I'm a bit concerned about trying to auto generate dependencies in them, |
29 |
> for the same reason I'm concerned about auto generating dependencies in |
30 |
> netmount as it currently stands. |
31 |
> |
32 |
> All of this processing would be in the depend() function, and would be |
33 |
> run every time the OpenRC dependency cache is regenerated. The best way |
34 |
> to process fstab is with the fstabinfo helper, but every time you run |
35 |
> it, that is a possible full scan of fstab, and I worry that that would |
36 |
> slow down dependency cache regeneration for servers with many file |
37 |
> systems. If I don't use fstabinfo, I"m basically re-inventing the wheel |
38 |
> and writing code in sh to parse fstab. |
39 |
|
40 |
You could use fstabinfo or findmnt for processing it, but it does not |
41 |
need to do all the processing, you could cache the results and only |
42 |
regenerate when the mtime on the fstab is newer than the cache. |
43 |
|
44 |
On the other hand, unless your fstab is extremely large, it's unlikely |
45 |
this processing will take particularly long, fstab files tend to be |
46 |
pretty short (less than 100 entries), and that is not exactly a large |
47 |
dataset. |
48 |
|
49 |
> |
50 |
> Thoughts? |
51 |
> |
52 |
> William |
53 |
> |