11G内存管理与/dev/shm共享文件系统相关问题

操作系统版本:
oracle@ntsmshost:~$ uname -a
Linux ntsmshost 3.0.0-25-server #41-Ubuntu SMP Mon Aug 13 18:18:27 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
oracle数据版本
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

SQL> shutdown abort
ORACLE instance shut down.
--启动数据库时报错
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
告警日志错误
Starting ORACLE instance (normal)
WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 6509559808 bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 5418188800 and used is 4018995200 bytes. Ensure that the mount point is /dev/shm for this directory.
memory_target needs larger /dev/shm
--原因:
11g特性的内存管理需要用到/dev/shm共享文件系统,且要求/dev/shm大于 TARGET_MEMORY,否则会报错。
解决办法:
# mount -t tmpfs shmfs -o size=8g /dev/shm

1.初始化参数MEMORY_TARGET或MEMORY_MAX_TARGET不能大于共享内存(/dev/shm),解决这个问题,也可以可以增大/dev/shm
2.为了确保操作系统重启之后能生效,需要修改/etc/fstab文件
shmfs /dev/shm tmpfs size=8g 0
----------------------------------------------
--df: `/root/.gvfs': Permission denied
umount /root/.gvfs

修改/dev/shm大小:
 cat /etc/fstab | grep shm
shm                  /dev/shm             tmpfs      size=8g               0 0
修改完后,需要重新挂载/dev/shm生效:
 # mount -o remount /dev/shm

请使用浏览器的分享功能分享到微信等