[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Default size limits for /run (/var/run) and /run/lock (/var/lock)

On Sat, Apr 16, 2011 at 09:35:53AM +0200, Goswin von Brederlow wrote:
> Roger Leigh <rleigh@codelibre.net> writes:
> > On Fri, Apr 15, 2011 at 04:41:56PM +0200, Goswin von Brederlow wrote:
> >> Roger Leigh <rleigh@codelibre.net> writes:
> >> 
> >> > If it wasn't already clear, having /tmp as a tmpfs is a
> >> > /configurable option/, and it is /not/ the default (except when
> >> > root is read-only (ro) in fstab).
> >> 
> >> I hope you check the fstab first. If there is a entry for a non tmpfs
> >> /tmp filesystem then that should be used. I'm assuming you do but just
> >> to be sure...
> >
> > No, we don't check.  It's up to the admin to configure their
> > system properly.  If there is an entry in in fstab, it'll be
> > mounted on top of the tmpfs, so the system will be configured
> > the way they asked, but there will be a hidden tmpfs mount.
> > But they would have explicitly needed to set RAMTMP=yes to get
> > into this situation.
> >
> > For new installs, where the default /etc/default/rcS files does
> > set RAMTMP=yes by default, the fstab file will not yet contain
> > any user-specific mounts.  If they do want to manuall mount
> > something on /tmp, then they simply set RAMTMP=no.
> >
> > Note this behaviour is exactly the same as existing practice for
> > /dev/shm, /var/run and /var/lock.
> Then I don't get your 'is /not/ the default (except when root is
> read-only (ro) in fstab)'.
> To me that reads like you will mount a tmpfs on /tmp if root is
> read-only even if RAMTMP is not set. Which is wrong if the system has a
> /tmp filesystem in /etc/fstab.

This is a good point.  I've added the ability to detect if a
filesystem will be mounted, and skip the tmpfs mount on /tmp if
an entry for /tmp exists in fstab (will_mount in

> Also mount -a (in mountall.sh) fails, and therefore the whole boot, if a
> mountpoint already has something else mounted. If you unconditionally
> mount a tmpfs on /tmp if root is read-only then you just made systems
> unbootable that have /tmp in fstab.

This is not correct.  Have you actually tried it?  I have, and other
than the cosmetic issue of having a real filesystem mounted over the
top of the tmpfs, the system is entirely functional, and boots error
free.  And with the above change, even this cosmetic issue is gone.


  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: signature.asc
Description: Digital signature

Reply to: