increase size of /tmp -folder

Joined
Oct 11, 2008
Messages
5
Reaction score
0
Hi.

Can anyone tell me how to increase the size of the tmp folder? (I am trying to install a program called comsol script by using a mounted iso image of the dvd, but I get an error telling me that there is no space left - even though I have 2.9 GB free)

/Peter
 
You really can't increase the size of /tmp as it's just a directory on your SSD drive. if you're running out of memory, then you're running out of disk space on the SSD drive. That's a dangerous thing to happen (filling up /tmp) because I've seen Linux systems where once this happens, /tmp can't be cleaned up with a shutdown.

I guess one could actually increase /tmp by having it mounted to some other external flash memory card? That might be a possibility. But that would require editing /etc/fstab to have /tmp mounted on that card and having the card formatted ext2 and always available.

I think you need to look at some other way to do what you want to do. With that I can't help, as I'm not familiar with what you're trying to install.

BTW, where is that iso located? What size is it? That could account for the shortage of disk space on your SSD. Maybe if you had the iso on a flash key and mounted it from there, you would at least save the disk space that the iso is occupying on the SSD, if indeed that is where you have it?

Cheers.
 
Hi, and thank you for the answer.

The iso is located at a external (usb) hard drive. (and mounted at /mnt/iso)..

As said do I have about 3 GB free space at the ssd, but the problem is that the tmp folder only has about 250 MB free - that is what I do not understand , and want to change.

/Peter
 
I think rbil has it wrong here: /tmp/ lives in a temporary filesystem in memory.
One of many tweaks of Acer/Linpus to avoid too many writes on the SSD.
--Japser.
 
Japser said:
I think rbil has it wrong here: /tmp/ lives in a temporary filesystem in memory.
One of many tweaks of Acer/Linpus to avoid too many writes on the SSD.
--Japser.

why do they want to avoid many writes?

do you know how I can make a tmp folder which uses the ssd free memory?

/Peter
 
Darn, you're right! I'm more familiar with other Linux distros and never realized that Acer has set a policy restricting the size of /tmp. I guess they did that to prevent the problem of something filling up /tmp until the whole drive fills up. Where they've set the this I'm not sure at the moment. That will take some looking around. I'm only familiar on how it is done when mounting a partition in fstab (usrquota), but in Linpus, /tmp isn't mounted in fstab. Maybe somewhere else they're doing it when the system initializes?

Cheers.
 
Japser said:
I think rbil has it wrong here: /tmp/ lives in a temporary filesystem in memory.
One of many tweaks of Acer/Linpus to avoid too many writes on the SSD.
--Japser.

Then it would be mounted in fstab using the tmpfs, and isn't doing that. At least not on my system.

Cheers.
 
Sorry, I cannot elaborate, I don't -have- a One. :(
I worked on a One for a week to get 3G working for my neighbour, installed Debian on it, learned a bit and went back to Linpus.

--Japser.
 
I seem to recall reading that Linpus mounts /tmp at an earlier point during the boot process. Not running it so I can't check. cat /proc/mounts to see what's mounted (/etc/mtab may not be entirely reliable).

Unmounting /tmp would mean that anything written to it goes to the SSD, but that could be tricky since there'll most likely be a bunch processes using it once you're logged in. You could try to comment out the part that mounts /tmp (wild guess would be rc.S or something called from there), but since I can't check I can't guarantee it won't break anything.

Maybe switching to single-user mode would allow you to unmount it, and then switching back to whatever runlevel Linpus uses by default.

Does the thingy you're trying to install need to use /tmp? Can't it be instructed to use some other dir?
Does it use a predictable file/dir name when writing to /tmp? If so, maybe you could create a symlink to somewhere on the SSD?

Oh, and the reason they mount /tmp on tmpfs is that writes are horribly slow on the SSD they included - and each bit on a SSD can only be written to a limited number of times. Restricting the size would be because that's half the RAM available ;).
 
You're so right! mount doesn't display the info, but your command does indeed show /tmp as a tmpfs filesystem. So they aren't using fstab to mount the /tmp like this, but doing it somewhere else. Is it possible it's done directly in the kernel somehow?

Cheers.
 
I presume /tmp is mounted this way for (a) speed and (b) to reduce the number of writes on the SSD. Repeated rapid writes don't do much for the long term reliabilty of an SSD.

If you just want a /tmp that is larger for some specific, temporary job, you ought to be able to mount another directory over the top of it. I doubt you'll be able to unmount it after boot, because there will be stuff open.

sudo mkdir /someplace
sudo chmod 777 /someplace
sudo mount -o rebind /someplace /tmp

Or something like that, anyway
 
rbil said:
So they aren't using fstab to mount the /tmp like this, but doing it somewhere else. Is it possible it's done directly in the kernel somehow?

Welcome to the rabbit hole called the Linpus init system. To answer your question, it is mounted in line 30 of /etc/rc.d/rc.S:

Code:
mount -v tmpfs /tmp -n -t tmpfs
 
I'll try that soon when I have the time..

Thank you for the tip...

How do I exactly unmount the folder, and rebind it to the original location (which I think is in the memory)?

/Peter

kevin said:
I presume /tmp is mounted this way for (a) speed and (b) to reduce the number of writes on the SSD. Repeated rapid writes don't do much for the long term reliabilty of an SSD.

If you just want a /tmp that is larger for some specific, temporary job, you ought to be able to mount another directory over the top of it. I doubt you'll be able to unmount it after boot, because there will be stuff open.

sudo mkdir /someplace
sudo chmod 777 /someplace
sudo mount -o rebind /someplace /tmp

Or something like that, anyway
 
You don't need to unmount the original /tmp. What `rebind' does is install another part of the filesystem at /tmp. Any files that were open in /tmp temporarily become invisible except to the apps that have them open. All new writes to /tmp go to the new location. rebind essentially grafts a directory on top of an existing one.

You only want to do this as a temporary measure, because it can upset some apps if they open a file in /tmp, then find the file is no longer there (because you've grafted a new filesystem on top and hidden the file). But this can be a useful way to get around certain problems with filesystems not being large enough.
 
kevin said:
You don't need to unmount the original /tmp. What `rebind' does is install another part of the filesystem at /tmp. Any files that were open in /tmp temporarily become invisible except to the apps that have them open. All new writes to /tmp go to the new location. rebind essentially grafts a directory on top of an existing one.

You only want to do this as a temporary measure, because it can upset some apps if they open a file in /tmp, then find the file is no longer there (because you've grafted a new filesystem on top and hidden the file). But this can be a useful way to get around certain problems with filesystems not being large enough.

What I meant was, how to "unmount the rebinding", that is tell the system to use the standard tmp folder after I have installed the program which requires the extra space.

/Peter
 
garfieldpbj said:
kevin said:
You don't need to unmount the original /tmp. What `rebind' does is install another part of the filesystem at /tmp. Any files that were open in /tmp temporarily become invisible except to the apps that have them open. All new writes to /tmp go to the new location. rebind essentially grafts a directory on top of an existing one.

You only want to do this as a temporary measure, because it can upset some apps if they open a file in /tmp, then find the file is no longer there (because you've grafted a new filesystem on top and hidden the file). But this can be a useful way to get around certain problems with filesystems not being large enough.

What I meant was, how to "unmount the rebinding", that is tell the system to use the standard tmp folder after I have installed the program which requires the extra space.

/Peter

sudo umount /tmp ?
 
Back
Top