Questions tagged [tmpfs]

189 questions
61
votes
4 answers

(How) can I create a tmpfs as a regular (non-root) user?

The distribution is an Ubuntu server running the 2.6.35-30 Linux kernel. I would like to have a directory that sits completely in memory. Is this possible without root privileges?
bitmask
  • 1,134
  • 2
  • 13
  • 23
54
votes
2 answers

Difference between /run and /var/run

Is there any difference between /run directory and var/run directory. It seems the latter is a link to the former. If the contents are one and the same what is the need for two directories?
Jackzz
  • 1,363
  • 3
  • 15
  • 21
32
votes
3 answers

Move /tmp to RAM

I am trying to move /tmp to RAM and obey good practice: /var/tmp should NOT be placed in tmpfs, as it must survive reboots not mount /tmp as a stand-alone tmpfs, but rely on /dev/shm or /run/shm However, things have changed between 2.6 and 3.2…
Massimo
  • 965
  • 1
  • 10
  • 23
30
votes
1 answer

What sets the size of tmpfs? What happens when its full?

What sets the size of the tmpfs? (On my machine it resides in /dev/shm) I can see its entry in /etc/fstab, but no notation of its size. When checking with df -h, it seems to be half the size of the physical memory installed in the system. Is this…
Bichoy
  • 3,056
  • 2
  • 19
  • 33
23
votes
1 answer

Group permissions for root not working in /tmp

I experienced a strange behaviour in my /tmp directory. Although a user belongs to a group that has permissions to read/write a file, he cannot do so. In this example, I create a new file /tmp/test.txt as user max. I give it the 777 permissions and…
mxmehl
  • 743
  • 1
  • 5
  • 9
19
votes
2 answers

Can fstab options uid and gid be the user-group name or must they be numeric?

I'm learning how to set up a tmpfs in fstab for my www-data user and I was wondering if I can use the actual user/group name instead if the numeric ids (personal preference)? I'm on Debian with ext4, formatted with "msdos" during setup. It seems to…
Jeff
  • 766
  • 3
  • 7
  • 17
18
votes
1 answer

How to increase /tmp folder size manually

I have no free space left on /tmp folder in Fedora 26. That cause several problems. Folder /tmp takes up all the free RAM: $ df -h /tmp Filesystem Size Used Avail Use% Mounted on tmpfs 3.9G 3.9G 12k 100% /tmp $ So, how i can…
Lil Bro
  • 315
  • 1
  • 2
  • 6
18
votes
1 answer

Why is /dev full?

The /dev.. is full: SERVER:/dev # df -mP /dev Filesystem 1048576-blocks Used Available Capacity Mounted on udev 12042 12042 0 100% /dev There is no files that consume space! SERVER:/dev # find . -ls…
newuser999
  • 503
  • 2
  • 4
  • 13
16
votes
1 answer

How to make tmpfs to use only the physical RAM and not the swap?

How to be sure that a tmpfs filesystem can only deal with physical and it's not using a swap partition on disk? Since I have a slow HDD and a fast RAM, I would like, at least, giving higher priority to the RAM usage for swap and tmpfs or disabling…
user1717079
  • 485
  • 2
  • 5
  • 11
16
votes
3 answers

On system memory... specifically the difference between `tmpfs,` `shm,` and `hugepages...`

I've been curious lately about the various Linux kernel memory based filesystems. Note: As far as I'm concerned, the questions below should be considered more or less optional when compared with a better understanding of that posed in the title. I…
mikeserv
  • 57,448
  • 9
  • 113
  • 229
15
votes
4 answers

Temporary folder that automatically destroyed after process exit

Can we use temporary folders like temporary files TMP=$(mktemp ... ) exec 3<>$TMP rm $TMP cat <&3 which will be destroyed automatically after this shell exit?
Bob Johnson
  • 449
  • 3
  • 9
15
votes
1 answer

What could explain this strange sparse file handling of/in tmpfs?

On my ext4 filesystem partition I can run the following code: fs="/mnt/ext4" #create sparse 100M file on ${fs} dd if=/dev/zero \ of=${fs}/sparse100M conv=sparse seek=$((100*2*1024-1)) count=1 2> /dev/null #show its actual used size before echo…
humanityANDpeace
  • 13,722
  • 13
  • 61
  • 107
14
votes
2 answers

tmpfs usage and resizing

I am trying to understand the stuff. I have a machine with 80G storage. It looks like that: Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 50G 7.1G 43G 15% / devtmpfs 3.9G 0 3.9G 0%…
matisa
  • 337
  • 1
  • 3
  • 12
14
votes
1 answer

Systemd backed tmpfs | How to specify /tmp size manually

I mount /tmp on tmpfs using: sudo systemctl enable tmp.mount sudo systemctl start tmp.mount But this way /tmp takes up all the free RAM: $ df -h /tmp Filesystem Size Used Avail Use% Mounted on tmpfs 3.9G 12K 3.9G 1% /tmp $ How…
GMaster
  • 5,992
  • 3
  • 28
  • 32
13
votes
4 answers

Swap on tmpfs (Obviously a bad idea, but is it possible?)

This question originated with a joke between co-workers about increasing performance by moving swap files to a tmpfs. Clearly even if this is possible, it's not a good idea. All I want to know is, can it be done? I'm currently on Ubuntu 14.04, but…
1
2 3
12 13