Skip to main content

Questions tagged [tmpfs]

tmpfs is a common name for a temporary file storage facility on many Unix-like operating systems. It is intended to appear as a mounted file system, but stored in volatile memory instead of a persistent storage device.

1 vote
0 answers
188 views

Why is the filesystem larger than logical volume?

On the machine, there is a logical volume /dev/lvm/tmp of size 500MiB with the same size partition /dev/mapper/tmp that is mounted on /tmp. Checking the logical volume: # lvdisplay /dev/lvm/tmp --- ...
JPM02's user avatar
  • 11
1 vote
0 answers
153 views

Build Docker image on tmpfs

I have a Dockerfile that change file permissions to various folders, one of that is a node_modules RUN chown -R 0:0 . ...
Skhaz's user avatar
  • 111
0 votes
0 answers
131 views

Why does booting tmpfs overlayroot filesystem on read-only disk boot to emergency mode?

I enabled tmpfs overlayroot running following. $ sudo sed -i 's/overlayroot=""/overlayroot="tmpfs"/g' /etc/overlayroot.conf After rebooting, Ubuntu boots as read-only and ...
sunknudsen's user avatar
  • 1,010
4 votes
1 answer
1k views

How to read tmpfs as a block device in linux?

A typical linux machine mounts a tmpfs to store temporary files: $ df Filesystem Size Used Avail Use% Mounted on /dev/sda1 953M 702M 203M 78% / tmpfs 1.5G ...
Duke Nukem's user avatar
  • 1,235
0 votes
0 answers
335 views

Cannot use newfs_hfs on ramdisk

I tried ramfs_size_mb=2048 mount_point=/usr/local/var/mysql # 1024 bytes per kibibyte # 1024 kibibytes per mebibyte # 512 bytes per sector ramfs_size_sectors=$((${ramfs_size_mb}*1024*...
joseph's user avatar
  • 151
1 vote
1 answer
1k views

Why am I able to mount arbitrary TMPFS as an unprivileged user with unshare?

While messing around with unshare, I stumbled on the following behavior in an unprivileged shell: foo@pc $ id foo uid=1000(foo) gid=1000(foo) groups=1000(foo),27(video),97(input) foo@pc $ unshare -r -...
Afalide's user avatar
  • 13
0 votes
0 answers
2k views

How to take full advantage of your RAM on Linux

On the downloads page of Garuda Linux, they say that "we believe in the principle that unused RAM is wasted RAM". There are some performance comparisons on youtube, it wasn't well in stress ...
AdiG15's user avatar
  • 101
0 votes
1 answer
292 views

Syncing Docker tmpfs to Disk?

I have a couple of Docker containers that constantly write to logs. This causes continuous disk I/O, particularly writes. Is there a way to make Docker read/write to a ramdisk, which could ...
Teknophilia's user avatar
0 votes
1 answer
216 views

How to create ramdisc for Prestashop cache on Debian

Recently I was struggling to create ram disk for Prestashop cache folder which will have read and write privilages. I am using Apache + Nginx (as reverse proxy) and PHP-FPM 5.6 (soon moving to 7.2) ...
Eryk Wróbel's user avatar
1 vote
1 answer
1k views

Docker system directories in tmpfs?

Does it make sense to mount any of Docker directories under /var/lib/docker as tmpfs to speed things up and reduce SSD wear? ~ # l /var/lib/docker/ total 56 drwx------ 2 root root 4096 Jul 28 02:02 ...
Daniel W.'s user avatar
  • 1,992
1 vote
1 answer
924 views

How can I run postgres with data dir on /tmp?

I'm running automated integration tests using data stored in a postgres database. I need to start every test run with the same database contents. Instead of always clearing the database and importing ...
user9964388's user avatar
1 vote
0 answers
407 views

Give space to a tiny computer (tmpfs with swap over nfs)

I have a tiny computer with not so much RAM (1-2GiB) and very little disk space in which I installed Gentoo. I also have space on a shared NFS. In order to be able to compile any package, even the ...
Stéphane Veyret's user avatar
10 votes
3 answers
3k views

Should I expect programs that run from a tmpfs folder to run faster? (with and without I/O, inside and outside a Docker container)

On Linux, suppose I have an executable file. Let's look at two cases: (A) A large portion of what the executable does is disk I/O; (B) the executable doesn't do any disk I/O. For each of the cases A ...
Lior's user avatar
  • 211
2 votes
0 answers
465 views

Prevent filesystem caching on tmpfs

Suppose that I want to put a big file (or a bunch of files) into a TMPFS, for whatever reason. Using dd with various combinations of direct and nocache flags, whether I copy a file from disk or create ...
Mona the Monad's user avatar
0 votes
0 answers
97 views

Why my /tmp on Debian 9 have 15GB

My Debian 9 /tmp folder have 15GB (44 days uptime). Am I supposted to manually (or with cronjob) delete /tmp contents? OR something is wrong :D
Baterka's user avatar
  • 133
0 votes
0 answers
331 views

When mounting dir to RAM, will contents remain after computer reboot

I mounted a cache directory to tmpfs for faster performance on my website using this command: tmpfs on /var/cache type tmpfs (rw,relatime,size=102400k,mode=777) It seems to be working well, however, ...
danielb's user avatar
  • 103
1 vote
1 answer
3k views

systemd: disable useless tmpfs

Context: embedded system, read-only MMC with tmpfs overlay. Everything gets written to RAM & disappears on reboot. systemd insists on creating numerous tmpfs mounts (at least /run /run/lock /run/...
syam's user avatar
  • 113
0 votes
1 answer
1k views

Changing permissions of /tmp

I know that 1777 is the default mode of /tmp on many Linux distros. I haven't been able to find much online, but I'm wondering if making /tmp group- and/or world-readable is really necessary. Can ...
Jared Brandt's user avatar
3 votes
1 answer
6k views

Linux tmpfs write speed slower than RAM speed

I have a HPE ProLiant DL360 Gen9 server, specs are: CPU: Intel Xeon 2 CPUs E5-2687W v3 @ 3.10GHz, 25MB L3 cache, 10 cores ea RAM: 8x 32GB PC4-17000 DDR4 2133MHz CAS-15 1.2V SDRAM DIMM (256 GB total) ...
atreyu's user avatar
  • 362
1 vote
1 answer
2k views

Differences between symlink to /tmp and tmpfs

I'm trying to make a read-only file-system (Raspbian). One common way is to place some directory (that are to be writable) in a tmpfs. Example, I found some tutorials that suggest: rm -rf /var/lib/...
Mark's user avatar
  • 438
2 votes
1 answer
817 views

How can I efficiently force VirtualBox to use /dev/shm for all VM files?

SuperUsers. I want to preserve the life of my laptop's SSD drive. I make heavy use of Vagrant, Chef, and Virtualbox. I'm using Test Kitchen w/ Vagrant to run my infrastructure code tests. I am ...
Jesse Adelman's user avatar
1 vote
1 answer
661 views

Is it possible to create tmpfs inside lvm puppet module?

we have autoprovisioning of linux machines (using trusty and xenial) and we are using puppet for it. We are using LVM in puppetlabs/lvm and specifying it in hiera. Example: lvm::volume_groups: ...
user3337015's user avatar
1 vote
1 answer
2k views

OverlayFs merge on unmount

For performance reasons I would like to stack tmpfs on top of the working directory of some programs. However, the program needs to access data previously saved in the "real" working directory, ...
matpen's user avatar
  • 215
2 votes
1 answer
5k views

tmpfs — deleting files won't free the space

Using fedora@latest, I have /tmp mounted as a tmpfs. Sometimes I run some program that stores large files into it, until I fill it entirely. I try to delete some files manually, hoping to free space,...
mh-cbon's user avatar
  • 705
0 votes
1 answer
2k views

How to use tmpfs and SSD for smart cache

I want to create fast logical disk under Linux for storing temporary files. This files I don't afraid to lost. On my machine I have 128Gb of RAM and 512Gb of SSD disk. So I want use 50% of my RAM as ...
Ilya Georgievsky's user avatar
0 votes
0 answers
1k views

DD-WRT: /tmp folder permissions

After making a simple hello world OpenWRT package I installed it to the /tmp folder on the dd-wrt device. The program shows up in ls /tmp but when I try to execute it, it shows me /tmp/helloworld: ...
Awais Chishti's user avatar
0 votes
1 answer
457 views

Where's my RAM disk being stored?

I'm running an Ubuntu VM under Windows 7, within the VM I've allocated a 5GB RAM disk using sudo mount -t tmpfs -o size=5G tmpfs /mnt/gitRAM and then copied files into it. When I then look at conky ...
RobbG's user avatar
  • 101
16 votes
1 answer
20k views

Why is a second "tmpfs" parameter necessary when mounting a tmpfs?

Excerpted from the documentation So 'mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs' will give you tmpfs instance on /mytmpfs which can allocate 10GB RAM/SWAP in 10240 inodes ...
xmllmx's user avatar
  • 444
1 vote
1 answer
1k views

Securely wiping a file on a tmpfs

I have a script that decrypts some data to a tmpfs, the directory is secure (permissions), the machine's swap is encrypted (random key on boot) and when the script is done it does a 35 pass wipe (...
Nanzikambe's user avatar
0 votes
1 answer
2k views

Deleting files within the /tmp directory on an ubuntu machine

My Symfony website has just started to show the following error: ErrorException: Warning: session_start(): open (/tmp/sess_4h4kjh4ui4h478h48h44g02,O_RDWR) failed:No space left on device(28) in /var/...
Richelliot's user avatar
1 vote
1 answer
604 views

Linux volatile user home areas

This is actually a 2 part question, one for design decisions, and the other a technical question: In our current network, we have Linux clients that authenticate against a server, and mount the user'...
Robin McCorkell's user avatar
4 votes
1 answer
879 views

Where is terminal scroll back information stored (how does tmpfs work)?

While trying to test something unconnected, I launched an infinite loop on my terminator terminal emulator which printed a lot of data to STDOUT. After running it for a few minutes, I noticed that my /...
terdon's user avatar
  • 53.7k
8 votes
1 answer
28k views

How to find size of RAM cache use for ramfs, tmpfs

I'm wondering if there is any way to specify the size of RAM cache used to store ramfs, tmpfs? When I look at /proc/, I can't find anything about ramfs size.
Nick's user avatar
  • 89
1 vote
0 answers
1k views

In linux is it possible to extend a ramdisk with a physcial drive in a logical volume?

I do not like how tmpfs behaves with swap and will allow memory to be exhausted before using the swap on physical disk (yes swappiness can be adjusted but it's still affecting the rest of the OS by ...
ck_'s user avatar
  • 1,905
0 votes
1 answer
3k views

how to tell chrome not use /run/shm or how to make /run/shm not mounted as tmpfs?

I have the problem with tmpfs and google chrome. When chrome runs, it uses /run/shm to keep some files like /run/shm/.com.google.Chrome.RnIWmb, the files are (deleted) but still open, that cause ...
zb''s user avatar
  • 622
24 votes
8 answers
82k views

How to cleanup tmp folder safely on Linux

I use RAM for my tmpfs /tmp, 2GB, to be exact. Normally, this is enough but sometimes, processes create files in there and fail to cleanup after themselves. This can happen if they crash. I need to ...
Syncopated's user avatar
3 votes
1 answer
1k views

Mount TMPFS instead of ro /dev

I am working on a ARM-Based embedded system with a custom Debian Linux based on kernel 2.6.31. In the final system, the Root file system is stored as squashfs on flash. Now, the folder /dev is created ...
schiggn's user avatar
  • 41
5 votes
1 answer
9k views

controling tmpfs memory usage

Any way to limit the amount of RAM used by tmpfs wihtout limiting the amount of swap? Most documentations says that tmpfs' size option will limit the total size of the tmpfs partition and later on ...
gcb's user avatar
  • 5,021
2 votes
1 answer
1k views

tmpfs and debian - trash folder

I have created a tmpfs that remounts on boot and works as I had hoped for. My ram folder is here... /home/user/ramdrive/ While testing I noticed that when I delete files via the Debian GUI the files ...
Carlton's user avatar
  • 123
25 votes
3 answers
39k views

Why should I make a separate partition for /tmp?

Why should I make separate partitions for /tmp, /var and so on? I can see more drawbacks than benefits. One benefit is that I can use ext4 with journaling for /home and ext4 without journaling for ...
patryk.beza's user avatar
  • 1,591
2 votes
2 answers
529 views

How to make a good guess for the swap partition size when using tmpfs?

I have an SSD, so space is a scarce resource. I'd like to use up as little as possible for swap. In fact, I have spent the last year completely without a swap partition (the computer has 6 GB RAM). ...
rumtscho's user avatar
  • 4,034
2 votes
1 answer
2k views

Does memory allocated to tmpfs free itself when needed by an application?

I have 8GB of RAM and 4GB is dedicated to the tmpfs on /dev/shm. There's nothing actually in /dev/shm, so I'm wondering, is this memory still available for applications to use? If I needed to use ...
Alasdair's user avatar
  • 867
2 votes
1 answer
5k views

Have I successfully created an ramfs drive?

I thought I had created a ramfs drive, but when I type df -H all I get is following. Filesystem Size Used Avail Use% Mounted on /dev/sda5 69G 8.5G 57G 14% / /dev/...
Alasdair's user avatar
  • 867
3 votes
0 answers
8k views

How do I unmount a tmpfs that is missing from /etc/mtab?

I have the following line in /etc/fstab: none /home/hydra/tmp tmpfs user,noauto,size=1000M,uid=1001,gid=1001 0 0 I can do mount ~/tmp as user hydra and it gets mounted ok. The only problem is ...
Kostas's user avatar
  • 150
4 votes
3 answers
2k views

How can I allow normal users to mount tmpfs under subdirectories of their home directory?

How can I allow normal users to mount a tmpfs under any subdirectory owned by them?
Thiago Padilha's user avatar
4 votes
4 answers
2k views

How can I create consistent snapshots of tmpfs?

How can I create consistent snapshots of tmpfs or any RAM disks?
netvope's user avatar
  • 5,345
27 votes
2 answers
16k views

Can I put /tmp and /var/log in a ramdisk on OS X?

For non-critical Linux systems, I often move things like /tmp and /var/log to tmpfs to save on some disk writing. I've been doing this for a year or so and if I ever need the logs across reboots, I ...
kbyrd's user avatar
  • 2,227
9 votes
2 answers
11k views

Is using a Virtual PC on a RAM DISK super fast? (putting the .vhd file in a RAM DISK)

I wonder how or if any one tried to create a RAM DISK, and then put the 2GB (or sometimes 1.2GB) .vhd file into it, and then run the virtual PC using this image. It should be running super fast, as ...
nonopolarity's user avatar
  • 9,706
2 votes
2 answers
19k views

How tmpfs works in Debian?

I run df -h and found on my Debian Squeeze two tmpfs directory, tmpfs 1.5G 0 1.5G 0% /lib/init/rw tmpfs 1.5G 0 1.5G 0% /dev/shm Then, I added a line in ...
Shawn Xie's user avatar
  • 123
0 votes
1 answer
366 views

/tmp broken: mount doesn't show anything

I'm on Ubuntu 9.04 and I've got the following problem: The folder /tmp normally has a tmpfs mounted in it. On one machine, this isn't the case anymore. I don't know what happened to have it that way. ...
Atmocreations's user avatar