FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 03-30-2011, 11:54 AM
Lennart Poettering
 
Default What's this /run directory doing on my system and where does it come from?

Heya,

I just uploaded a new version of systemd into F15, which establishes a
directory /run in the root directory. Most likely you'll sooner or later
stumble over it, so here's an explanation what this is and why this is.

It's a fairly minor technical change, though presumably people consider
this a bigger political change, so I guess this deserves an
explanation:

For quite a while programs involved with early boot used to place
runtime data in /dev under numerous hidden dot directories. /dev/.udev
was the first one, but over time this grew to at least /dev/.mdadm,
/dev/.systemd, /dev/.mount, dracut, initscripts and more tools. (Other
distros have even more) The reason they used directories there is that
/dev was known to be a tmpfs and available from the first instant the
machine was booted. /var/run otoh is only available very late at
boot, since /var might reside on a separate file system.

However, /dev always has been an inappropriate and ugly place for
runtime data: runtime data is not a device node, and thus simply does
not belong there. Also, hiding the existance of directories from the
administator is a bad idea. Then, the fact that some runtime data was
placed in /var/run/xxx, and other in /dev/.yyy is often not
understandable to ther user, and especially when tools originally
intended to be used only after boot are needed during early boot a
complicated move between these directories needed to take place.

Over time different distributions experimented with different broken
solutions for the early-runtime-dir problem: on Debian /lib/init/rw was
introduced, a tmpfs fs mounted during early boot. On Ubuntu /var/run was
mounted as tmpfs even before /var itself was mounted, with some really
ugly bind mount magic. Most software however just sidestepped the issue
and used /dev/.xxx.

In the past weeks key people from the Debian, Suse, Ubuntu and Fedora
camps (and others, too) discussed the whole issue forth and back, to
find a solution to stop the misuse of /dev before it becomes even more
widespread. Various solutions have been suggested, but in the end it all
boiled down to the fact that /var/run does not belong beneath /var and
what we really want is a top-level directory /run, and that that is the
only really clean solution. The only reason why nobody dared to actually
implement such a directory was unwillingness to deal with the political
backlash, especially messy discussions on mailing lists like this one.

Understanding this, we came to the conclusion that we should rather
implement what everybody thinks is the right technical solution, instead
of evading the political backlash for it. And so we implemented this.

With this upload Fedora and Suse have already adopted /run now. Debian
folks will suggest this for their coming release. Ubuntu has agreed with
introducing /run as well.

Dracut, udev and systemd have already been updated upstream to make use
of /run. We expect mdadm and mount to follow suit quickly.

A few years back Debian folks already suggested introduction of /run,
and even pinged LSB folks about this, and back then there even was a vaguely
positive response from them.

So, what is implemented in F15 precisely?

/run is now a tmpfs, and /var/run is bind mounted to it. /var/lock is
bind mounted to /run/lock. Applications can use /run the same way as
/var/run. Since the latter is FHS/LSB most apps should just use the
latter, only early boot stuff should use /run, for now. The folks who
have packages where this applies already have been informed. If you
haven't heard from any of us, then this doesn't apply to you.

So, what's the benefit of this again?

- There's only one tmpfs used, backing /run, /var/lock and /var/run,
reducing a bit the ever increasing amount of tmpfs' used on a default
system.

- All runtime data at the same place. systemd's, udev's, dracut's data
are all beneath /run and /var/run now. Easily discoverable to the
admin. For the first time you can see the data all these important
tools used on your system store just like any other by doing "ls
/var/run".

- Nothing is hidden anymore. The admin can see everything beneath
/var/run and /run, no hidden dot-files anymore.

- We have standardized the early-runtime-dir solution across all major
distributions

- The people involved feel much better since they don't have to misuse
/dev anymore

- The lifecycle properties of directories are clear from the top-level
directory name. Lifecycle properties do no longer change the further
you go down your tree. i.e. /var is "persistant runtime data" and /run
is "volatile runtime data", and /etc is "persistant system config
data", and so on. The ugliness that /var/run abd /var/lock had
completely different liftime guarantees than /var where they both
reside in is gone.

So, this is what is implemented for F15 now. For F16 we will make a
minor change on top of this: /var/run and /var/lock will become symlinks
to /run (resp /run/lock), so that we don't have to use bind mounts
anymore which are not the most beautiful thing to use by default, and
confusing to the admin. Due to the implications of symlinks and RPM we
didn't want to make that change in F15.

The actual code changes we needed to implement this scheme were trivial
(basically, just bind mount /var/run and /var/lock instead of mounting two
new tmpfs' to them.), which is why we opted to do this so late in the F15
cycle. However, the political implications are much bigger I guess, so
let's see what a fantastic flamewar we can start with this on
fedora-devel now. Flame away!

Lennart

--
Lennart Poettering - Red Hat, Inc.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-30-2011, 12:10 PM
Michał Piotrowski
 
Default What's this /run directory doing on my system and where does it come from?

2011/3/30 Ralf Corsepius <rc040203@freenet.de>:
> On 03/30/2011 01:54 PM, Lennart Poettering wrote:
>> Heya,
>>
>> I just uploaded a new version of systemd into F15, which establishes a
>> directory /run in the root directory. Most likely you'll sooner or later
>> stumble over it, so here's an explanation what this is and why this is.
>>
>> It's a fairly minor technical change,
>
> It's a massive FHS violation

FHS has 7 years, must be updated.

>
> => release blocker.

Flame!


--
Best regards,
Michal

http://eventhorizon.pl/
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-30-2011, 12:37 PM
Jaroslav Reznik
 
Default What's this /run directory doing on my system and where does it come from?

On Wednesday, March 30, 2011 01:54:30 PM Lennart Poettering wrote:
> Heya,
>
> I just uploaded a new version of systemd into F15, which establishes a
> directory /run in the root directory. Most likely you'll sooner or later
> stumble over it, so here's an explanation what this is and why this is.

Heya and thanks For example /dev/ has been blocked in KDirWatch so it made
impossible to use it for systemd password agent (it's now patches but I think we
should revert) and other /dev/.*. It really does not belong there.

Jaroslav

> Lennart

--
Jaroslav Řezn*k <jreznik@redhat.com>
Software Engineer - Base Operating Systems Brno

Office: +420 532 294 275
Mobile: +420 602 797 774
Red Hat, Inc. http://cz.redhat.com/
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-30-2011, 12:54 PM
Miloslav Trmač
 
Default What's this /run directory doing on my system and where does it come from?

On Wed, Mar 30, 2011 at 2:44 PM, Nicolas Mailhot
<nicolas.mailhot@laposte.net> wrote:
> The FHS is about having major distros agree about file locations, and
> documenting the result. Which seems to be exactly what happened here.

Well, documentation on a mailing list is fine for F15, but it really
doesn't count long-term. If "the major distros" have agreed on
changing the standard layout (however the standard it is named),
"they" should also agree on a canonical documentation.
Mirek
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-30-2011, 01:45 PM
Martin Langhoff
 
Default What's this /run directory doing on my system and where does it come from?

On Wed, Mar 30, 2011 at 7:54 AM, Lennart Poettering
<mzerqung@0pointer.de> wrote:
> With this upload Fedora and Suse have already adopted /run now. Debian
> folks will suggest this for their coming release. Ubuntu has agreed with
> introducing /run as well.

Bravo!



m
--
*martin.langhoff@gmail.com
*martin@laptop.org -- Software Architect - OLPC
*- ask interesting questions
*- don't get distracted with shiny stuff* - working code first
*- http://wiki.laptop.org/go/User:Martinlanghoff
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-30-2011, 02:05 PM
Orcan Ogetbil
 
Default What's this /run directory doing on my system and where does it come from?

On Wed, Mar 30, 2011 at 9:21 AM, Lennart Poettering wrote:
> On Wed, 30.03.11 15:08, Ralf Corsepius wrote:
>
>>
>> On 03/30/2011 02:30 PM, Lennart Poettering wrote:
>> > On Wed, 30.03.11 18:04, Rahul Sundaram wrote:
>> >
>>
>> > Also, can somebody point me to the place where the FHS would say "no
>> > other directories below / are allowed"? I can't find that. And hence
>> > this change is perfectly FHS compliant.
>>
>> It's in the preface of the root file system section:
>>
>> http://www.pathname.com/fhs/pub/fhs-2.3.html#THEROOTFILESYSTEM
>>
>> <cite>
>> Applications must never create or require special files or
>> subdirectories in the root directory. Other locations in the FHS
>> hierarchy provide more than enough flexibility for any package.
>> </cite>
>
> Well, we are not an "application", are we?
>

I think, for the first time in Fedora history, I agree with Lennart.

After reading the above reference, this does not seem like an FHS
violation. Even if it is, it is the FHS that needs to be updated.

Orcan
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-30-2011, 02:12 PM
Jaroslav Reznik
 
Default What's this /run directory doing on my system and where does it come from?

On Wednesday, March 30, 2011 04:05:27 PM Orcan Ogetbil wrote:
> On Wed, Mar 30, 2011 at 9:21 AM, Lennart Poettering wrote:
> > On Wed, 30.03.11 15:08, Ralf Corsepius wrote:
> >> On 03/30/2011 02:30 PM, Lennart Poettering wrote:
> >> > On Wed, 30.03.11 18:04, Rahul Sundaram wrote:
> >> >
> >> >
> >> > Also, can somebody point me to the place where the FHS would say "no
> >> > other directories below / are allowed"? I can't find that. And hence
> >> > this change is perfectly FHS compliant.
> >>
> >> It's in the preface of the root file system section:
> >>
> >> http://www.pathname.com/fhs/pub/fhs-2.3.html#THEROOTFILESYSTEM
> >>
> >> <cite>
> >> Applications must never create or require special files or
> >> subdirectories in the root directory. Other locations in the FHS
> >> hierarchy provide more than enough flexibility for any package.
> >> </cite>
> >
> > Well, we are not an "application", are we?
>
> I think, for the first time in Fedora history, I agree with Lennart.

+1, me too ))

