Linked by Thom Holwerda on Mon 30th Jan 2012 20:39 UTC
General Unix Finally something really interesting to talk about. If you've used UNIX or any of its derivatives, you've probably wondered why there's /bin, /sbin, /usr/bin, /usr/sbin in the file system. You may even have a rationalisation for the existence of each and every one of these directories. The thing is, though - all these rationalisations were thought up after these directories were created. As it turns out, the real reasoning is pretty damn straightforward.
Thread beginning with comment 505180
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: why not / instead of /usr
by Aristocracies on Mon 30th Jan 2012 21:28 UTC in reply to "why not / instead of /usr"
Member since:

Because that would be more work and less compatible. By putting everything into /usr, you have a *single* directory to concern yourself with when it comes to mounting, sharing and snapshotting an image of the current operating system's binaries.

By symlinking in /bin, /sbin, etc. from root into /usr, you also make sure that files automatically exist in both locations for free which actually increases compatibility with scripts and such that make assumptions about locations.

Doing the inverse of this means you have to not only deal with making sure /usr/* still exists in some form for compatibility reasons, you're also producing more clutter in root and you're adding to the overhead of attempting to manage a single image of the current OS state since they no longer could exist on the same separate file system.

Reply Parent Score: 5

phoenix Member since:

Uhm, why would snapshotting / be any harder than snapshotting /usr? Snapshots happen at the filesystem level, and if everything else is a separate filesystem (/home, /var, yadda yadda) then / is a filesystem all to itself ... so why would snapshotting it be hard?

And if you want to talk about polluting the / directory, have a look at all the virtual filesystems that need mountpoints. Just have a look at the output of "mount" on a Linux system these days. There's a good 8 or so virtual filesystems that all need mountpoints in / (/proc, /sys, /dev, various tmpfs, etc).

Edited 2012-01-30 21:33 UTC

Reply Parent Score: 2

Aristocracies Member since:

You're not understanding the problem domain here, this is more about maintaining a collection of machines that all share the same set of binaries at the same patch level, etc. Snapshotting and sharing / includes things such as /etc and potentially /var which would have to be excluded in a lot of cases since they're not generic enough to want to share across machines. There's plenty of situations where you will want to maintain the binaries separate from the configuration, such as hosting scenarios.

But hey, you know, no one working on Solaris or Fedora or anything has put any thought into this at all and they're just doing it for kicks really.

Edited 2012-01-30 21:41 UTC

Reply Parent Score: 1