You are not logged in.

#1 2012-01-02 13:47:30

quayasil
Member
Registered: 2008-11-09
Posts: 102

What's the reason for /run tmpfs?

The reason I love Arch is its "KISS-compliance". The more standard, the more simple -- the better. May I ask for the reason of introducing the /run tmpfs instead of standard /var/run?
Best regards,
/m

Offline

#2 2012-01-02 14:01:36

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: What's the reason for /run tmpfs?

A tmpfs /run *is* standard. Look around, all distros are using it. Much better than hiding stuff in /dev/.dev and /dev/.initramfs and other similar stuff that was used before.

Offline

#3 2012-01-02 14:21:23

quayasil
Member
Registered: 2008-11-09
Posts: 102

Re: What's the reason for /run tmpfs?

Gusar wrote:

A tmpfs /run *is* standard. Look around, all distros are using it.

"all distros"?

Gentoo is NOT.
CentOS is NOT.
Not using other distros...

FreeBSD is NOT.

*Whose* standard it is?

Best regards,
/m

PS. To be clear. My question is not: `why is it tmpfs?'. I'm askin': `why /run instead od /var/run ?'

Last edited by quayasil (2012-01-02 14:21:45)

Offline

#4 2012-01-02 14:24:47

samuvuo
Member
From: Finland
Registered: 2011-02-20
Posts: 84

Re: What's the reason for /run tmpfs?

@Gusar (with a bit of tongue-in-cheek): common != standard.

@quayasil: I'm guessing it has to do with performance and it also helps minimizing wear of SSD drives, which is not a bad thing.

Offline

#5 2012-01-02 14:25:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: What's the reason for /run tmpfs?

Maybe http://mailman.archlinux.org/pipermail/ … 00517.html will help a bit:

Apparently, many tools (among them udev) will soon require a /run/
directory that is mounted early (as tmpfs). It is probably a good idea
to add this to the filesystem and initscripts packages.

Offline

#6 2012-01-02 14:34:42

samuvuo
Member
From: Finland
Registered: 2011-02-20
Posts: 84

Re: What's the reason for /run tmpfs?

Thank you, karol. Makes perfect sense.

Offline

#7 2012-01-02 14:35:11

quayasil
Member
Registered: 2008-11-09
Posts: 102

Re: What's the reason for /run tmpfs?

AFAIK Fedora is strongly promoting systemd and introducing /run if Fedora is strictly related to this. Is Arch switching to systemd?
IMHO the direction Fedora evolves is opposite to the tendency Unix evolves. Instead of standardization we have numerous new "Linux standards" or "all distros do that" (whatever it means) which makes software more and more unportable and incompatible between Linux and other *nices  (let's think of recent XFCE problems on FreeBSD)...

Offline

#8 2012-01-02 14:39:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: What's the reason for /run tmpfs?

You can read https://bugs.archlinux.org/task/18157 on the "Lennart's Standard (TM)" (mostly the last few comments):

Tom Gundersen (tomegun) wrote:

Allow me to clarify: I'm only referring to the specification (the manpage), not any particular implementation of it. What I meant by calling it "a standard" is that it is an implementation independent specification that was developed as a collaboration and agreed upon by many (if not most) of the relevant parties. I did not mean to imply that it has anything to do with standardization bodies.

The specification I linked to is being implemented by Fedora, SuSE and Debian at least, and the systemd team that developed that document consists of people from all those distro's (and several others, including Arch).

If the systemd project succeeds in pushing these "tmpfiles" into the relevant upstream projects, then Arch would benefit from implementing the same specification so we would not have to maintain these things ourselves, but they would come bundled with upstream packages. If the systemd project fails in this goal, then we have not lost anything, as we would anyway have to implement something along these lines.

Last edited by karol (2012-01-02 14:41:28)

Offline

#9 2012-01-02 14:45:43

quayasil
Member
Registered: 2008-11-09
Posts: 102

Re: What's the reason for /run tmpfs?

Wasn't there something like Filesystem Hierarchy Standard (FHS) by Free Standards Group?
If one Fedora developer introduces something "better" than POSIX/SUS will Arch implement it?

Last edited by quayasil (2012-01-02 14:46:51)

Offline

#10 2012-01-02 14:48:00

samuvuo
Member
From: Finland
Registered: 2011-02-20
Posts: 84

Re: What's the reason for /run tmpfs?

quayasil wrote:

Wasn't there something like Filesystem Hierarchy Standard (FHS) by Free Standards Group?

Indeed there is: http://www.linuxfoundation.org/collabor … ps/lsb/fhs

Offline

#11 2012-01-02 14:56:52

quayasil
Member
Registered: 2008-11-09
Posts: 102

Re: What's the reason for /run tmpfs?

samuvuo wrote:
quayasil wrote:

Wasn't there something like Filesystem Hierarchy Standard (FHS) by Free Standards Group?

Indeed there is: http://www.linuxfoundation.org/collabor … ps/lsb/fhs

Thanks!
BTW:  "Our goal is to release FHS 3.0 by July 1 if possible." It was in April 2011... Which standard is obliging now: 2.3 or 3.0?

Last edited by quayasil (2012-01-02 14:58:07)

Offline

#12 2012-01-02 15:09:12

samuvuo
Member
From: Finland
Registered: 2011-02-20
Posts: 84

Re: What's the reason for /run tmpfs?

I cannot access http://refspecs.linuxfoundation.org/fhs.shtml right now, for some reason, but according to Wikipedia the latest release is:

2.3 / January 29, 2004; 7 years ago

Offline

#13 2012-01-02 15:14:07

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: What's the reason for /run tmpfs?

quayasil wrote:

Gentoo is NOT.

Check again, they're in the migration phase.

quayasil wrote:

CentOS is NOT.

CentOS is a lts distro, so of course they don't have it yet. Keyword *yet*. Watch their next major release.

quayasil wrote:

FreeBSD is NOT.

FreeBSD is not a Linux distro, it's a different OS. For example, they don't have udev.

quayasil wrote:

*Whose* standard it is?

There was consensus among the top distros. Also, important because people might think otherwise: This is *not* a Poetterism. It comes from Debian.

quayasil wrote:

PS. To be clear. My question is not: `why is it tmpfs?'. I'm askin': `why /run instead od /var/run ?'

Because it was needed to have a writable filesystem very early in the boot process. /var might be on a separate partition and as such not available at that point yet.

quayasil wrote:

Wasn't there something like Filesystem Hierarchy Standard (FHS) by Free Standards Group?

/run is fully compliant with the FHS. I'm lazy, so I won't go looking for the discussion, but there was a discussion, and /run fits within the FHS.

Last edited by Gusar (2012-01-02 15:18:13)

Offline

#14 2012-01-03 01:42:54

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: What's the reason for /run tmpfs?

Addition of /run solved the aging problem of: "i have a program that runs really early in userspace and needs to write state somewhere". Before /run was added, udev wrote its database to /dev/.udev -- not really the best choice. Additionally, since /var/run houses transient data that gets cleared on every bootstrap anyways (and /var could be a separate partition), /run makes a lot of sense.

Offline

#15 2012-01-03 10:18:28

gregor
Member
From: /planet/tmpfs
Registered: 2011-06-20
Posts: 175

Re: What's the reason for /run tmpfs?

PS. To be clear. My question is not: `why is it tmpfs?'. I'm askin': `why /run instead od /var/run ?'

TARGET                 SOURCE           FSTYPE                OPTIONS
/                      /dev/mapper/root reiserfs              rw,noatime
├─/proc                proc             proc                  rw,nosuid,nodev,noexec,relatime
├─/sys                 /sys             sysfs                 rw,nosuid,nodev,noexec,relatime
├─/dev                 udev             devtmpfs              rw,nosuid,relatime,size=10240k,nr_inodes=505622,mode=755
│ ├─/dev/pts           devpts           devpts                rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
│ └─/dev/shm           shm              tmpfs                 rw,nosuid,nodev,relatime
├─/run                 /run             tmpfs                 rw,nosuid,nodev,relatime,size=10240k,mode=755
├─/boot                /dev/sda3        ext2                  rw,relatime,errors=continue
├─/home/greglee/.cache tmpfs            tmpfs                 rw,nosuid,nodev,noatime
├─/tmp                 tmpfs            tmpfs                 rw,nosuid,nodev,noatime
└─/home/greglee/.gvfs  gvfs-fuse-daemon fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=1000,group_id=100

/run in archlinux is 'tmpfs' and /var/run is a 'link' to it.... so both are the same... 'tmpfs'

[greglee@myhost ~]$ ls -l /var/run
lrwxrwxrwx 1 root root 4 Dec 25 08:46  /var/run -> /run

Last edited by gregor (2012-01-06 22:08:44)

Offline

Board footer

Powered by FluxBB