How to mount RAMFS, TMPFS in Centos, Redhat, Fedora, Ubuntu


How to Use and mount RAMFS / TMPFS in Centos, RHEL, Fedora, Ubuntu?


Definition :
RAMFS Random Access Memory Filing System
TMPFS Temporary File System / Temporary File Storage

RAMFS / TMPFS is used to assign or allocate a part of physical memory to be used as a individual partition which can be used for storing data (Reading, Writing) like all other Disk partition on a system. As the data is stored in RAM (Random Access Memory) it is much faster than that of writing or reading from a System Physical disk Partition.
Performance can be measured when writing or Reading a large file from this partition (Small File size wont give you the performance). Mounting RAMFS and TMPFS is same on almost all linux distribution RHEL, Centos, Ubuntu, Fedora.

1. How to mount Tmpfs

# mkdir -p /mnt/tmp
# mount -t tmpfs -o size=200m tmpfs /tmp/ashfs

The last line in the following df -h shows the above mounted /tmp/tmpfs tmpfs file system.

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 24G 11G 12G 47% /
/dev/hda1 99M 12M 83M 12% /boot
tmpfs 248M 0 248M 0% /dev/shm
tmpfs 200M 0 200M 0% /tmp/ashfs

To Read the Complete Tutorial and More Please Click on the link

How to mount RAMFS, TMPFS in Centos, Redhat, Fedora, Ubuntu

More Linux Tutorials

Linux Howtos, Linux Tutorials

Comment