SOLVED: this issue is solved in Linux 6.4 (kernel: 2.6.39-400.17.1.el6uek and 2.6.32-358.el6).
A single entry in /etc/fstab like [tmpfs /dev/shm tmpfs size=3g 0 0] now works as it should!
There is a bug in Red Hat Linux 6 and Oracle Enterprise Linux 6 (UEK and RHEL-kernel) and probably all other Red Hat 6 related Linux Distro’s.
When you need more memory for SGA/PGA when using MEMORY_MAX_TARGET, you need to resize /dev/shm. By default this is 50% of total memory and Oracle tells you to add the following to /etc/fstab, ‘mounting’ the /dev/shm twice (?):
tmpfs /dev/shm tmpfs size=3g 0 0
(IMPORTANT NOTE: make sure the first field (fs_spec) ‘shmfs’ has the same name as the already existing ‘defaults’ name). So if you have a line [tmpfs /dev/shm tmpfs defaults 0 0], make sure the ‘overruled’ line also starts with ‘tmpfs’: [tmpfs /dev/shm tmpfs size=3g 0 0]. If not, a `mount -a` will un-mount (!!!) the ‘shmfs’ and remount ‘tmpfs’, this results in immediate clearing the ‘/dev/shm’ memory and all your SGA is instantly gone! Running this when databases are running, your databases with AMM will crash! This ‘issue’ is still there last time checked in Linux 7.3. In Oracle documentation about /dev/shm, the first field is ‘shmfs’ with can result in crashing databases when a `mount -a` done!
But, sometimes that line is alread there, which in my opinion should be used and should work:
#tmpfs /dev/shm tmpfs defaults 0 0 tmpfs /dev/shm tmpfs size=3g 0 0
This works after a remount: ‘mount -o remount /dev/shm’, but it doesn’t work after a reboot…
It seems to be a bug in a module called ‘dracut’. Setting attributes for /dev/shm should work at tmpfs entry, but the attributes are not taken from /etc/fstab :
“Cause: /dev/shm is mounted in dracut without attributes from fstab. Consequence: /dev/shm does not have attributes from fstab. Fix: Remount /dev/shm in rc.sysinit. Result: /dev/shm has attributes from fstab.”
But, adding it again (shmfs see above) to /etc/fstab also works…
This is the case when using the Oracle Enterprise Linux 6 (UEK and RHEL) and Red Hat Linux 6, so I think also Red Hat 6 related distributions like CentOS will suffer from this bug.
Update: This is fixed in Linux 6.4, so an extra line is not necessary.