The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Grant Taylor via TUHS <tuhs@minnie.tuhs.org>
To: tuhs@minnie.tuhs.org
Subject: Re: [TUHS] /usr separation
Date: Tue, 23 Feb 2021 11:28:13 -0700	[thread overview]
Message-ID: <78fede43-bf9b-5a56-5e59-e6ee5a0ee23d@spamtrap.tnetconsulting.net> (raw)
In-Reply-To: <m1lEbV3-0036x9C@more.local>

[-- Attachment #1: Type: text/plain, Size: 6096 bytes --]

On 2/23/21 10:29 AM, Greg A. Woods wrote:
> Maybe there isn't any impetus to _create_ a separate /usr these days 
> of large software but even larger disks.

I'm undecided.  Part of me likes the / (root) and /usr split.  But 
another part of me questions /if/ and (if so) /why/ it is (still) /needed/.

> However I think there are at least two good reasons to _maintain_ 
> a separate /usr.  At least for ostensibly POSIX and Unix compatible 
> systems, that is.

Does /usr actually /need/ to be a /separate/ file system?  Or would a 
wholesale link from /usr to / (root) suffice?  Or perhaps a collection 
of sym-links from /usr/<foo> to /<foo> suffice?

> For one there's a huge amount of deeply embedded lore, human 
> (finger and brain) memory, actual code, documentation, and widespread 
> practices that use this separation and rely on it, effectively making 
> it a requirement.

Are they relying on the /separation/ of separate file systems?  Or are 
they simply relying on wrote memory for the path?  Ergo sym-links could 
fulfill the perceived need?

> As Steve mentions above there's also the concept of knowing the 
> minimum requirements for bringing up a system capable of the most 
> basic tasks.

The pat response to this in the Linux community is "That's what the 
initrd / initramfs is for!"

What that fails to take into account is if the system actually uses an 
initrd / initramfs or not.  Many of the systems I maintain do /not/ use 
an initrd / initramfs.  Thus the systems have /some/ actual /need/ to be 
able to bring up a minimal system to repair file system problems.  Even 
if the so called problem is simply that the extent file system needs an 
fsck with human interaction (time since last check and / or maximum 
number of mounts).

If you do use an initrd / initramfs, then you can reasonably safely lump 
everything* in the / (root) file system.

*/boot still tends to be it's own file system on Linux, mostly because 
that's where the initrd / initramfs image live which contain drivers for 
more fancy things (software RAID, LVM, ZFS, SAN, etc.) which are needed 
to bring up / (root).

> Of course there's likely going to be some variance in what any 
> given person might define as "most basic tasks", but that's most a 
> separate issue.

Agreed.

However, I posit that "most basic tasks" be what is necessary to 
transition from single user mode to multi-user mode.  Including any and 
all utilities required to fix file systems, work with logical volumes, 
SAN, etc.

> However I will give one example of why this might be a good thing to 
> know and preserved:  it is highly useful for those creating "embedded" 
> systems, or application specific systems.  They can start with just the 
> minimal root filesystem, and then know exactly what they have to add 
> in order to meet their application's requirements precisely.  (and the 
> reasons for doing that can be much wider than many might assume)

Please elaborate on what that has to do with the / (root) vs /usr split?

I feel like you're differentiating between a minimal install vs a 
kitchen sink install.  Which seems to me to be independent of how the 
underlying file system(s) is (are) arranged.

> Also the basic idea of having a root filesystem that contains just 
> and only what's necessary for the system to boot and run, and putting 
> everything else that makes the system usable to users into /usr, 
> is also still a worthwhile concept even just on its own.

Many in the Linux community think this is the job of the initrd / 
initramfs.  I personally believe that this is the job of the / (root) 
file system.

Aside:  In the event that /usr is on the / (root) file system, then the 
system should still be able to come up as if /usr didn't exist b/c it 
had been renamed or was on a separate file system.

> The maintenance of an illusion of a separate /usr can of course be 
> easily done with a farm of symlinks, thus preserving any dependencies 
> in anyone's memory, documentation, or code.

Agreed.  With things like bind mounts, we don't even need to use 
sym-links.  }:-)

Though, one potential danger is that people see duplication between 
/bin/<foo> and /usr/bin/<foo> and decide to remove one of them.  Doing 
so will ultimately remove both and cause someone to have a not good day.

Aside:  Perhaps these not good days are not something to be avoided, but 
instead something to be treated as a learning opportunity.  Much like 
young kids need to learn that fire is hot for themselves.

> However the reality of maintaining a separate minimal toolset for 
> system bring-up is that it cannot be reliably done without constant 
> and pervasive testing; and the very best (and perhaps only) way to 
> achieve this, especially in any smaller open-source project, is for 
> everyone to use it that way as much of the time as possible.  I say 
> this from decades long experience of slowly moving systems to having 
> just one partition for both root and /usr and then on occasion testing 
> with separate root and /usr, and every time I do this testing I find 
> dependencies have crept in on something in /usr for basic booting. 
> (and that's even when I base my system on a platform that still tries 
> hard to maintain this separation of root and /usr!)

I have a different conundrum regarding */bin.  Why do I need nine 
different (s)bin directories in my path?  I -- possibly naively -- 
believe that we have the technology to have all commands in /one/ 
directory, namely /bin.

Quickly after that thought, I realize that I want different things in my 
path than other people do.  So I end up with custom /bin directories. 
Which usually ends up with sym-links that reference variables or custom 
mounts (possibly via auto-mount applying some logic).

> BTW, I think it was Sun that first did some of this merging of root 
> and /usr a very long time ago.

Agreed.  Though I'm far from authoritative.



-- 
Grant. . . .
unix || die


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4013 bytes --]

  reply	other threads:[~2021-02-23 18:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-20 23:09 [TUHS] Abstractions M Douglas McIlroy
2021-02-21  8:15 ` Otto Moerbeek
2021-02-21 11:08 ` Rich Morin
2021-02-21 22:40 ` Dave Horsfall
2021-02-21 23:01   ` Steve Nickolas
2021-02-23  3:31     ` Andrew Warkentin
2021-02-23 17:29       ` [TUHS] /usr separation (was: Abstractions) Greg A. Woods
2021-02-23 18:28         ` Grant Taylor via TUHS [this message]
2021-02-23 18:57           ` [TUHS] /usr separation Theodore Ts'o
2021-02-23 20:29             ` Grant Taylor via TUHS
2021-02-24 14:14               ` Theodore Ts'o
2021-02-24 17:50                 ` Grant Taylor via TUHS
2021-02-24 18:37                   ` Theodore Ts'o
2021-02-24 18:48                     ` Grant Taylor via TUHS
2021-02-25  3:38                       ` Theodore Ts'o
2021-02-24 20:25                     ` Steve Nickolas
2021-02-24 22:08                       ` Steffen Nurpmeso
2021-02-24  3:12         ` [TUHS] /usr separation (was: Abstractions) Andrew Warkentin
2021-02-22  0:13   ` [TUHS] Abstractions Warren Toomey
2021-02-27  2:47     ` Dave Horsfall
2021-02-23  0:25   ` Wesley Parish
2021-02-23  0:38     ` Steve Nickolas
2021-02-23  2:50       ` Theodore Ts'o
2021-02-23  3:19         ` Warner Losh
2021-02-23  1:47     ` Theodore Ts'o
2021-02-21 22:54 ` Clem Cole

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=78fede43-bf9b-5a56-5e59-e6ee5a0ee23d@spamtrap.tnetconsulting.net \
    --to=tuhs@minnie.tuhs.org \
    --cc=gtaylor@tnetconsulting.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).