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

Re: how to increase space for tmpfs /tmp



On 20120402_215620, Roger Leigh wrote:
> On Mon, Apr 02, 2012 at 11:55:02AM -0600, Paul E Condon wrote:
> > During my tests, I noticed that there was always a line in df,
> > concerning /tmp in tmpfs. With RAMTMP=yes the line was labeled tmpfs,
> > but with RAMTMP=no, the line was labeled 'overflow', or something else
> > that I misremember as overflow. Now I surmise that tmpfs is being used
> > during boot whatever the setting of RAMTMP, and is not being shut down
> > correctly towards the end of the boot process after the loader is
> > capable of reading /etc/defaults/rcS.  Of course, it can't be as
> > simple as that, and of course, I can't really understand, but that's
> > the best I can come up with. There are reasons why I am not a DD.
> 
> Have a look at /etc/init.d/mountoverflowtmp.
> 
> Your root filesystem is full.  This triggers the mounting of a
> tmpfs on /tmp *irrespective* of the RAMTMP option, in order to
> allow you to log in.
> 
> Solution: free up some space on your root filesystem, and all
> will return to normal.  Mounting a filesystem on /tmp would have
> solved this specific problem by making more than a megabyte of
> free space available, which would avoid triggering this condition.
> 
> 
> Regards,
> Roger

Roger,

Many thanks for being so patient with me. df does say the disk
is full, but please read further.

My root filesystem disk is a nominal 60GB partition on an 80GB HD.
Other partitions are 2ea ext3 partitions of 19GB and one swap 
partition for the rest of the 80GB. (All partitions (except swap)
are ext3 on all my disks.)

As I say, df says it is full. But du -k -s -c says there slightly
less than 3.74GB of data on the whole disk. Removing some data
from the root filesystem can be done but before I do that I would
like to understand what is occupying 15/16ths of the disk, and how to
remove that and how to keep it from coming back. I think it is
very very unlikely that tmpfs is to blame, but I ask your help because
you have gotten me this far, and you already know how difficult I can
be but nevertheless persist in helping me. What should I do?

This is the ls of the root file system:

root@gq:/# ls -l /
total 116
drwxr-xr-x   2 root root  4096 20120326_175618 bin
drwxr-xr-x   3 root root  4096 20120325_095914 boot
drwxr-xr-x  13 root root  3360 20120402_162358 dev
drwxr-xr-x 137 root root 12288 20120402_163817 etc
drwxr-xr-x   2 root root  4096 20120402_164014 home
lrwxrwxrwx   1 root root    32 20120313_070235 initrd.img -> /boot/initrd.img-3.2.0-2-686-pae
lrwxrwxrwx   1 root root    32 20120216_114920 initrd.img.old -> /boot/initrd.img-3.2.0-1-686-pae
drwxr-xr-x  17 root root 12288 20120326_175618 lib
drwx------   2 root root 16384 20110611_113359 lost+found
drwxr-xr-x  12 root root  4096 20120328_040453 media
drwxr-xr-x   2 root root  4096 20120328_034547 mnt
drwxr-xr-x   3 root root  4096 20110611_113408 mpa2
drwxr-xr-x   3 root root  4096 20110611_113416 mpa3
drwxr-xr-x   2 root root  4096 20110611_113426 mpb1
drwxr-xr-x   4 root root  4096 20120402_164008 mpb2
drwxr-xr-x   2 root root  4096 20110611_113530 opt
dr-xr-xr-x  90 root root     0 20120402_161618 proc
drwx------   9 root root  4096 20120402_163817 root
drwxr-xr-x  16 root root   780 20120402_161710 run
drwxr-xr-x   2 root root 12288 20120326_175619 sbin
drwxr-xr-x   2 root root  4096 20110504_055428 selinux
drwxr-xr-x   2 root root  4096 20110611_113530 srv
drwxr-xr-x  13 root root     0 20120402_161619 sys
drwxr-xr-x   3 root root  4096 20120402_171701 tmp
drwxr-xr-x  10 root root  4096 20110611_113530 usr
drwxr-xr-x  12 root root  4096 20120203_162430 var
lrwxrwxrwx   1 root root    28 20120313_070235 vmlinuz -> boot/vmlinuz-3.2.0-2-686-pae
lrwxrwxrwx   1 root root    28 20120216_114920 vmlinuz.old -> boot/vmlinuz-3.2.0-1-686-pae
root@gq:/# 

This is the du command and results:
root@gq:/# du -k -s -c /[^pm]* /m[^e]*
7172	/bin
18420	/boot
0	/dev
8556	/etc
4	/home
0	/initrd.img
0	/initrd.img.old
202628	/lib
16	/lost+found
4	/opt
1200	/root
668	/run
7576	/sbin
4	/selinux
4	/srv
0	/sys
20	/tmp
2873144	/usr
508676	/var
0	/vmlinuz
0	/vmlinuz.old
4	/mnt
20	/mpa2
20	/mpa3
4	/mpb1
111516	/mpb2
3739656	total
root@gq:/# 

The tricky file argument in the command keeps du from including /media
and /proc in the total file space count but picks up space from
everything else in /. At the time this was done I had already moved
the contents of /home into the directory /mpb2.  I could have moved it
back, but I wanted to compose this letter and send as a higher
priority task. /mpa2 and /mpa3 are the second and third partitions of
the HD that holds the root partition. Xwindows is not installed. I
access this computer via ssh from another, newer computer running Squeeze.

My experience is that under 4GB is about the right size for a Debian
installation when loaded with the packages that I like to have, but
maybe I have been doing something terribly wrong for a long time. I
really don't know what the size should be in terms of the general
experience of other Debian users. I've never been to an installfest,
etc.

Why the disagreement between df and du ? How is it possible? 
I could swap the two disks on the system and have the 250GB HD be
the root file system. But it would probably become filled up to its
capacity with me being no closer to understanding how I might keep
the fill-up from happening again.

Here is the actual output of df:

root@gq:/# df
Filesystem                                             1K-blocks     Used Available Use% Mounted on
rootfs                                                  56710460 54282104         0 100% /
udev                                                      580720        0    580720   0% /dev
tmpfs                                                     116424      668    115756   1% /run
/dev/disk/by-uuid/bdef667c-a248-4cb7-b509-943e28fe0f8f  56710460 54282104         0 100% /
tmpfs                                                       5120        0      5120   0% /run/lock
tmpfs                                                     232844        0    232844   0% /run/shm
/dev/sda2                                                9612516   152684   8971540   2% /mpa2
/dev/sda3                                                9612516   152684   8971540   2% /mpa3
/dev/sdb1                                               57677500   184268  54563380   1% /tmp
/dev/sdb2                                              182687364   303444 173103848   1% /mpb2
root@gq:/# 

If you know what's wrong, please tell me. If you want more information please ask. I need help.
-- 
Paul E Condon           
pecondon@mesanetworks.net


Reply to: