RESIZE /DEV/SHM tmpfs FILESYSTEM IN LINUX

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 19 Oct, 2021
  • 0 Comments
  • 39 Secs Read

RESIZE /DEV/SHM tmpfs FILESYSTEM IN LINUX

In this blog, We will see how to increase the /dev/shm tmpfs file system

In this example, remount /dev/shm with 8G size as follows:
# mount -o remount,size=8G /dev/shm

Step 2: Open /etc/fstab with vi or any text editor of your choice

Step 3: Locate the line of /dev/shm and use the tmpfs size option to specify your expected size

e.g.
tmpfs /dev/shm tmpfs defaults,size=8G 0 0
or
tmpfs /dev/shm tmpfs defaults,size=8G 0 0

Step 4: To make change effective immediately, run this mount command to remount the /dev/shm filesystem:

mount -o remount /dev/shm

Step 4: Verify

[root@prim ~]$ df -h /dev/shm
Filesystem Size Used Avail Use% Mounted on
tmpfs 8.0G 641M 7.4G 8% /dev/shm