public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Joshua Kinard <kumba@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Let's redesign the entire filesystem! [was newsitem: unmasking udev-181]
Date: Mon, 12 Mar 2012 21:22:26 -0400	[thread overview]
Message-ID: <4F5EA152.80604@gentoo.org> (raw)
In-Reply-To: <20120311173355.GB6599@linux1>

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

On 03/11/2012 13:33, William Hubbs wrote:

> I highly discourage moving more things to /.  If you google for things 
> like, "case for usr merge", "understanding bin split", etc, you will
> find much information that is very enlightening about the /usr merge and
> the reasons for the /bin, /lib, /sbin -> /usr/* split.
> 
> I'll start another thread about this farely soon, but for now I'll say 
> that even though Fedora is a strong advocate of the /usr merge, it
> didn't start there. Solaris started this 15 years ago, and I think it
> would be a good thing for gentoo to implement the /usr merge at some
> point to make us more compatible with other unixes. Another thing to add
> is that it appears that at least Fedora and Debian are doing this.



On a somewhat sarcastic note, why don't we just deprecate /usr and move
everything back to /?  Isn't that, largely, what is being accomplished here?
 Solaris at least keeps some kernel stuff in / off of /stand (I believe).
Linux, after this /usr thing is fully complete, about the only thing left in
/ that is of any value will be /etc.  Kernels were moved into /boot ages ago.

I mean, what really is / in the literal sense?  It's the first filesystem
that the kernel mounts.  If you put everything into /usr, including the init
scripts and /etc, create a few stub mount points for /var, /tmp, etc
(assuming those are separate partitions), then told the kernel that /usr is
/, what's the real difference?  So I think Fedora's approach, while copying
existing behavior from Solaris, is partially broken in this regard.

We should be working to getting rid of /usr and bring it all back into /,
then create temporary /usr symlinks to point programs in the right
direction.  After all, /usr was originally for user data, not system data,
until someone cooked up /home (I don't know the full exact history here, so
feel free to correct me).

Heck, why not redesign the original root filesystem layout while we're at it?

/     - Root.
/boot - Kernels, bootloader.
/apps - Installed, non-system critical applications.  Merges /bin,
        /sbin, /usr/{bin,sbin}, /usr/local/{bin,sbin}, and /lib and
        all of its multilib variants.
/core - System-critical apps needed to get the system into a MINIMAL,
        usable state (core device detection, mounting disks, etc)
/conf - System configuration data.
/dev  - Device nodes.
/home - User stuff.
/data - Variable data.  /var's new name.
/tmp  - System-wide temp dir.
/virt - virtual filesystems (proc, sys, ramfs).
/svcs - Data dir for services (Apache, LDAP, FTP, etc).
/ext  - holds mount points for external devices (merges /mnt & /media).
/root - Superuser's /home.


From that, for the new proposed directories:

/apps/sys/bin - System binaries.  Only non-critical, system-wide binaries
                go here.
/apps/sys/lib - Like /apps/sys/bin above.  Except this can also be
                duplicated for multilib (lib32, lib64, lib128, etc).

/apps/std/bin - Standard program binaries for all non-system, non-critical
                binaries.
/apps/std/lib - Like /apps/std/bin above.  Ditto for multilib.

/apps/local   - If on a stand-alone system, this is a symlink to /apps/std.
                otherwise, this holds a bin/lib folder that is only for apps
                installed locally, while /apps/std might be a network mount
                that holds apps common to multiple systems of the
                same/similar type of install.

/core/bin     - Critical system, binaries needed to get the system into a
                minimally-usable state.  Predominantly occupied by various
                filesystem tools.
/core/lib     - Libraries, usually static, to support /core/bin.  Can be
                multilib, but a system should have a single ABI that can
                successfully boot the userland components of the system.
/core/inf     - Holds minimal information to identify and locate
                boot-critical devices, typically in the form of a small
                database of some design, but which can be parsed with
                no additional dependencies.
/core/init    - Home of your init system of choice, including all the
                information needed for various run levels, etc.  Its
                sub-layout is dependent on the particular init system that
                is installed.

/conf         - Basically a rename of /etc.  The "etc" name doesn't
                convey any useful information to a user anymore about its
                true purpose.  /conf, however, does.  Files stored here
                will largely be comprised of text files that configure
                various system services.  Like /etc, it's sub-layout will
                probably be a complete, unrestrained mess.

/virt         - Everyone loves virtual filesystems.  When there was just
                /proc, everything was alright.  Then /sys comes along, and
                now we've polluted the / namespace with two virtual
                filesystems.  /virt provides a home for those (so /virt/proc
                and /virt/sys), in addition to others like /virt/shm,
                and /virt/pts, or even /virt/ramfs if you want.  Anything
                in here doesn't physically exist, and either changes rapidly
                or is lost once the system loses power.

/data         - Like "etc", /var's original function has been largely
                overridden and hardly contains "variable" data anymore.
                thus, it is reborn as /data, which conveys *exactly* what
                it is for -- data of some kind, whose presence may be
                permanent or transitory.  Mail spools, caches, print spools,
                whatever.  Fill it with data from /dev/urandom if you want!

/svcs         - Like /srv, which some people are resistant to using.  The
                original idea is quite a marvel, though, because it never
                really made any sense to stick Apache into /var/www, or hang
                the TFTP boot directory off of /, or chroot BIND inside of
                /etc or /var (or both).

/ext          - A place for external mounts, either filesystems or devices.
                NFS, CD-ROMs, thumb drives, Samba/CIFS, etc, it goes here.
                This replaces both /mnt and /media, the only difference
                between the two being the same as the difference between
                two shades of purple.  The only exception to this rule is
                /apps/local above.

All other directories retain their original, standard functionality.


I thought this up on a whim, it hasn't been tested nor vetted.  It's largely
meant as a joke, but also to provoke discussion on the current filesystem
design and the direction we're getting pulled in with Fedora's declaration
that separate /usr is broken.  I don't think it is and I don't find their
argument very convincing, and probably never will.

At some point after this change becomes fully adopted (and it will, trust
me), the difference between the / of old and /usr will be so minor, that you
could probably move a few files around, chop /usr off into a separate
partition, and then pass root=/dev/<where /usr is>, and bring a system fully
online, *without a /usr*.  And then, after that, someone will come along and
propose "the new /usr", and the cycle repeats.

But I do, hesitantly, agree that the standard UNIX filesystem has a lot of
"traditions" to it that don't make a lot of sense anymore.  It's a hallmark
of an era where machines usually kept a local copy of stuff needed to start
or stop themselves.  Now we're in an era where machines aren't even physical
anymore.  The location of actual data is somewhat meaningless, if you write
a program correctly and don't hardcode filesystem paths.

So it's probably time to have some kind of a discussion on the filesystem,
and what would need to change to bring it up to date with the era of
large-scale virtualization and embedded systems that run on your wristwatch,
in addition to the standard black (or beige) box sitting on a desk somewhere.

Food for thought.  And yes, I've already tested out udev-181 on a VM with a
separate /usr.  With devtmpfs, the system fully boots just fine, no
initramfs needed.  Guess what the only piece of software to mess up is?
Udev.  I largely think it's a timing issue in OpenRC, however, because /usr
DOES get mounted fairly quickly, but not before udevd starts.  But udevd
does restart itself and everything looks to work fine.  If you aren't
watching the terminal, you wouldn't even notice the failures.

Cheers,

-- 
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
4096R/D25D95E3 2011-03-28

"The past tempts us, the present confuses us, the future frightens us.  And
our lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 834 bytes --]

  parent reply	other threads:[~2012-03-13  1:23 UTC|newest]

Thread overview: 165+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-11  2:27 [gentoo-dev] newsitem: unmasking udev-181 William Hubbs
2012-03-11  2:53 ` [gentoo-dev] " Rich Freeman
2012-03-11  3:28   ` Luca Barbato
2012-03-11  3:50     ` Rich Freeman
2012-03-11  5:12       ` Luca Barbato
2012-03-11 17:33     ` William Hubbs
2012-03-11 17:35       ` Samuli Suominen
2012-03-11 18:00         ` Michał Górny
2012-03-13  1:22       ` Joshua Kinard [this message]
2012-03-13  1:37         ` [gentoo-dev] Let's redesign the entire filesystem! [was newsitem: unmasking udev-181] Kent Fredric
2012-03-13  2:16           ` Joshua Kinard
2012-03-13  2:33         ` Ian Stakenvicius
2012-03-13  3:14           ` Joshua Kinard
2012-03-13  3:53             ` Robin H. Johnson
2012-03-13  5:17               ` Luca Barbato
2012-03-14  0:20                 ` Joshua Kinard
2012-03-14  0:52                   ` Rich Freeman
2012-03-13 13:36             ` Ian Stakenvicius
2012-03-13 10:31         ` Jeroen Roovers
2012-03-13 11:54         ` James Broadhead
2012-03-14  0:16           ` Joshua Kinard
2012-03-14  8:39             ` [gentoo-dev] " Duncan
2012-03-14 12:40               ` [gentoo-dev] Re: Let's redesign the entire filesystem! Joshua Kinard
2012-03-14 14:41                 ` Greg KH
2012-03-14 14:51                   ` Philip Webb
2012-03-14 15:04                     ` Greg KH
2012-03-14 15:08                       ` Ciaran McCreesh
2012-03-14 15:22                         ` Greg KH
2012-03-14 15:59                           ` Ciaran McCreesh
2012-03-14 21:00                             ` Greg KH
2012-03-14 16:28                           ` Matthew Summers
2012-03-15 13:22                             ` Joshua Kinard
2012-03-14 17:11                           ` Maxim Kammerer
2012-03-14 17:29                             ` Zac Medico
2012-03-14 17:58                               ` Matthew Summers
2012-03-14 18:04                                 ` Ciaran McCreesh
2012-03-14 18:36                                 ` Maxim Kammerer
2012-03-14 18:56                                   ` Zac Medico
2012-03-14 19:14                                     ` Michael Orlitzky
2012-03-14 19:26                                       ` Zac Medico
2012-03-14 19:57                                     ` David Leverton
2012-03-14 21:04                                       ` Greg KH
2012-03-14 22:14                                         ` David Leverton
2012-03-14 22:51                                           ` Greg KH
2012-03-14 23:21                                             ` David Leverton
2012-03-14 23:44                                               ` Greg KH
2012-03-14 23:58                                                 ` Richard Yao
2012-03-15  0:07                                                   ` Greg KH
2012-03-15  0:29                                                 ` David Leverton
2012-03-15 11:20                                                   ` Stelian Ionescu
2012-03-15 12:23                                                     ` Joshua Kinard
2012-03-15 14:01                                                 ` Joshua Kinard
2012-03-14 23:47                                               ` Zac Medico
2012-03-15  0:36                                                 ` David Leverton
2012-03-15  0:45                                                   ` Zac Medico
2012-03-15  0:49                                                     ` David Leverton
2012-03-15 12:27                                                     ` Joshua Kinard
2012-03-15 15:29                                                       ` Zac Medico
2012-03-15  0:58                                                   ` Richard Yao
2012-03-15  1:06                                                     ` Zac Medico
2012-03-15  1:49                                                       ` Richard Yao
2012-03-16 23:29                                                         ` Zac Medico
2012-03-16 23:29                                                         ` Zac Medico
2012-03-15 12:16                                             ` Joshua Kinard
2012-03-15 12:09                                           ` Joshua Kinard
2012-03-14 22:39                                         ` Richard Yao
2012-03-14 22:49                                           ` Greg KH
2012-03-14 23:27                                             ` Richard Yao
2012-03-14 23:37                                               ` Greg KH
2012-03-14 23:51                                                 ` Richard Yao
2012-03-15  1:07                                                   ` Rich Freeman
2012-03-15  1:37                                                     ` Zac Medico
2012-03-15  1:44                                                     ` Richard Yao
2012-03-16  1:17                                                     ` Canek Peláez Valdés
2012-03-16  1:18                                                       ` Canek Peláez Valdés
2012-03-15  5:18                                                 ` Luca Barbato
2012-03-15  8:13                                                 ` Martin Gysel
2012-03-15 12:40                                                 ` Joshua Kinard
2012-03-15 20:44                                                   ` Richard Yao
2012-03-17  7:12                                                     ` Walter Dnes
2012-03-19  5:21                                                       ` Walter Dnes
2012-03-15 12:34                                               ` Joshua Kinard
2012-03-15 20:45                                                 ` Richard Yao
2012-03-15 21:49                                                   ` Maxim Kammerer
2012-03-14 20:03                                     ` Richard Yao
2012-03-14 20:55                                       ` Zac Medico
2012-03-14 21:05                                         ` Richard Yao
2012-03-15  4:10                                           ` Zac Medico
2012-03-15 12:47                                         ` Joshua Kinard
2012-03-15 13:36                                     ` Joshua Kinard
2012-03-14 19:30                                 ` Jeroen Roovers
2012-03-15  5:04                                 ` Luca Barbato
2012-03-14 17:59                               ` Rich Freeman
2012-03-15  5:24                                 ` Luca Barbato
2012-03-15 12:51                                 ` Joshua Kinard
2012-03-14 20:12                       ` Walter Dnes
2012-03-15 11:04                       ` Joshua Kinard
2012-03-15 12:30                         ` Rich Freeman
2012-03-15 13:05                           ` Joshua Kinard
2012-03-15 14:42                           ` Greg KH
2012-03-15 19:04                             ` Rich Freeman
2012-03-15 19:17                               ` [gentoo-dev] /dev/serial/ (was "Let's redesign the entire filesystem!") Greg KH
2012-03-15 19:41                                 ` Rich Freeman
2012-03-15 14:41                         ` [gentoo-dev] Re: Let's redesign the entire filesystem! Greg KH
2012-03-16  0:47                           ` Joshua Kinard
2012-03-16  2:43                             ` Greg KH
2012-03-16  3:01                               ` Richard Yao
2012-03-16 15:18                                 ` Greg KH
2012-03-16 17:00                                   ` Michael Orlitzky
     [not found]                                 ` <7c08803524244ff0808d16539b8f9926@HUBCAS2.cs.stonybrook.edu>
2012-03-16 22:41                                   ` Richard Yao
2012-03-13 14:41         ` [gentoo-dev] Let's redesign the entire filesystem! [was newsitem: unmasking udev-181] Marc Schiffbauer
2012-03-13 23:12           ` James Broadhead
2012-03-14 12:00           ` James Cloos
2012-03-14 17:52             ` Zac Medico
2012-03-14 18:48               ` [gentoo-dev] " Duncan
2012-03-14 20:10                 ` Kent Fredric
2012-03-15  6:33                   ` Duncan
2012-03-15 13:07                   ` Joshua Kinard
2012-03-13  5:11       ` [gentoo-dev] Re: newsitem: unmasking udev-181 Luca Barbato
2012-03-14  0:13         ` Joshua Kinard
2012-03-14  8:03           ` Duncan
2012-03-14 12:07             ` Joshua Kinard
2012-03-14 18:43               ` Duncan
2012-03-14 21:13               ` Walter Dnes
2012-03-15 13:10                 ` Joshua Kinard
2012-03-15 21:49                   ` Robin H. Johnson
2012-03-11  3:44   ` Dale
2012-03-11  5:48   ` Duncan
2012-03-11 11:03   ` Petteri Räty
2012-03-11 15:33     ` Zac Medico
2012-03-11 21:28       ` Petteri Räty
2012-03-11 21:43         ` William Hubbs
2012-03-11 21:48           ` Petteri Räty
2012-03-11 23:15             ` William Hubbs
2012-03-12 12:37               ` Rich Freeman
2012-03-12 17:01                 ` Matthias Hanft
2012-03-12 19:32                   ` Robin H. Johnson
2012-03-13 14:34               ` Petteri Räty
2012-03-11 22:57   ` Robin H. Johnson
2012-03-13  8:43   ` Walter Dnes
2012-03-13  9:14     ` Canek Peláez Valdés
2012-03-14  0:29       ` Joshua Kinard
2012-03-14  0:36         ` Stelian Ionescu
2012-03-14  1:04         ` Maxim Kammerer
2012-03-14  1:14         ` Robin H. Johnson
2012-03-14 13:02         ` Rich Freeman
2012-03-13 10:32     ` Robin H. Johnson
2012-03-11  6:49 ` Ryan Hill
2012-03-11 21:08   ` Robin H. Johnson
2012-03-11 23:03     ` Duncan
2012-03-11 23:14       ` Robin H. Johnson
2012-03-12  9:02         ` Duncan
2012-03-12 14:09     ` Marc Schiffbauer
2012-03-12 19:41       ` Robin H. Johnson
2012-03-13  2:06     ` Ryan Hill
2012-03-12 18:34   ` Sven Vermeulen
2012-03-13  2:04     ` Ryan Hill
2012-03-11  8:06 ` [gentoo-dev] " Neil Bothwick
2012-03-11  8:41   ` Michał Górny
2012-03-11  9:36     ` Neil Bothwick
2012-03-11 10:43       ` Michał Górny
2012-03-11 17:26 ` William Hubbs
2012-03-11 18:08   ` Ulrich Mueller
2012-03-11 23:09   ` [gentoo-dev] " Duncan
2012-03-12 20:50   ` [gentoo-dev] " Robin H. Johnson

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=4F5EA152.80604@gentoo.org \
    --to=kumba@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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