Shared memory

General support questions
Post Reply
adixtx
Posts: 1
Joined: 2011/10/12 09:43:49

Shared memory

Post by adixtx » 2011/10/12 10:18:28

Hi,

I want to increase the size of tmpfs mounted in /dev/shm . So I put in /etc/fstab the option size=66% for this mount entry (tmpfs /dev/shm tmpfs size=66% 0 0).
After reboot no changes at all.
If I manualy do a $mount -o remount tmpfs , then the size is adjusted to the size I wanted.
How to make this to be persistent after restart and why the value of size in /etc/fstab are not applied ?

Thanks.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Shared memory

Post by pschaff » 2011/10/13 00:39:00

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

I suspect the problem is due to your /etc/fstab entry which replaces the default entry "default" with only "size=66%". With the default entry I see[code]# grep tmpfs /etc/mtab
tmpfs /dev/shm tmpfs rw,rootcontext="system_u:object_r:tmpfs_t:s0" 0 0[/code]
So I'd try [code]tmpfs /dev/shm tmpfs rw,rootcontext="system_u:object_r:tmpfs_t:s0,size=66% 0 0[/code]

Post Reply