- C Administering Oracle Database on Linux
- C.1 Extended Buffer Cache Support
- C.2 Using hugetlbfs on SUSE Linux Enterprise Server 9 or Red Hat Enterprise Linux 4
- C.3 Using hugetlbfs on Red Hat Enterprise Linux AS 3
- C.4 Increasing SGA Address Space
- C.5 Asynchronous I/O Support
- C.6 Direct I/O Support
- C.7 semtimedop Support
- C.8 High-Speed Network Support
- C.9 Simultaneous Multithreading (SMT)
- Часть 2. Как установить Oracle Database 11g Release 2 RAC на Linux используя VirtualBox – поднимаем кластер
- Часть 1 Oracle Clusterware установка. Установка необходимых пакетов.
- Установить дополнения для гостевой ОС
- Часть 2 Oracle Clusterware установка. Установка необходимых пакетов.
- Настройка сети
- Загружаем файлы Oracle установки
C Administering Oracle Database on Linux
This appendix contains information about administering Oracle Database on Linux. It contains the following topics:
C.1 Extended Buffer Cache Support
This section applies to Linux x86 only.
Oracle Database can allocate and use more than 4 GB of memory for the database buffer cache. This section describes the limitations and requirements of the extended buffer cache feature on Linux x86 systems.
Oracle Database Concepts for more information about the extended buffer cache feature
In-Memory File System
To use the extended buffer cache feature, create an in-memory file system on the /dev/shm mount point equal in size or larger than the amount of memory that you intend to use for the database buffer cache. For example, to create an 8 GB file system on the /dev/shm mount point:
Run the following command as the root user:
To ensure that the in-memory file system is mounted when the system restarts, add an entry in the /etc/fstab file similar to the following:
When Oracle Database starts with the extended buffer cache feature enabled, it creates a file in the /dev/shm directory that corresponds to the Oracle buffer cache.
If an in-memory file system is already mounted on the /dev/shm mount point, then ensure that its size is equal to or larger than the amount of memory that is used for the database buffer cache.
USE_INDIRECT_DATA_BUFFERS Initialization Parameter
To enable the extended buffer cache feature, set the USE_INDIRECT_DATA_BUFFERS initialization parameter to TRUE in the parameter file. This enables Oracle Database to specify a larger buffer cache.
Dynamic Cache Parameters
If the extended cache feature is enabled, then you must use the DB_BLOCK_BUFFERS parameter to specify the database cache size.
Do not use the following dynamic cache parameters while the extended buffer cache feature is enabled:
The following limitations apply to the extended buffer cache feature:
You cannot create or use tablespaces with nondefault block sizes. You can create tablespaces using only the block size specified by the DB_BLOCK_SIZE parameter.
You cannot change the size of the buffer cache while the instance is running.
Oracle Database SQL Reference for more information about the default block size used by the CREATE TABLESPACE command
The default VLM window size is 512 MB. This memory size is allocated to the address space of the process. To increase or decrease this value, set the VLM_WINDOW_SIZE environment variable to the new size in bytes. For example, to set the VLM_WINDOW_SIZE to 256 MB, run the following command:
The value that you specify for the VLM_WINDOW_SIZE environment variable must be a multiple of 64 KB.
Red Hat Enterprise Linux 3 Only: VL M Window Size
To accommodate the VLM window size, you must increase the default maximum size of the per-proce ss locked memory. To increase it, add the following lines to the /etc/security/limits.conf file, where oracle is the user that administers the database:
If you use ssh to log in to the system, then add the following line to the /etc/ssh/sshd_config file to enable the default values to be used when an ssh session is started:
C.2 Using hugetlbfs on SUSE Linux Enterprise Server 9 or Red Hat Enterprise Linux 4
To enable Oracle Database to use large pages (sometimes called huge pages) on SUSE Linux Enterprise Server 9, or Red Hat Enterprise Linux 4, set the value of the vm.nr_hugepages kernel parameter to specify the number of large pages that you want to reserve. You must specify a sufficient number of large pages to hold the entire SGA for the database instance. To determine the required parameter value, divide the SGA size for the instance by the size of a large page, then round up the result to the nearest integer.
To determine the default large page size, run the following command:
For example, if /proc/meminfo lists the large page size as 2 MB, and the total SGA size for the instance is 1.6 GB, then set the value for the vm.nr_hugepages kernel parameter to 820 (1.6 GB / 2 MB = 819.2).
C.3 Using hugetlbfs on Red Hat Enterprise Linux AS 3
Linux on POWER is not supported on Red Hat Linux AS 3.
To use large pages on Red Hat Enterprise Linux AS 3:
Determine the memory required for the large page pool.
To determine this value, convert the size of the SGA of the instance to megabytes, and round up by 4 MB. For example, if the SGA is 2.7 GB, then the appropriate value is 2768 MB.
Depending on the type of your boot loader, perform one of the following procedures:
Add the hugepages option to the appropriate image section in the /etc/lilo.conf file, specifying the number of pages:
Restart the system.
Add the hugepages option to the kernel command in the /etc/grub.conf file, specifying the number of pages as follows:
Restart the system.
Add or edit the following entry in the /etc/sysctl.conf file, specifying the large page pool size in megabytes:
Run the following command to set the kernel parameter values:
To verify that this amount of memory was moved successfully into the large page pool, run the following command:
The lines at the end of the display show how many memory pages were moved into the large page pool.
Start Oracle Database.
C.4 Increasing SGA Address Space
This section applies to Linux x86 only.
Depending on your distribution of Linux, apply the instructions in one of the following sections to increase the SGA address space:
SUSE Linux Enterprise Server 9
To increase the SGA address space on SUSE Linux Enterprise Server 9:
Log in as the oracle user.
In the $ORACLE_HOME/rdbms/lib directory, run the following commands:
If Oracle Database does not start after completing this procedure, or if there are run-time memory errors, then increase the hexadecimal number specified in the first command. For example, if the 0x15000000 value prevents Oracle Database from starting, then specify the value 0x20000000. Lowering this value increases the SGA address space, but could decrease the PGA address space.
Run the following command to determine the process ID of the oracle user’s shell process:
The number returned is the process ID.
Run the following command to switch user to root :
Run the following commands to change the mapped base setting for the oracle user’s shell process, where pid is the process ID identified in step 3:
Run the exit command to return to the oracle user’s shell process, and start Oracle Listener and Oracle Database.
All Oracle processes must get this modified mapped base value. Starting the listener from the shell that has the modified mapped base enables client connections to connect properly.
Red Hat Enterprise Linux AS 3
To increase the SGA address space on Red Hat Enterprise Linux AS 3 or 4:
Log in as the oracle user.
In the $ORACLE_HOME/rdbms/lib directory, run the following commands:
Start Oracle Database.
C.5 Asynchronous I/O Support
On Linux, Automatic Storage Management uses asynchronous I/O by default. Asynchronous I/O is not supported for database files stored on NFS file systems.
Oracle Database supports kernel asynchronous I/O. This feature is disabled by default.
By default, the DISK_ASYNCH_IO initialization parameter in the parameter file is set to TRUE to enable asynchronous I/O on raw devices. To enable asynchronous I/O on file system files:
Ensure that all Oracle Database files are located on file systems that support asynchronous I/O.
Set the FILESYSTEMIO_OPTIONS initialization parameter in the parameter file to one of the following values:
Linux Distribution | Recommended Value |
---|---|
SUSE Linux Enterprise Server 9 | SETALL |
Other distributions | ASYNCH |
C.6 Direct I/O Support
Direct I/O support is available and supported on Red Hat Enterprise Linux 3 and SUSE Linux Enterprise Server 9.
To use direct I/O on Red Hat Enterprise Linux 3, the driver that you use must support vary I/O.
On Linux on POWER, you can use direct I/O on Red Hat Linux 4.
To enable direct I/O support:
Set the FILESYSTEMIO_OPTIONS initialization parameter to DIRECTIO .
If you are using the asynchronous I/O option, then set the FILESYSTEMIO_OPTIONS initialization parameter to SETALL .
C.7 semtimedop Support
semtimedop is not supported on Linux on POWER.
On Red Hat Enterprise Linux 3 and SUSE Linux Enterprise Server 9, Oracle Database supports the semtimedop() system call (semaphores with a time limitation). To enable support for the feature, run the following command as the oracle user in the $ORACLE_HOME/rdbms/lib directory:
To disable semtimedop() support, run the following command as the oracle user in the $ORACLE_HOME/rdbms/lib directory:
C.8 High-Speed Network Support
This section applies to Linux x86 only.
Oracle Net supports Sockets Direct protocol (SDP) over the InfiniBand network architecture on Red Hat Enterprise Linux AS 3 for Oracle Database 10 g release 1. For this release, SDP support is limited to synchronous I/O only. For information about support for using asynchronous I/O on SDP, refer to the following document:
Do not set the Oracle Net NET_ASYNC_IO and SDP_ASYNC_IO configuration parameters, unless otherwise stated in this document.
C.9 Simultaneous Multithreading (SMT)
If Simultaneous Multithreading (SMT) is enabled, the v$osstat view reports 2 additional rows corresponding to the online logical ( NUM_LCPUS ) and virtual cpus ( NUM_VCPUS ).
Источник
Часть 2. Как установить Oracle Database 11g Release 2 RAC на Linux используя VirtualBox – поднимаем кластер
Все идет к тому, что я все таки запущу Oracle Real Application Clusters у себя на ноуте.
Я продолжаю мучатся и ставить на него абсолютно не подъемное Enterprise решение — RAC.
Так же у меня появилось желание проверить отказоустойчивость данного решения под нагрузкой.
После того, как все это заработает конечно…
После окончания установки, я планирую отключить работающий под нагрузкой Oracle node — буду использовать популярный в быту метод «power off».
А так как мой хороший друг в Oracle, как раз занимается разработкой системы восстановления и сохранения данных в случае падения, то я ожидаю, что на следующей неделе у нас с ним состоится серьезный разговор…
Часть 2 перевода, на мой взгляд, уже не чересчур подробной статьи.
Официальный источник: lab128.com
Спасибо автору за проделанную работу.
P.S.Посмотрим, запустится ли все это?
Часть 1
Oracle Clusterware установка.
Установка необходимых пакетов.
Все действия в данном разделе должны выполняться суперпользователем.
Запуск автоматической настройки, установит пакет «oracle-rdbms-server-11gR2-preinstall» Этот пакет выполнит все необходимые установки, включая изменение ядра, необходимых параметров и создаст учетную запись Linux Oracle:
# yum install oracle-rdbms-server-11gR2-preinstall
Примечание.
Возможно, вы не сможете скопировать и вставить эту команду. Так что вам придется ввести её вручную. Мы собираемся исправить, путем установки Дополнения гостевой ОС. На данный момент просто введите эти команды в ручную.
# yum install oracleasm
# yum install oracleasm-support
Настройте ASMLib, выполнив эту команду и ответьте на вопросы как в примере ниже:
# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets (‘[]’). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: oinstall
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
#
Установить дополнения для гостевой ОС
Дополнения гостевой ОС не являются обязательными, но настоятельно рекомендуются. Дополнения гостевой ОС позволяют лучше интегрировать поддержку мыши и двунаправленного буфера копирования. Другой важной особенностью является поддержка общих папок, что делает файлы в основой ОС-хосте видимыми гостевой ОС. Все остальное, в этом документе предполагает, что Дополнения гостевой ОС установлены.
Для того чтобы установить Дополнения гостевой ОС, перезагрузите только что созданную VM, войдите как root. Затем в окне меню выберите Devices | Install Guest Additions. Пройдите через загрузку до появления DVD Autorun экрана:
Нажмите «OK», затем «Run», чтобы начать установку.
Примечание.
Установка может жаловаться на отсутствие «kernel-uek-develт» за который отвечает программа «yum». Выполните эту команду. Вот почему нам необходим доступ в Интернет. Также установите другой пакет: «yum install gcc». Затем снова Guest Additions, дважды щелкнув на VBOXADDITIONS DVD значок на рабочем столе и нажать «Open Autorun Prompt» кнопку.
Перезагрузите машину.
Теперь вы должны быть гораздо счастливее от работы с VirtualBox!
Часть 2
Oracle Clusterware установка.
Установка необходимых пакетов.
Создайте директорию, в которую будет установлено программное обеспечение Oracle .
mkdir -p /u01
chown -R oracle:oinstall /u01
chmod -R 775 /u01/
Добавить Oracle учетную запись в dba и vboxsf группу. Группа vboxsf был создана гостевым расширением VirtualBox и позволит Oracle пользователям иметь доступ в гостевую ОС-хост:
# usermod -G dba,vboxsf oracle
Сбросьте пароль пользователя Oracle в «oracle»:
# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
#
Отключить Secure Linux путем редактирования «/etc/selinux/config» файла, убедитесь, что SELINUX флаг установлен следующим образом:
SELINUX=disabled
Либо настройте NTP, или убедитесь, что она она отключена. Таким образом, время Oracle Cluster Service (ctssd) может синхронизировать со временем RAC узла. В этом случае нужно отключить NTP.
# service ntpd stop
Shutting down ntpd: [FAILED]
# chkconfig ntpd off
# mv /etc/ntp.conf /etc/ntp.conf.orig
# rm /var/run/ntpd.pid
Очистите YAM репозитарий:
# yum clean all
Проверьте использование дискового пространства, сейчас используется около 2.8 GB:
# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_rac1-lv_root
14493616 2865472 10891888 21% /
tmpfs 1027556 272 1027284 1% /dev/shm
/dev/sda1 495844 77056 393188 17% /boot
#
Настройка сети
Все действия в данном разделе должны выполняться суперпользователем.
Ниже TCP приведен пример адресов, используемых в государственных и частных сетях. Если вам нужно использовать другой адрес, внесите соответствующие коррективы и помните, что все должно остаться согласованным с всеми изменениями в остальной части статьи.
Пожалуйста, обратите внимание, что подсеть 192.168.56.0 является конфигурацией по умолчанию и используется VirtualBox в качестве только принимающей сети, соединяющей ОС-хост и виртуальные машины.
В VirtualBox также работает DHCP-сервер в этой подсети, резервируя диапазон адресов 100-254. Так что остались свободными для использования адреса ниже 100 для статических IP.
Вы можете проверить эти настройки: Main menu | File | Preferences | Network, а затем проверить свойства Host-only сети. Мы используем эту подсеть для RAC общедоступной сети.
Измените файл «/etc/hosts», добавив следующую информацию:
# Private
192.168.10.1 rac1-priv.localdomain rac1-priv
192.168.10.2 rac2-priv.localdomain rac2-priv
# Public
192.168.56.71 rac1.localdomain rac1
192.168.56.72 rac2.localdomain rac2
# Virtual
192.168.56.81 rac1-vip.localdomain rac1-vip
192.168.56.82 rac2-vip.localdomain rac2-vip
# SCAN
192.168.56.91 rac-scan.localdomain rac-scan
192.168.56.92 rac-scan.localdomain rac-scan
192.168.56.93 rac-scan.localdomain rac-scan
Примечание.
SCAN адреса не должны быть определены в файле hosts. Вместо этого должна быть определена DNS зона, около 3 адресов в той же подсети, что и общие IP-адреса. Для этой установки, мы пойдем на компромисс и используем hosts файл. Если вы используете DNS, то закомментируйте линии SCAN-адресов.
Откройте инструмент Network Connections: Linux desktop Main menu | System | Preferences | Network Connections. Выберите «System eth0» интерфейс, который будет использоваться для общественных сетей, и нажмите кнопку «Edit»:
Убедитесь, что «Connect automatically» выбрано. В «IPv6 Settings», убедитесь, что Method имеет значение «Ignore». Выберите «Settings IPv4» на вкладке, изменение Method «Manual», нажмите кнопку «Add» и заполнить Address: 192.168.56.71, Netmask: 255.255.255.0, Gateway: 0.0.0.0. Нажмите кнопку «Apply», вот и все:
В окне Network Connections выберите пункт «System eth1» интерфейс, он будет использован для частной сети, нажмите кнопку «Edit». Затем установите флажок «Connect automatically». В «IPv6 Settings», убедитесь, что метод имеет значение «Ignore». Выберите «Settings IPv4» на вкладке, изменение Method «Manual», нажмите кнопку «Add» и заполнить Address: 192.168.10.1, Netmask: 255.255.255.0, Gateway: 0.0.0.0. Нажмите кнопку «Apply», вот и все:
Отключить брандмауэр: Linux Main menu | System | Administration | Firewall. Нажмите на иконку «Disable», а затем «Apply»
Загружаем файлы Oracle установки
Есть два варианта как установить Oracle:
1. Загрузка или копирование файлов в VM и распаковка их в VM;
2. Загрузка и распаковка в ОС-хост, затем сделать папки доступными для VM файловой системы;
Очевидно, что второй вариант намного лучше, потому что он не использует виртуальный диск гостевой VM и приведет к меньшему финальному образу диска. Также установочные файлы могут быть легко использован в другой установке. В этом разделе мы собираемся установить VirtualBox Shared Folders.
Предполагается, что вы уже скачали файлы Oracle установки, и для разархивирования их в «grid» и «database» папки. В нашем примере эти папки находятся в «C:\TEMP\oracle_sw» папке.
C:\TEMP\oracle_sw>dir -l
total 0
drwx——+ 1 Domain Users 0 Aug 5 18:10 database
drwx——+ 1 Domain Users 0 Aug 5 03:08 grid
Завершите работу виртуальной машины. В диспетчере VirtualBox нажмите на кнопку «Shared Folders» ссылку в правой панели. Добавьте общую папку, нажав значок «plus». Затем выберите путь к папке программного обеспечения Oracle, и установите оба флажка «Read-only» и «Auto-mount»:
Нажмите «OK», чтобы сохранить настройки. Сейчас Shared Folders должна выглядеть следующим образом:
Перезагрузите виртуальную машину и войдите в систему как пользователь Oracle . Перейдите в каталог «/media/sf_oracle_sw» — это папка в которой VirtualBox хранит информацию об общих папках ОС хоста. Обратите внимание, что VirtualBox добавляет приставка «sf_» к именам папок. «ls» Список содержит папки:
$ cd /media/sf_oracle_sw
$ ls
database grid
$
Источник