tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ZFS - mounting filesystems (Was CVS commit: src/etc)



Brad Spencer <brad%anduin.eldar.org@localhost> writes:
>> But seriously, I think tsorting the filesystems is necessary, and then
>> there's putting filesystems into one of
>>
>> required
>> optional
>>
>> and then some sort of label for
>>
>> before-starting-networking
>> after-networking-before-daemons
>>
>> and so on.
>
> Ya, that is mostly what I would suspect is desirable if you mean sorting
> by type. The real world problem I see, however, is figuring out what
> the type is. Failing to do that means making a hard choice.. in a
> practical sense it probably means sorting such that ZFS is first and
> then Not-ZFS or the other way around.
I still don't understand and object to this "zfs is special" notion. If
it's a heuristic that ffs is mounted on zfs more than zfs is mounted on
non-root ffs, that's just a guess. If it's something else, I really
don't understand.
I am suggesting labels for filesystems that
 1) need to be mounted before networking can start (because they
 contain files that are needed to start networking). This is what
 mountcritlocal is for.
 2) need to be mounted before daemons can start, but need networking
 to mount. This is what mountcritremote is for.
There's a larger philosophical point which is if remote filesystems
matter *for the operation of systems*. Surely remote filesystems
matter and should matter more over time -- it's kind of a bug that we
don't have fully satisfactory remote filesystems now (think disconnected
like coda, no kludges, good security properties, robust).
Storage has gotten plentiful, so one might say that the local system can
be local. But, dealing with configuration is still hard, and remote
storage for computers is sort of like virtualization. If we were to say
"there is no such concept as mountcritremote any more" that would mean
 if you are operating diskless (maybe for testing, maybe for lack of
 admin of local storage), then you have to have the whole system on /,
 because /usr and /var don't get mounted before daemons and thus cannot
 contain logging or config on remote filesystems (other than /), which 
 similarly for /usr/pkg probably in /.
This means no sharing of /usr, no sharing of /usr/pkg. That sort of
sharing and ability to be read-only is part of the historical BSD design
and I think it still makes sense.
The thing that might make sense is to say that while all the above is
valid, there is no reason to refrain from mounting everything that is
local during the mountcritlocal phase. Except that if you want to mount
local things on top of remote things.
Which brings me back to 1) tsorting the mountpoints and 2) having
mountcritlocal and mountcritremote properties to enforce the barriers.
So if we just add a mountcritlocal boolean property to zfs filesystems
(because we can't cleanly list them in critical_filesystems_local when
they are mounted from the zfs database), I think we're back to where we
were, which is still a pretty good place.
People with zfs / can put the critical property on zfs /var, /usr, and
maybe /usr/pkg, and on random things like /usr/obj can add it or not as
they please. People who want to to stack remote/local in odd ways can
do that as well as they can today.
Some data about our current rc.d system. Doing rcorder * and reading it
is useful, as is grepping for REQUIRES on key things. (Surely there
must be a rcorder->graphviz script?)
Things that depend on mountcritlocal follow. Note that routed is
missing from this list, probably as an optimization that it is in /sbin
which can be relied on to be mounted.
 bootconf.sh:# REQUIRE: mountcritlocal
 dhcpcd:# REQUIRE: network mountcritlocal
 ip6addrctl:# REQUIRE: root bootconf mountcritlocal tty
 ipfilter:# REQUIRE: root bootconf mountcritlocal tty
 ipsec:# REQUIRE: root bootconf mountcritlocal tty
 iscsid:# REQUIRE: NETWORKING mountcritlocal
 mdnsd:# REQUIRE: network mountcritlocal staticroute
 mountcritremote:# REQUIRE: NETWORKING root mountcritlocal
 network:# REQUIRE: ipfilter ipsec mountcritlocal root tty sysctl
 npf:# REQUIRE: root bootconf mountcritlocal tty network
 npf_boot:# REQUIRE: root bootconf mountcritlocal tty
 pf:# REQUIRE: root bootconf mountcritlocal tty network dhcpcd
 pf_boot:# REQUIRE: root bootconf mountcritlocal tty
 random_seed:# REQUIRE: mountcritlocal
 route6d:# REQUIRE: network mountcritlocal
 smtoff:# REQUIRE: root bootconf mountcritlocal tty
 wpa_supplicant:# REQUIRE: network mountcritlocal
