[Pkg-sysvinit-devel] Bug#688412: initscripts: /tmp has wrong size

Constantin Makshin cmakshin at gmail.com
Sat Sep 22 15:08:37 UTC 2012


Package: initscripts
Version: 2.88dsf-32
Severity: normal

I have TMPFS_SIZE set to 512 MiB and an entry in /etc/fstab:
tmpfs /tmp tmpfs defaults,noatime,nodiratime,nodev,nosuid 0 0

However, that value seems to be ignored as "df -h" says /tmp has the total size
of 1.5 GiB (the system has 3 GiB of RAM). Running "mount" shows this:
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,nodiratime)

At first, lack of the "size=" option made me think that the value from
/etc/default/tmpfs is either ignored completely or reset to kernel default for
some reason.

In an attempt to find at least some clues I copied /lib/init/mount-
functions.sh, added the line
echo "domount: $*"
to the very beginning of domount() and ran the following script:
--
#!/bin/sh

.. /lib/lsb/init-functions
.. /lib/init/tmpfs.sh
.. /tmp/mount-functions.sh

mount_tmp mount
--

The result was:
domount: mount tmpfs shmfs /tmp tmpfs -onodev,nosuid,size=512m,mode=1777

So configuration options are recognized by the initialization scripts and
passed to the "mount" utility, but somehow get lost later. There are similar
/etc/fstab records for other tmpfs mounts (/run, /run/lock and /run/shm) but
only /tmp doesn't work as expected.



-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages initscripts depends on:
ii  coreutils       8.13-3.2
ii  debianutils     4.3.2
ii  libc6           2.13-35
ii  lsb-base        4.1+Debian7
ii  mount           2.20.1-5.1
ii  sysv-rc         2.88dsf-32
ii  sysvinit-utils  2.88dsf-32

Versions of packages initscripts recommends:
ii  e2fsprogs  1.42.5-1
ii  psmisc     22.19-1

initscripts suggests no packages.

-- Configuration Files:
/etc/default/tmpfs changed:
RAMLOCK=yes
RAMSHM=yes
RAMTMP=yes
TMPFS_SIZE=512m
RUN_SIZE=2m
LOCK_SIZE=1m


-- no debconf information



More information about the Pkg-sysvinit-devel mailing list