On Wed, Jan 19, 2022 at 6:14 PM Chris Adams <linux(a)cmadams.net> wrote:
Once upon a time, Chris Murphy <lists(a)colorremedies.com> said:
> > For example, snmpd stores program-generated config in /var/lib/net-snmp,
> > which gets merged with config from /etc/snmp.
>
> What's the exact consequence of deleting either /etc/snmp and
> /var/lib/net-snmp - separately and together?
Delete either one and permanent config is lost. Admin config is in
/etc/snmp and program-generated config (sometimes based on admin config)
/var/lib/net-snmp.
So it renders the system like a cleanly installed Fedora system. It's
not like there's additional breakage beyond simply not having access
to particular SNMP services. I don't have an /etc/snmp dir, and the
/var/lib/net-snmp dir contains a couple empty directories.
Deleting /var/lib/net-snmp/snmpd.conf means making the agent look
like a
new system, with new IDs, a renumbered interface table, and loss of
SNMPv3 users.
You're not going to wipe /var to do a reset casually - the idea would
be, this hardware isn't coming back to this environment. An easy
option with snapshots is you can define your own rollback point, which
includes environment specific configuration rather than the "wipe /var
and /etc" method of factory reset.
And that's just one thing I know of that uses /var in such a
manner.
How many other things expect /var to be an integrated part of the OS?
Well, affore mentioned selinux issue
https://bugzilla.redhat.com/show_bug.cgi?id=1290659
But deleting /var/lib/selinux doesn't cause obvious failure - though I
might be (silently) in a security reduced situation, I can't really
tell.
Making /usr "special" and throwing all other directories
away is a bad
plan, only sustainable for a niche subset of packages. If snapshots are
so important, an actual integrated plan for the WHOLE OS needs to be
created, not just by recreating all the parts of / that someone is
interested in under /usr.
The snapshots, rollbacks, FHS, /usr /var question is bigger than, and
is also out of scope for, this change proposal. I think it's relevant
and important, but needs to go into its own thread.
--
Chris Murphy