These are the things that depend on mountcritrmote:
 SERVERS:# REQUIRE: mountcritremote
 altqd:# REQUIRE: mountcritremote
 dmesg:# REQUIRE: mountcritremote
 fccache:# REQUIRE: mountcritremote
 hostapd:# REQUIRE: mountcritremote
 ifwatchd:# REQUIRE: mountcritremote syslogd
 ipfs:# REQUIRE: ipnat mountcritremote downinterfaces
 ipnat:# REQUIRE: ipfilter mountcritremote
 mixerctl:# REQUIRE: mountcritremote
 motd:# REQUIRE: mountcritremote
 mountall:# REQUIRE: mountcritremote named ypbind
 named:# REQUIRE: NETWORKING mountcritremote syslogd
 newsyslog:# REQUIRE: mountcritremote sysdb
 ntpdate:# REQUIRE: NETWORKING mountcritremote syslogd named
 ppp:# REQUIRE: mountcritremote syslogd
 pwcheck:# REQUIRE: mountcritremote syslogd
 rtclocaltime:# REQUIRE: mountcritremote
 swap2:# REQUIRE: mountcritremote
 sysdb:# REQUIRE: mountcritremote
 syslogd:# REQUIRE: mountcritremote sysdb wscons
 unbound:# REQUIRE: NETWORKING mountcritremote syslogd
 virecover:# REQUIRE: mountcritremote
 wscons:# REQUIRE: mountcritremote
DAEMON depends on NETWORKING and SERVERS and then
 LOGIN:# REQUIRE: DAEMON
 apmd:# REQUIRE: DAEMON
 automountd:# REQUIRE: DAEMON
 autounmountd:# REQUIRE: DAEMON
 bluetooth:# REQUIRE: DAEMON
 bootparams:# REQUIRE: rpcbind DAEMON
 devpubd:# REQUIRE: DAEMON
 dhcpd:# REQUIRE: DAEMON
 dhcpd6:# REQUIRE: DAEMON
 dhcrelay:# REQUIRE: DAEMON
 dovecot:# REQUIRE: DAEMON LOGIN ntpdate
 ejabberd:# REQUIRE: DAEMON
 envsys:# REQUIRE: LOGIN DAEMON
 identd:# REQUIRE: DAEMON
 inetd:# REQUIRE: DAEMON LOGIN
 irdaattach:# REQUIRE: DAEMON
 isibootd:# REQUIRE: DAEMON
 local:# REQUIRE: DAEMON
 lpd:# REQUIRE: DAEMON
 makemandb:# REQUIRE: DAEMON
 matrix-synapse:# REQUIRE: DAEMON
 milter-greylist:# REQUIRE: DAEMON
 mopd:# REQUIRE: DAEMON
 mosquitto:# REQUIRE: DAEMON
 moused:# REQUIRE: DAEMON
 mrouted:# REQUIRE: DAEMON
 ndbootd:# REQUIRE: DAEMON
 nginx:# REQUIRE: DAEMON
 ntpd:# REQUIRE: DAEMON
 opendkim:# REQUIRE: DAEMON
 pgsql:# REQUIRE: DAEMON
 powerd:# REQUIRE: DAEMON
 rarpd:# REQUIRE: DAEMON
 rbootd:# REQUIRE: DAEMON
 rsyncd:# REQUIRE: DAEMON
 rtadvd:# REQUIRE: DAEMON
 rwho:# REQUIRE: DAEMON
 screenblank:# REQUIRE: DAEMON
 timed:# REQUIRE: DAEMON
 tor:# REQUIRE: DAEMON NETWORKING
 tpctl:# REQUIRE: DAEMON wscons
 xdm:# REQUIRE: DAEMON LOGIN wscons
LOGIN then depends on DAEMON

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index

AltStyle によって変換されたページ (->オリジナル) /