Sep 10, 2014

How to resize/increase tmpfs partition.

Increasing linux tmpfs partition have two way to do.

1. Modify you /etc/fstab and put the below. Setting below set the tmpfs size to 2GB
LABEL=/     /           ext4    defaults,noatime  1   1
tmpfs       /dev/shm    tmpfs   defaults        0   0
devpts      /dev/pts    devpts  gid=5,mode=620  0   0
sysfs       /sys        sysfs   defaults        0   0
proc        /proc       proc    defaults        0   0

Add size=2G inline to tmpfs besize defaults.
tmpfs       /dev/shm    tmpfs   defaults,size=2G        0   0
After you modify and save your changes, remount the partitions by issuing command below
# mount -o remount /dev/shm
And you done. Or try easier way below.




2. Or if you want the easier way, issue command below to set the tmpfs to 2GB.
sudo mount -o remount,size=2048M tmpfs /dev/shm
NOTE: The breakdown of doing this, this setting will revert after the system was rebooted, so I recommend to modify the /etc/fstab

No comments: