Re: /tmp as tmpfs and consequence for imaging software
On Sun, Nov 13, 2011 at 09:16:55PM +0100, Thomas Koch wrote:
> Bastien ROUCARIES:
> > Hello,
> >
> > Recently debian put /tmp under tmpfs.
>
> My /tmp does not have 50% the size of my RAM.
>
> In my /etc/default/rcS:
> RAMRUN=yex
> RAMLOCK=yes
>
> in /etc/fstab:
> tmpfs /tmp tmpfs noatime 0 0
>
> results in df -h on a 3GB RAM machine:
>
> Filesystem Size Used Avail Use% Mounted on
> tmpfs 5.0M 4.0K 5.0M 1% /lib/init/rw
> tmpfs 301M 5.6M 295M 2% /run
> tmpfs 5.0M 0 5.0M 0% /run/lock
> tmpfs 602M 20M 582M 4% /tmp
> tmpfs 602M 0 602M 0% /run/shm
>
> Shouldn't /tmp be much larger? Which is the right package to report this as
> bug?
The initscripts defaults for /tmp are hardcoded in /lib/init/tmpfs.sh,
and are used when not specified in /etc/default/tmpfs. If you don't
have RAMTMP=yes in /etc/default/rcS, and the rootfs isn't readonly,
then these settings will not be used (see /etc/init.d/mountkernfs).
An entry in /etc/fstab will override these entries, but you haven't
specified any size limits, therefore you'll use the initscripts
defaults should you have RAMTMP=yes or a readonly rootfs.
The 50% limit is not used by initscripts, where a lower 20% limit is
used. This is so that the combined total of all the tmpfs filesystems
does not exceed 100% and allow users to DoS the machine.
Regards,
Roger
--
.''`. 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.
Reply to: