Modify/etc/fstab in OracleLinux6.1 to enable tmpfs

Source: Internet
Author: User
Modify etcfstab in OracleLinux6.1 to enable tmpfs

Instructions on how to modify/etc/fstab to make tmpfs take effect in Oracle Linux 6.1

Instructions on how to modify/etc/fstab to make tmpfs take effect in Oracle Linux 6.1

[Date: 2012-03-01] Source: csdn Author: tianlesoftware [Font:]

During Oracle 11g installation, the following two problems are frequently encountered:

Oracle 11gORA-00845: MEMORY_TARGET not supported on this system description

[INS-35172] Target database memory (XXMB) exceeds the systems available shared memory ({0} MB) Solution

The solution is to add parameters in:/etc/fstab to enable the system to automatically load the configuration at startup:

Tmpfs/dev/shm tmpfs ults, size = 3G 0 0

The value of tmpfs is half of the system memory by default. This configuration can be used normally in the RedHat system, but I tested it in Oracle Linux 6.1 and found that this parameter cannot take effect, even if it is set to 3 GB, after the OS is started, check whether the size of tmpfs is half the memory size.

It takes effect after manual mount:

[Root @ rac1 ~] # Df-lh

Filesystem Size Used Avail Use % Mounted on

/Dev/sda3 14 GB 11G 2.4G 83%/

Tmpfs 3.0G 0 3.0G 0%/dev/shm

/Dev/sda1 194 M 46 M 139 M 25%/boot

Tmpfs 3.0G 0 3.0G 0%/dev/shm

[Root @ rac1 ~] # Cat/etc/fstab

#

#/Etc/fstab

# Created by anaconda on Tue Nov 2011

#

# Accessible filesystems, by reference, aremaintained under '/dev/disk'

# See man pages fstab (5), findfs (8), mount (8) and/or blkid (8) for more info

#

UUID = b1d2de8e-de31-4deb-b4e8-755c0ed01616/ext4 ults 1 1

UUID = 4df5aa5f-8ef0-473a-931a-51d11e21aa53/boot ext4 ults 1 2

UUID = 82085104-5021-4aaf-8e85-f213998108b6swap swap ults 0 0

Tmpfs/dev/shm tmpfs ults, size = 3G 0 0

Devpts/dev/pts devpts gid = 5, mode = 620 0 0

Sysfs/sys sysfs defaults 0 0

Proc/proc defaults 0 0

[Root @ rac1 ~] #

Therefore, if we only modify/etc/fstab, it will not be affected in Oracle Linux6.1.

We also need to modify another configuration file to make the modification of tmpfs in fstab take effect:/etc/rc. d/rc. sysinit

Step 1: comment out the following statements:

# Mount-f/dev/shm>/dev/null2> & 1

Step 2:

Find the following content in rc. sysinit:

# Mount all other filesystems (snapshot t forNFS and/proc, which is already

# Mounted). Contrary to standard usage,

# Filesystems are NOT unmounted in singleuser mode.

If ["$ READONLY "! = "Yes"]; then

Action $ "Mounting local filesystems:" mount-a-tnonfs, nfs4, smbfs, ncpfs, cifs, gfs, gfs2-O no_netdev

Else

Action $ "Mounting local filesystems:" mount-a-n-tnonfs, nfs4, smbfs, ncpfs, cifs, gfs, gfs2-O no_netdev

Fi

Add the tmpfs type in the following section:

If ["$ READONLY "! = "Yes"]; then

Action $ "Mounting local filesystems:" mount-a-tTmpfs,Nonfs, nfs4, smbfs, ncpfs, cifs, gfs, gfs2-O no_netdev

Else

Action $ "Mounting local filesystems:" mount-a-n-tTmpfs,Nonfs, nfs4, smbfs, ncpfs, cifs, gfs, gfs2-Ono_netdev

Fi

Then restart the OS:

[Root @ rac1 ~] # Df-lh

Filesystem Size Used Avail Use % Mounted on

/Dev/sda3 14 GB 11G 2.4G 83%/

Tmpfs 3.0G 88 K 3.0G 1%/dev/shm

/Dev/sda1 194 M 46 M 139 M 25%/boot

After the restart, tmpfs will automatically change according to our set value.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.