PDA

View Full Version : [ViX_Misc] tmpfs is inflated - main root system deflated



Cucosat
18-06-12, 16:55
Hi,

I noticed that I had trouble installing some plugins and eventually tracked down the problem to a lack of space on the root filesystem.

Running a df -h revealed that my root filesystem had suddenly shrunk to 105MB, while I now had two tmpfs partitions one of which was over 140MB in size.

I did a complete reflash with a new image but that didn't solve anything which was quite surprising to me.

My current output from df -h:

Filesystem Size Used Available Use% Mounted on
ubi0:rootfs 104.9M 91.3M 13.7M 87% /
tmpfs 64.0K 4.0K 60.0K 6% /dev
/dev/sda1 1.8T 1.7T 94.4G 95% /media/hdd
tmpfs 142.4M 640.0K 141.8M 0% /var/volatile

My /etc/fstab:

rootfs / auto defaults 1 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
usbfs /proc/bus/usb usbfs defaults 0 0
tmpfs /var/volatile tmpfs defaults 0 0
Is it possible my bootloader has somehow become corrupted and can I simply/safely remove the tmpfs in the fstab?

I'm running ViX 2.4 rev 151.

Trial
18-06-12, 17:47
Hi,
tmpfs is similar to a ramdisk (dynamic one) it has nothing to do with your flash being full.

ciao

Cucosat
18-06-12, 19:07
Ok, somehow I just seem to recall seeing a much larger root file system before and got it in my head that it was supposed to be around 250MB.

It doesn't make much sense to me either to have a tmpfs as a ramdisk instead of simply using the RAM directly, does anyone know if there is a particular reason for this and if others are having a 140MB ramdrive on their ET9000 as well?

Trial
18-06-12, 20:31
Hi,
you need a filesystem to store temporary files. You cannot simply put it into ram because no program will be able to access it.

ciao

punisher
18-06-12, 20:38
here is mine for my ET9K


root@et9x00:~# df -h
Filesystem Size Used Available Use% Mounted on
ubi0:rootfs 104.6M 102.5M 2.1M 98% /
tmpfs 64.0K 4.0K 60.0K 6% /dev
tmpfs 142.4M 132.0K 142.3M 0% /var/volatile

Cucosat
18-06-12, 20:40
Yes, I know that but I don't think it's necessary to have a tmpfs which is 1.4 times the size of the root filesystem.

Cucosat
18-06-12, 20:42
Thanks punisher, looks very similar at least.

Trial
19-06-12, 07:36
Hi,

Yes, I know that but I don't think it's necessary to have a tmpfs which is 1.4 times the size of the root filesystem.
you still do not understand. It is a dynamic "ramdisk" and what you see is the maximum size which is around the complete memory. If there are only files with the total length of 10MB in /tmp it only uses 10MB.

ciao

pooface
19-06-12, 14:44
Here's mine also, so similar to you both :p


Filesystem Size Used Available Use% Mounted on
ubi0:rootfs 104.9M 57.0M 47.9M 54% /
tmpfs 64.0K 0 64.0K 0% /media
tmpfs 64.0K 4.0K 60.0K 6% /dev
/dev/sda1 54.7G 6.3G 48.4G 11% /media/usb
/dev/sdb1 1.8T 1.4T 422.7G 77% /media/hdd

Cucosat
19-06-12, 19:25
Ok, got it now, I was just under the impression that once a ramdisk was defined, that memory address space was reserved and could not be used for other things. According to this page you are right in calling it a "ramdisk" since it's not actually a ramdisk (which does work in the way I understood):
http://e2enetworks.com/2008/10/25/linux-in-memory-filesystems-tmpfs-vs-ramdisk/

Trial
19-06-12, 21:04
Hi,
it works the way you understood it but it is DYNAMICALLY. There were also dynamic ramdisks for PCs.

ciao