In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Environment: RHEL6.6+11gR2RAC
Because rac is built in the virtual environment for testing, the memory of the virtual machine is set to 3G, and the patch causes the PC to be too slow. Therefore, the contents of the two virtual machines are adjusted to 2534m memory. After starting the virtual environment, it is found that the database cannot be started. The following error is reported when starting the virtual machine manually on a single node:
Oracle@cluster2 ~] $sqlplus / nolog
SQL*Plus: Release 11.2.0.4.0 Production on Sat May 28 01:03:24 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL > conn / as sysdba
Connected to an idle instance.
SQL > startup
ORA-00845: MEMORY_TARGET not supported on this system
SQL >
After searching the information, we found that the problem is as follows, see MOS ID 460506.1
The new memory management parameter MEMORY_TARGET in oracle 11g can automatically adjust SGA and PGA. This feature requires the use of / dev/shm shared file system, and requires that / dev/shm must be greater than MEMORY_TARGET. If / dev/shm is smaller than MEMORY_TARGET, an error will be reported.
Check the warning log and reveal the following message:
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 1207959552 bytes. / dev/shm is either not mounted or is moun
Ted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 1101058048 and used is 120430592 bytes. Ensure that the mount po
Int is / dev/shm for this directory.
Memory_target needs larger / dev/shm
Solution
1. The initialization parameter MEMORY_TARGET or MEMORY_MAX_TARGET cannot be greater than / dev/shm. To solve this problem, you can increase / dev/shm
Such as:
Mount-t tmpfs shmfs-o size=3g / dev/shm
two。 To ensure that the operating system takes effect after a reboot, the / etc/fstab file needs to be modified.
Tmpfs / dev/shm tmpfs defaults,size=3g 0 0
3. The above error will be reported if / dev/shm is not mounted, so you need to make sure it is mounted.
Restart the server after modification and view as follows:
[grid@cluster2] $df-h
Filesystem Size Used Avail Use% Mounted on
/ dev/sda3 71g 20g 48g 30% /
Tmpfs 3.0G 412M 2.6G 14% / dev/shm
/ dev/sda1 190m 29m 151m 16% / boot
[grid@cluster2 ~] $cat / etc/fstab
#
# / etc/fstab
# Created by anaconda on Wed May 25 00:45:01 2016
#
# Accessible filesystems, by reference, are maintained under'/ dev/disk'
# See man pages fstab (5), findfs (8), mount (8) and/or blkid (8) for more info
#
UUID=78a45723-e057-4055-a9b6-251acb2e6bb2 / ext4 defaults 1 1
UUID=29aae331-4dbe-4bf6-93d2-dc9eed0366f3 / boot ext4 defaults 1 2
UUID=68b77663-849b-4c80-891f-da37b671d992 swap swap defaults 0 0
Tmpfs / dev/shm tmpfs defaults,size=3G 0 0
Devpts / dev/pts devpts gid=5,mode=620 0 0
Sysfs / sys sysfs defaults 0 0
Proc / proc proc defaults 0 0
[grid@cluster2 ~] $
Check that the database has been started.
[root@cluster2 ~] # su-grid
C [grid@cluster2 ~] $crsctl stat res-t
NAME TARGET STATE SERVER STATE_DETAILS
Local Resources
Ora.DATA.dg
ONLINE ONLINE cluster1
ONLINE ONLINE cluster2
Ora.FRA.dg
ONLINE ONLINE cluster1
ONLINE ONLINE cluster2
Ora.LISTENER.lsnr
ONLINE ONLINE cluster1
ONLINE ONLINE cluster2
Ora.OCR_VOTE.dg
ONLINE ONLINE cluster1
ONLINE ONLINE cluster2
Ora.asm
ONLINE ONLINE cluster1 Started
ONLINE ONLINE cluster2 Started
Ora.gsd
OFFLINE OFFLINE cluster1
OFFLINE OFFLINE cluster2
Ora.net1.network
ONLINE ONLINE cluster1
ONLINE ONLINE cluster2
Ora.ons
ONLINE ONLINE cluster1
ONLINE ONLINE cluster2
Ora.registry.acfs
ONLINE ONLINE cluster1
ONLINE ONLINE cluster2
Cluster Resources
Ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE cluster2
Ora.cluster.db
1 ONLINE ONLINE cluster1 Open
2 ONLINE ONLINE cluster2 Open
Ora.cluster1.vip
1 ONLINE ONLINE cluster1
Ora.cluster2.vip
1 ONLINE ONLINE cluster2
Ora.cvu
1 ONLINE ONLINE cluster1
Ora.oc4j
1 ONLINE ONLINE cluster1
Ora.scan1.vip
1 ONLINE ONLINE cluster2
The following information is extracted from the network:
1. / dev/shm theory
/ dev/shm/ is a very useful directory under linux because it's not on your hard drive, it's in memory. Therefore, under linux, you don't need to go to a lot of trouble to build ramdisk, but you can achieve a good optimization effect by directly using / dev/shm/. One thing / dev / shm/ needs to pay attention to is the capacity problem. Under linux, it defaults to half the size of memory, as you can see with the df-h command. But it will not really occupy this piece of memory, if there are no files under / dev/shm/, it actually occupies 0 bytes of memory; if it has a maximum of 1G and contains 100m files, then the remaining 900m can still be used by other applications, but the 100m of memory it occupies will never be recycled and redivided by the system, otherwise who dares to store files in it?
The default system loads / dev/shm, which is called tmpfs, which some say is different from ramdisk (virtual disk). Like a virtual disk, tmpfs can use your RAM, but it can also use your swap partition for storage. And the traditional virtual disk is a block device and requires a command like mkfs to actually use it. Tmpfs is a file system, not a block device; just install it and it's ready to use.
Tmpfs has the following advantages:
1, the size of the dynamic file system.
The other major benefit of 2Jet tmpfs is its lightning speed. Because a typical tmpfs file system resides entirely in RAM, reads and writes can be almost instantaneous.
3Grampfs data is not retained after a reboot, because virtual memory is inherently volatile. So it is necessary to do some scripts to do operations such as loading and binding.
II. Modify / dev/shm size
The default maximum half of the memory size may not be enough in some cases, and the default amount of inode is generally increased, so you can use the mount command to manage it.
# mount-o size=1500M-o nr_inodes=1000000-o noatime,nodiratime-o remount / dev/shm
On 2G machines, adjust the maximum capacity to 1.5G and the number of inode to 1000000, which means that up to a million small files can be saved roughly.
If you need to permanently modify the value of / dev/shm, you need to modify / etc/fstab
Tmpfs / dev/shm tmpfs defaults,size=1.5G 0 0
# mount-o remount / dev/shm
3. / dev/shm application
First create a tmp folder in / dev/shm, and then bind it to the actual / tmp
# mkdir / dev/shm/tmp
# chmod 1777 / dev/shm/tmp
# mount-bind / dev/shm/tmp / tmp (- bind)
After you use the mount-bind olderdir newerdir command to mount one directory to another, all information such as the permissions and owners of newerdir changes. The mounted directory inherits all the properties of the mounted directory, except for the name. Oracle 11g's amm memory management mode is to use / dev/shm, so sometimes modifying MEMORY_TARGET or MEMORY_MAX_TARGET will lead to ORA-00845 errors.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.