R.

> After reading the above reference, this does not seem like an FHS
> violation. Even if it is, it is the FHS that needs to be updated.
>
> Orcan

--
Jaroslav Řezn*k <jreznik@redhat.com>
Software Engineer - Base Operating Systems Brno

Office: +420 532 294 275
Mobile: +420 602 797 774
Red Hat, Inc. http://cz.redhat.com/
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-30-2011, 02:35 PM
Adam Miller
 
Default What's this /run directory doing on my system and where does it come from?

On Wed, Mar 30, 2011 at 01:54:30PM +0200, Lennart Poettering wrote:
<SNIP>
> So, this is what is implemented for F15 now. For F16 we will make a
> minor change on top of this: /var/run and /var/lock will become symlinks
> to /run (resp /run/lock), so that we don't have to use bind mounts
> anymore which are not the most beautiful thing to use by default, and
> confusing to the admin. Due to the implications of symlinks and RPM we
> didn't want to make that change in F15.
>
> The actual code changes we needed to implement this scheme were trivial
> (basically, just bind mount /var/run and /var/lock instead of mounting two
> new tmpfs' to them.), which is why we opted to do this so late in the F15
> cycle. However, the political implications are much bigger I guess, so
> let's see what a fantastic flamewar we can start with this on
> fedora-devel now. Flame away!
<SNIP>

I would like to first say that I think this is a great idea and a solid
solution to the problem at hand. I would like, however, to bring up a
point of approach. This appears to be a rather heavy handed technical
problem that has been solved, decided upon, and declared to be "how it
is and how it will be for Fedora 15." I am perfectly fine with this from
the point of the solution because I agree with the sentiments expressed.

Now, I have to ask: "Was FESCo involved in this decision?" and if so,
where is the Trac ticket, or mention in the meeting minutes?

Again, I'm not against that this is being done, but I would like to see
everyone equally follow suit on the way things are traditionally done
in Fedora land.

-AdamM
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-30-2011, 03:24 PM
Miloslav Trmač
 
Default What's this /run directory doing on my system and where does it come from?

On Wed, Mar 30, 2011 at 4:45 PM, Lennart Poettering
<mzerqung@0pointer.de> wrote:
> On Wed, 30.03.11 09:35, Adam Miller (maxamillion@fedoraproject.org) wrote:
>
>> Again, I'm not against that this is being done, but I would like to see
>> everyone equally follow suit on the way things are traditionally done
>> in Fedora land.
>
> Well, the technical change is actually minimal, and this is mostly a
> contract between dracut, systemd, udev, and very few other low-level
> packages.

Actually, there is
https://fedoraproject.org/wiki/Packaging:Guidelines#Filesystem_Layout
, which restricts even these "very few low-level packages". Yes, the
best solution is most likely to change the packaging guidelines, at
least until FHS is updated - but that's something that needs to be
done at the very latest at the same time that the packages are
updated.
Mirek
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-30-2011, 03:26 PM
Chris Lumens
 
Default What's this /run directory doing on my system and where does it come from?

> I just uploaded a new version of systemd into F15, which establishes a
> directory /run in the root directory. Most likely you'll sooner or later
> stumble over it, so here's an explanation what this is and why this is.

On behalf of everyone at anaconda, thanks for fixing something we've all
long-since hated.

- Chris
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 11:14 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org