How to explain the usefulness of /run to mere mortals?
Hi,
Until recently, I could explain Linux mount points more or less simply to students. /mnt being the traditional mount point, with a series of preconfigured mount point directories in Slackware that you are free to use when working in console mode on a server, for example. And then /media, useful after the introduction of kernel 2.6 and HAL, where mount points could be created on-the-fly. Now I see that when using Xfce, everything gets mounted under /run. I just googled for /run and found this, erm, explanation: https://lists.fedoraproject.org/pipe...ch/150031.html And now I wonder.
Any suggestions? |
well that link seems to explain what it's for extremely well, but as you're discussing it alongside /media I think you just need to read it again more closely. udev and other core services need a place to write data to, that is available extremely early in the boot process and persists into the long term booted state of the system. That's pretty much it. ?media is where dvd's get mounted, that's not related to this at all. Other changes? Sure, the system is evolving, and will never stop doing so.
|
Hello,
According to the (future) FHS v3, it is a replacement for /var/run (FHS v2.3). /media seems still in use, so it is not intended to be a replacement for it. |
kikinovak, take it as an example for the ongoing development in the Linux/Opensource world. Tell your students that it's not yet clear which way the concept of udev will go in the future. Tell them that there isn't a company which defines the standards (like in the Windowsworld) (ok, we have Redhat instead ;)) but that there are different opinions about which direction to go.
Maybe they will at least understand how opensource and free software function. Markus |
/run makes some sense:
I'd rather see a /run than have udev, md etc. spray hidden directories all over /dev where they don't belong. Of course, I'd much prefer to have a sensible early boot that didn't require using this sort of nonsense in the first place, but sadly those days are gone. As for putting mountpoints under "/run/media/$USER/", I can see how they might be ok when only ever using a point/click interface, but as soon as you end up having to type directory paths in, either in the command line, or in some sort of gui text entry dialog, they just make things ugly and inconvenient and I much prefer the old way of doing it. |
Quote:
Xfce 4.10 under Slackware 4.10 mounts everything (DVD, USB stick, external disk, camera) under /run/media/something. Hence my question. |
Quote:
|
"/var/crap/lennart" -I love it!
|
|
Quote:
The lwn discussion on the matter is also nice http://lwn.net/Articles/436012/ |
Quote:
PS. Thats gonna change in KDE 4.10. |
Quote:
It's just mindless namespace pollution, no big picture behind it. |
/run is mounted as a tmpfs filesystem. It is intended to hold data that is not relevant after a reboot. The use of tmpfs allows it to be recreated on every boot.
That said, the use of /run is to hold files containing things like service daemon pid values. These have no use after a reboot. The advantage is that they are automatically disposed of, and easily recreated. The problem comes up in that some projects overuse it. GDM (and formerly KDM) would put user Xauthority files in there. That requires that the /run directory be user readable, and specific directories (and files) be accessible, and writable. This introduces a security problem in that it gives the user the ability to use up the storage space (and inodes) associated with the filesystem used for /run. This becomes a denial-of-service weakness as it allows any user with such access to fill the /run filesystem (either storage, inodes or both), and prevent other users (and daemon restarts) from succeeding. I first saw this in Fedora, and is only now being cleaned up (KDM and Gnome now use /tmp). The only Xauthority files there now are for the hand off of initial X authority keys between GDM/KDM, the X server, and the login greeter process, so this isn't a problem. |
shifting automountng from /media/* to /run/[user]/* was just plain idiocy. According to the links provided earlier in this thread (fedora and FHS), removable media goes into /media and /run is for run time variable data. Placing mount points into /run violates its defined purpose.
Just my 2 cents. But what do I know? Its not like I ever rolled my own distro. |
That is another of those "overuse" things. I believe fedora is now moving to /media being a tmpfs mount as well. At least, that is what it is on my F16, and F17 (in a VM).
There are a number of such mounts: Code:
tmpfs 510044 80 509964 1% /dev/shm |
All times are GMT -5. The time now is 07:09 AM. |