среда, 1. фебруар 2012.

The Ever-Changing Linux Filesystems: Merging Directoris into /usr

Exclusive

If you don't like change, working in IT has to be a harrowing experience. That's particularly true in open source, where few stand on tradition and things move at breakneck pace. The latest change that has a few folks excited? Fedora's proposal to "move all to /usr." On the face, this might seem like a shocking departure from standards – but look a bit deeper and it seems to make sense.

The proposal for Fedora comes from Harald Hoyer and Kay Sievers. The long-term plan is to "clean up the mess and confusion the current split of / vs. /usr has created. All tools will move back to /usr where they belong, and the rootfs will only contain compat-symlinks into /usr. Almost the entire system installed by packages will reside in /usr."

But wait, isn't the split there for a reason? Yes, but the reasons that /usr has been split off are rooted in the history of Unix and the limitations of the tiny (space-wise) hard drives that the original UNIX equipment came with. On the BusyBox list, Rob Landley noted that the /usr split came about when "the operating system grew too big to fit on the first RK05 disk pack (their root filesystem)" it was allowed to "leak out" on to the second one "which is where all the user home directories lived (which is why the mount was called /usr).

"They replicated all the OS directories under there (/bin, /sbin, /lib, /tmp...) and wrote files to those new directories because their original disk was out of space. When they got a third disk, they mounted it on /home and relocated all the user directories to there so the OS could consume all the space on both disks and grow to THREE WHOLE MEGABYTES (ooooh!)."

Landley goes on to say that the /usr split "stopped making any sense before Linux was ever invented" for several reasons. The early system startup is dealt with by initrd and initramfs. Shared libraries mean that you can't upgrade /lib and /usr/bin independently anymore.

The size issue? Well, hard drives weren't exactly huge when Linux was invented, but users had a lot more room to work by the time Linus Torvalds started working on Linux. These days? Even embedded devices have a lot more room than the dinky hard drives the early Unix guys had to work with. Now, when I say "dinky" I only mean storage capacity. Those things were huge, but they couldn't even hold a copy of Dark Side of the Moon as a 128KB MP3. (Not least of which because the album wasn't recorded until after the /usr split, and MP3 hadn't been invented – but you get the idea.)

The Proposal

So the proposal in front of Fedora is to move directories /bin, /sbin, /lib, and /lib64 under /usr.

This will improve compatibility with other

View the Original article

Нема коментара:

Постави коментар