/var/run mount

I seem to lose a subdirectory in /var/run every time I reboot. I hadn't noticed before, but /var/run appears to be a special filesystem of some sort. Is this a xen thing that gets rebuilt on boot? Is there something I need to do to get a subdir to autocreate (other than just slapping a line into an RC file)?

7 Replies

In my Ubuntu image:

varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)

It is a distro specific thing.

@mwalling:

In my Ubuntu image:

varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)

It is a distro specific thing.

O I C. Weird that they do that different from debian. I guess this is technically a bug against the ubuntu package then.

@glg:

@mwalling:

In my Ubuntu image:

varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)

It is a distro specific thing.

O I C. Weird that they do that different from debian. I guess this is technically a bug against the ubuntu package then.
/var/run is not meant to persist over reboots. See the FileSystem Hierarchy Standard doc

http://www.pathname.com/fhs/pub/fhs-2.3 … RIABLEDATA">http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA

@sweh:

@glg:

@mwalling:

In my Ubuntu image:

varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)

It is a distro specific thing.

O I C. Weird that they do that different from debian. I guess this is technically a bug against the ubuntu package then.
/var/run is not meant to persist over reboots. See the FileSystem Hierarchy Standard doc

http://www.pathname.com/fhs/pub/fhs-2.3 … RIABLEDATA">http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA

Nothing in that says that directories should be removed at boot, which is effectively what happens in ubuntu. I checked, and there already was a bug against the package. I just wrote something in rc.local to create the directory if it doesn't exist and give it correct perms.

@glg:

@sweh:

@glg:

O I C. Weird that they do that different from debian. I guess this is technically a bug against the ubuntu package then.
/var/run is not meant to persist over reboots. See the FileSystem Hierarchy Standard doc

http://www.pathname.com/fhs/pub/fhs-2.3 … RIABLEDATA">http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA

Nothing in that says that directories should be removed at boot, which is effectively what happens in ubuntu. I checked, and there already was a bug against the package. I just wrote something in rc.local to create the directory if it doesn't exist and give it correct perms.
Right, but since directories are just files (with a special bit set) the standard could be interpreted that way. FWIW RedHat (and thus CentOS, which I use) attempts to keep directories inside /var/run (but subdirectories of those may be lost). I wouldn't consider Ubuntu's behaviour a bug.

@sweh:

Right, but since directories are just files (with a special bit set) the standard could be interpreted that way. FWIW RedHat (and thus CentOS, which I use) attempts to keep directories inside /var/run (but subdirectories of those may be lost). I wouldn't consider Ubuntu's behaviour a bug.

nono, you misunderstand. Since ubuntu does it this way, any package that has a program that wants a subdir should check for/create that subdir if needed. This particular package does not. I checked for and found a bug against the particular package because it needs to be setup to make the subdir.

@glg:

@sweh:

Right, but since directories are just files (with a special bit set) the standard could be interpreted that way. FWIW RedHat (and thus CentOS, which I use) attempts to keep directories inside /var/run (but subdirectories of those may be lost). I wouldn't consider Ubuntu's behaviour a bug.

nono, you misunderstand. Since ubuntu does it this way, any package that has a program that wants a subdir should check for/create that subdir if needed. This particular package does not. I checked for and found a bug against the particular package because it needs to be setup to make the subdir.
Oh, right. Yeah :-)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct