Questions tagged [tmpfs]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
30 views

Running "mount -a" command shows "mount: mount point tmpfs does not exist"

I Physically Replaced a disk from my server running on RHEL 8. Before Replacing: I unmounted disk by umount /dev/sdf (Successful unmount from mount point /data/5) I then replaced the HDD. After ...
Farzin Mukit's user avatar
0 votes
2 answers
42 views

Why does ftruncate with a shared memory object not use memory?

I've observed that I can create a shared memory object and give it ostensibly any size with ftruncate, regardless of the resource limits on my system. The code below sets the size to 262 TB, and ...
bgfvdu3w's user avatar
  • 115
1 vote
2 answers
71 views

How to create ramfs on Arch Linux

I have 24 GB RAM and a 8 GB swapfile. I know that under Arch Linux there's /dev/shm that uses tmpfs but I want to create a ramfs mount point because I want a place where I can temporary store ...
Dean's user avatar
  • 113
1 vote
1 answer
49 views

How do I set the size of /run (tmpfs) [duplicate]

I’m running AlmaLinux 9.2 (systemd v.252) on a small embedded(-ish) system, where I like to keep a lot of stuff in /run. When I was using CentOS7.x this was on the order of 1.5G, and I never really ...
Popup's user avatar
  • 441
2 votes
1 answer
51 views

Remove all changes after reboot

I want to allow users to be able to make temporary changes such as create files and directories, but have all those changes removed after rebooting. This should apply to everywhere in the file system. ...
Jon's user avatar
  • 23
0 votes
1 answer
89 views

Which comes first, fstab or /var/log?

When Linux boots, does it first read fstab and mount everything from it, or does it start systemd before that? I expect that fstab comes first, but I didn't know how to confirm it. So, even if you ...
donaastor's user avatar
  • 214
0 votes
1 answer
87 views

Can I mount `/var/log/journal` as `tmpfs`?

I have read this question, but it discusses syslog and my question is about journald. Can I mount /var/log/journal as tmpfs using fstab, or will journald be run (and therefore maybe write to the ...
donaastor's user avatar
  • 214
0 votes
1 answer
141 views

Move compressed log files outside /var/log [logrotate with log2ram]

I am looking for advice about logrotate. I have recently installed log2ram to spare my ssd. Since I was not using all 24Gb RAM I assigned 2Gb to /var/log/. currently +- 300Mb is used. I would like ...
Vincent Stans's user avatar
0 votes
0 answers
483 views

How to clear the contents under /run/user/1000/doc?

I am on Ubuntu 20.04 and installed evince via flatpak, when I open evince, it usually makes a copy of the opened file into /run/user/1000/doc. I learned that /run/user/1000/doc is the temporary ...
Simon.Zh.1234's user avatar
0 votes
0 answers
19 views

Root cannot modify user's file in tmpfs with sticky bit set [duplicate]

I noticed a weird behavior that doesn't fit my understanding of the semantics of the sticky bit. I want a process that runs as root to modify a file in the /tmp directory created by a non-privileged ...
dwymark's user avatar
  • 101
0 votes
0 answers
154 views

How to cache downloads to RAM?

This is my first time posting on this forum, I apologise in advance if I inadvertently make any mistakes and welcome any suggestions for question improvements. I am running Ubuntu 22.04.1 on a laptop ...
Kumaresh Balaji Sundararajan's user avatar
0 votes
0 answers
19 views

Is there a way to redirect files that match a certain pattern to another directory?

Gnome libsoup is creating a ton of directories in /tmp on the form grilo-plugin-cache-*/ There's an open issue about it, but it has been open for two years, and the developer does not seem to agree ...
klutt's user avatar
  • 554
2 votes
2 answers
3k views

tmp on tmpfs: fstab vs tmp.mount with systemd

To have /tmp on tmpfs, I know I can use an entry in /etc/fstab, but I do not understand the role of /etc/default/tmpfs mentioned sometimes, and in what case I need to create or modify it. Recently, I ...
Alexey's user avatar
  • 1,878
3 votes
0 answers
44 views

Minimizing disk usage with parallel calls to GCC

I am experimenting with testing GCC in parallel. My setup will run 96 tests before giving me the test report. If I run these tests sequentially it will invoke GCC once, run the executable, gather ...
Rewbert's user avatar
  • 131
0 votes
1 answer
3k views

lsof: WARNING: can't stat() tmpfs file system

when I use lsof as regular user, I get following warnings: lsof: WARNING: can't stat() tmpfs file system /home/testuser/.cache testuser is another user on my systems, and my own user has no access to ...
Martin Vegter's user avatar
0 votes
1 answer
63 views

Correct usage/location of tmpfs for a service in Raspberry Pi?

I wrote simple SystemD service for Raspberry Pi, which collects some data and writes it temporarily to /run/user/1000 It worked, but on reboot I found, that this directory doesn't exist until user ...
Dims's user avatar
  • 3,191
0 votes
1 answer
83 views

Can't copy files to folder due to space issue after mand mount

I tried doing mandatory mount using the following the command mount -t tmpfs -o mand,size=1m tmpfs ./FileLockFail/ Now when I am trying to copy a folder to the mounted directory, its giving me error ...
Himanshuman's user avatar
0 votes
0 answers
289 views

Recover files from a tmpfs?

How do I recover files from a tmpfs? Some people say to use Volatility, but Python 2 Volatility doesn't have any Linux modules, and I don't see where to do file recovery in the Python 3 Volatility ...
Geremia's user avatar
  • 1,173
2 votes
1 answer
2k views

How to verify that my tmpfs/ramdisk is working?

I am setting up a RAM disk in CentOS 7, and by all tutorials, I am able to see the speed increase of writing to the disk. However I never see RAM usage increase either from free -h or from the System ...
J Collins's user avatar
  • 1,105
2 votes
1 answer
7k views

mounting /dev/shm with noexec

on RHEL/CentOS 7.9 there is by default tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel) A security rule says that it must be mounted with the secure options of nosuid, nodev, and noexec. Why ...
ron's user avatar
  • 5,806
0 votes
1 answer
2k views

How can I increase the size of /tmp directory without affecting RAM or anything else? (Redhat 8.2)

I'm new at Linux and I will get use of your help guys on this.. I want to increase the size of /tmp directory without affecting RAM or anything else on Red Hat 8.2 .. any suggestions to do that? ...
Kai Mo's user avatar
  • 1
0 votes
0 answers
166 views

Why does `tmpfs` reads/writes to disk on file creation/deletion?

Question: why are there both disk reads and writes when I create or delete files on a tmpfs? The tmpfs is mounted with mount -t tmpfs -o size=1G tmpfs "/SCRATCHSPACE" in /etc/rc.local (add ...
ddlfmbqrc's user avatar
0 votes
1 answer
359 views

Why is RAMFS much slower than Ram?

I have a 64GB DDR4 3200MHz memory installed on my PC. When I run sysbench, I get the following results: # sysbench memory --memory-block-size=1M --memory-total-size=10G run sysbench 1.0.20 (using ...
Diogo Melo's user avatar
1 vote
1 answer
271 views

Delete /tmp subvolume on btrfs partition scheme and make systemd-tmpfiles work with default tmpfs /tmp directory

I've made the mistake of mounting the /tmp directory as a btrfs subvolume. The problem is that systemd-tmpfiles won't clean it. How can I delete the /tmp subvolume and fix this? I'm new to filesystems,...
Vinícius Gonçalves de Oliveira's user avatar
0 votes
1 answer
489 views

Unwanted automatically started tmpfs and lib/systemd/systemd --user process for not logged in user

Debian 11 Bullseye pc, systemd, no display manager, startx is used to start X, multiple users. When I login with a user, let's say auser-UID 1000, I see this on process list: USER PID %CPU %MEM ...
Krackout's user avatar
  • 2,535
0 votes
0 answers
122 views

Browser downloads fail - Insufficient space in /tmp

I have a virtual machine (CentOS) that was pre-configured (I didn't partition them) and I have some of my work on it. When I got access to the VM, it had very less storage space, and it isn't ...
thatbangaloreanguy's user avatar
0 votes
0 answers
24 views

How to mount an arbitrary directory and allow a user to umunt it? [duplicate]

I use a script to mount a temporary directory: sudo mount -t tmpfs -o size=5G,nr_inodes=10k,mode=0777,user tmpfs tempdir The script is runned from dozens directories, that probably means that I can't ...
NickKolok's user avatar
  • 101
3 votes
2 answers
2k views

Ubuntu 20.04 problems with Chrome, Teams, Visual Studio Code... Maybe related with /dev/shm

I'm facing fatal errors since 2 weeks in my Ubuntu 20.04. Suddenly, my Chrome, my Visual Studio Code and my Teams app, stop working. They freeze, and I must restart my computer. This happens ...
Marc Gil Sendra's user avatar
1 vote
0 answers
1k views

tmpfs /run running out of space but it is not really being used

Good night! I am trying to figure out what is happening with my /run directory! If I look at /run size using df -h | grep tmpfs it returns something like: tmpfs 10G 10G 0 *...
Luciano Andress Martini's user avatar
0 votes
1 answer
2k views

how to avoid deletion of folders under /run or /var/run

the following folder --> /var/run/kafka , include the PID number of the kafka service example ls -ltr /var/run/kafka/kafka.pid -rw-r--r-- 1 kafka hadoop 7 Nov 10 14:14 /var/run/kafka/kafka.pid ...
yael's user avatar
  • 12.6k
0 votes
0 answers
121 views

No files under mount point

I would like to mount my pendrive (/dev/sdc1) under /tmp/my_dir. I used the following command: sudo mount -t tmpfs /dev/sdc1 /tmp/my_dir. I got no errors from mount command. When I check all my ...
tom654321's user avatar
1 vote
0 answers
353 views

tmpfs is slower when accessing a single file than accessing multiple files

Reading different (1.6 GB) blocks of the same file stored on tmpfs maxes out at 2.5GB/s at around 20 threads: But if the same blocks are split into different files on tmpfs I can get 22GB/s: What is ...
Ole Tange's user avatar
  • 33.8k
1 vote
1 answer
4k views

How to disable/override automatic mounting of tmpfs to /tmp by systemd?

Background: On my system /tmp is a regular part of the / partition and I use it for a few important features of the system. Current systemd Approach: On new systems systemd has started to take over ...
Ned64's user avatar
  • 8,516
0 votes
1 answer
246 views

How to determine which tmpfs ran out of space overnight

I have a process that is using tmpfs and I need to know, out of many tmpfs, which one is getting full. Is there a way to do that after a nightly process has failed due to 'out of memory' errors? ...
tale852150's user avatar
1 vote
2 answers
3k views

Why, after unmounting cgroup v1, do I still have empty directories under /sys/fs/cgroup?

I just unmounted cgroup version 1, leaving just a single cgroup2 mount on my system. $ mount | grep -i cgroup tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=...
Evan Carroll's user avatar
0 votes
1 answer
2k views

What happens if you put swap space on a RAM disk?

Since it's possible to create a RAM disk via tmpfs, and make it permanently available via /etc/fstab, what would happen if you had a post-boot script that created a swapfile on your freshly-minted RAM ...
warren's user avatar
  • 1,788
1 vote
2 answers
3k views

Is it necessary to mount devtmpfs with /etc/fstab?

I'm working on a Linux-like operating system for aarch64, based on a 5.6.4-v8+ kernel for Raspberry Pi 3 (Model B+). The Kernel configuration options include: CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y ...
Daniel G.'s user avatar
0 votes
1 answer
957 views

Expanded root volume but tmpfs and devtmpfs is limited

I have expanded root volume in my Amazon ec2 machine (Amazon Linux 2) but the space in tmpfs and devtempfs is still limited. Here is what output of df -h command looks like: $ df -h Filesystem ...
systemdebt's user avatar
3 votes
0 answers
160 views

RAM based file system that overflows to physical disk and maintains maximum I/O performance

I have an issue that seems to hit all the restrictions I have read about regarding tmpfs. I would be very happy to hear anyone's comments on a possible solution. I have an application that generates a ...
Aidan Walton's user avatar
0 votes
1 answer
340 views

Running a busybox applet from /tmp

There is a problematic situation with a headless Linux device. Long story short: the rootfs gets unavailable and this blocks everything. Power recycle is the only way out and I want to automatically ...
Daniel's user avatar
  • 319
1 vote
1 answer
251 views

Is it possible to avoid trashing hard disk while using /tmp as a RAM device?

Origin I need to implement some features to my GDB helper scripts but I have to stick with an older version of GDB (5.3, in this case). Since older versions lack so many features, I need to workaround ...
ceremcem's user avatar
  • 2,251
0 votes
1 answer
1k views

How do I delete shared memory that was used by mounted tmpfs directory?

I executed this command to create a RAM-Disk: mount -t tmpfs -o size=60G tmpfs /tmp/ramdisk After that I copied several files into this virtual filesystem as follows: cp /mnt/user/hugefile.bin /tmp/...
mgutt's user avatar
  • 377
2 votes
1 answer
240 views

zsh: check whether $PWD is on tmpfs mounted filesystem

I would like to change my zsh prompt color, if $PWD is currently on tmpfs mounted filesystem. Lets say for example, /dev/shm is a tmpfs filesystem. I can confirm that: $ grep /dev/shm /proc/mounts ...
Martin Vegter's user avatar
2 votes
1 answer
1k views

/var/cache on temporary filesystem

Due to flash degradation concerns, I would like to lower the amount of unnecessary disk writes on a headless light-duty 24/7 system, as much as sensible. In case it matters this is a Debian-flavored ...
rockfort's user avatar
2 votes
1 answer
4k views

/tmp full but... empty

In a Python program, I use np.memmaps, which make use of the /tmp directory to handle massive arrays. I make sure to clear /tmpregularly by running rm -rf /tmp/* every time I use this code. However ...
Clément Moissard's user avatar
3 votes
1 answer
363 views

mount same tmpfs on two mountpoints

I have this in my /etc/fstab: tmpfs /home/user1/tmp tmpfs rw,nodev,nosuid,noexec,size=16G 0 0 user1 has tmpfs mounted as /home/user1/tmp. I would like to mount same tmpfs for user2 as well, ...
Martin Vegter's user avatar
-1 votes
2 answers
573 views

Why are process management files on Linux stored under /var/run?

Why are process management files on Linux stored under /var/run? For example: $ ls -ltr /var/run/ | grep pid -rw-r--r-- 1 root root 4 Mar 26 14:12 lvmetad.pid -rw-r--r-- 1 ...
yael's user avatar
  • 12.6k
0 votes
0 answers
17 views

Can I efficiently fork a ramfs partition?

I want a ramfs (or equivalent, but strictly RAM only) partition which will serve as a read-only master instance from which any number of identical children can be forked. When a process forks, this ...
spraff's user avatar
  • 891
4 votes
0 answers
1k views

How to check actual RAM usage of tmpfs?

I know that tmpfs falls back to using swap if system is under memory pressure. I can query total tmpfs usage in KiB with df | grep tmpfs | awk 'BEGIN{sum=0} {sum = sum + $3} END{print sum}' but how ...
Mikko Rantalainen's user avatar
1 vote
2 answers
2k views

Linux - Is it possible to create a memory filesystem (ramdisk/tmpfs) to buffer/cache data from disk?

I've got some code that processes a load of data stored on an external HDD. There is about 6.5 GiB of data on the disk, but only a few files are processed rather than the entire contents. I created a ...
user3728501's user avatar