tmpfs

From Gentoo Wiki
Jump to: navigation, search

External resources

tmpfs (Temporary File System) is a virtual filesystem to store files in memory.

Important
The volatile memory can't keep the files after shutdown, reboot or crash. Only store recoverable files in tmpfs.

Installation

You need to activate the following kernel options:

Kernel configuration

File systems  --->
     Pseudo filesystems  --->
          [*] Tmpfs virtual memory file system support (former shm fs)
          [ ] Optional drivers
Optional drivers
Option Description
Tmpfs POSIX Access Control Lists Enable ACL permissions.
Tmpfs extended attributes Enable metadata support.

Usage

Generation and mounting of tmpfs is on step:

root # mount -t tmpfs tmpfs /MOUNTPOINT

You can specify the mount option size to control the maximum size of the filesystem (default: half of your memory). Note, that tmpfs doesn't reserve this memory, but allocates only the needed memory.