tmpfs size option not working

Julien MARBACH jmarbach at quelisid.com
Thu Jan 5 15:38:39 UTC 2006


Hi Rob,
As jason schoon suggested in his post, I checked if tmpfs was supported
by my kernel and in fact it wasn't. So my tmpfs was in fact a ramfs...
So as far as ramfs doesn't support size limit, it is "normal" if the
size parameter did not work.
Now hat I've addes real tmpfs support in the kernel (2.6 : CONFIG_SHMEM)
the 16M size limit that I've set in my fstab is respected.

On Wed, 2006-04-01 at 18:20 -0600, Rob Landley wrote:
> On Wednesday 04 January 2006 16:59, Julien MARBACH wrote:
> > Hello,
> > I'm trying to fix the maximum size of a tmpfs (my /var directory) but
> > the size=16m option doesn't seem to work. The corresponding line in my
> > fstab is :
> > none /var        tmpfs   size=16M   0   0
> > But if i create a big file under /var I never receive any error message
> > telling that the limit has been reached. For example if I do a
> 
> Which busybox version are you using, and what exactly are you trying to do?
I'm using busybox 1.0
> 
> Busybox mount's -a support is a bit flaky right now, and fstab flags is one of 
> the things that could easily exhibit strange behavior.  I've been working on 
> fixing this and two other related issues in mount.  Might have time to make 
> some progress on the plane tomorrow.
> 
> Could you send me your /etc/fstab file and tell me exactly what you're doing, 
> so I can test against the actual case you're seeing?  (I take it the mount 
> that isn't happening right is a mount -a during boot?  Can you fix it with a 
> manual mount of tmpfs?  Trying to get remount to do it may not work because 
> that's one of the other two things I've been trying to fix...)
my fstab :
# cat /etc/fstab
/dev/mtdblock1 /             jffs2   defaults    0   1 
/dev/mmc       /mnt/mmc      auto    defaults    0   0 
none           /proc         proc    defaults    0   0 
none           /dev/pts      devpts  defaults    0   0 
none           /var          tmpfs   size=16M    0   0 
none	       /proc/bus/usb usbfs   defaults    0   0 
sysfs          /sys          sysfs   defaults	 0   0
/dev/sda1      /mnt/sda1     auto    defaults    0   2 
/dev/sdb1      /mnt/sdb1     auto    defaults    0   2 
/dev/mtdblock0 /mnt/boot     jffs2   defaults,ro 0   0

during the boot process I just do a  "mount /var".

Julien
> 
> > I've tried to unmount and remount /var manually after startup with
> >
> > $ umount /var
> > $ mount tmpfs /var -t tmpfs -o size=16m
> >
> > But the result is the same. The limit is not respected...
> 
> Hmmm...  That one should work in current -svn.  Dunno about 1.01, that's 
> before my mount rerwrite went in.  I'll take a look, but not tonight.
> 
> > Any idea?
> 
> Several.  If saturday rolls around and I haven't gotten back to you on this, 
> gimme a poke... 
> 
> > Thanks,
> >
> > julien
> 
> Rob
-- 
MARBACH Julien
Embedded software engineer
Quelis ID Systems
11845 IreneeVachon
J7N 1G2 Mirabel (QC)
Canada

Phone : +1 (450) 476-1930 - x230
Fax   : +1 (450) 476-0246

--- www.quelisid.com ---






More information about the busybox mailing list