安装一个oracleASM磁盘管理的单实例,要求:使用新建vg逻辑卷放置数据库软件,部署过程忽略,主要总结一些安装过程中出现的问题
问题1.使用pvcreate和pvdisplay等命令时提示无法发现命令
[root@oracle yum.repos.d]# pvcreate /dev/sdb
-bash: pvcreate: command not found
[root@oracle yum.repos.d]#
[root@oracle yum.repos.d]#
[root@oracle yum.repos.d]# yum -y install pvcreate
Loaded plugins: ulninfo
No package pvcreate available.
Error: Nothing to do
解决方法:
pvcreate命令是LVM(Logical Volume Manager)的一部分,它用于创建物理卷。如果系统上没有安装LVM工具集,那么就会找不到pvcreate命令。所以可以通过运行`sudo apt-get install lvm2`(针对Debian/Ubuntu发行版)或者`sudo yum install lvm2`(针对Red Hat/CentOS发行版)来安装LVM工具集。
问题2.使用asmlib来配置ASM磁盘的时候在创建磁盘时提示磁盘未挂载
[root@oracle ~]# oracleasm createdisk DATA1 /dev/sdc1
oracleasm module not loaded or /dev/oracleasm not mounted.
解决方法:
手动挂载oracleasm模块
oracleasm status
Checking if ASM is loaded: no
Checking if /dev/oracleasm is mounted: no#oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm#oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
问题3.安装gi软件时提示包pdksh-5.2.14未安装,rpm安装时提示
[root@oracle ~]# rpm -ivh oracle11g_pdksh-5.2.14-30.x86_64.rpm
warning: oracle11g_pdksh-5.2.14-30.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 73307de6: NOKEY
error: Failed dependencies:
pdksh conflicts with (installed) ksh-20120801-142.0.1.el7.x86_64
解决方法:(忽略掉也可以)
[root@oracle ~]# rpm -e ksh-20120801-142.0.1.el7.x86_64
[root@oracle ~]# rpm -ivh oracle11g_pdksh-5.2.14-30.x86_64.rpm
warning: oracle11g_pdksh-5.2.14-30.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 73307de6: NOKEY
Preparing... ################################# [100%]
file /usr/bin/ksh conflicts between attempted installs of pdksh-5.2.14-30.x86_64 and pdksh-5.2.14-30.x86_64
[root@oracle ~]#
问题4.成功执行/u01/app/oraInventory/orainstRoot.sh,/u01/app/11.2.0.4/grid/root.sh脚本后,因为是单实例安装,所以还需要执行/u01/app/11.2.0.4/grid/perl/bin/perl -I/u01/app/11.2.0.4/grid/perl/lib -I/u01/app/11.2.0.4/grid/crs/install /u01/app/11.2.0.4/grid/crs/ins tall/roothas.pl然后报错提示ohas服务启动失败
[root@oracle ~]# /u01/app/11.2.0.4/grid/perl/bin/perl -I/u01/app/11.2.0.4/grid/perl/lib -I/u01/app/11.2.0.4/grid/crs/install /u01/app/11.2.0.4/grid/crs/install/roothas.pl
Using configuration parameter file: /u01/app/11.2.0.4/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node oracle successfully pinned.
Adding Clusterware entries to inittab
ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow:
2024-07-16 05:29:26.507:
[client(24248)]CRS-2101:The OLR was formatted using version 3.
2024-07-16 05:29:27.001:
[client(24273)]CRS-1001:The OCR was formatted using version 3.ohasd failed to start at /u01/app/11.2.0.4/grid/crs/install/roothas.pl line 377, line 4.
解决方法:root用户创建服务文件并启动
# touch /usr/lib/systemd/system/ohas.service;
chmod 777 /usr/lib/systemd/system/ohas.service;# vi /usr/lib/systemd/system/ohas.service
[Unit]
Description=Oracle High Availability Services
After=syslog.target[Service]
ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
Restart=always[Install]
WantedBy=multi-user.target启动服务
# systemctl daemon-reload;
systemctl enable ohas.service;
systemctl start ohas.service;
systemctl status ohas.service;
问题5.ohas服务起来之后我就执行下一步asmca建立磁盘,但是create ASM 时提示:ASM diskgroup create failed CRS-2613: Could not find resource 'ora.cssd'
解决方法:deconfig之前的脚本重新执行
/u01/app/11.2.0.4/grid/crs/install/roothas.pl -deconfig -force -verbose
/u01/app/11.2.0.4/grid/root.sh
cd /u01/app/11.2.0.4/grid/crs/install
/u01/app/11.2.0.4/grid/perl/bin/perl -I/u01/app/11.2.0.4/grid/perl/lib -I/u01/app/11.2.0.4/grid/crs/install /u01/app/11.2.0.4/grid/crs/install/roothas.pl
重新进入grid用户执行asmca命令,成功!!!
问题6.安装数据库软件的时候会报错:Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0.4/db_1/sysman/lib/ins_emagent.mk'. See '/u01/app/oraInventory/logs/installActions2024-07-16_08-28-15AM.log' for details.
解决方法:
Oracle用户下:
cd $ORACLE_HOME/sysman/lib
cp ins_emagent.mk ins_emagent.mk.bak
vi ins_emagent.mk命令模式下进行查找:
/NMECTL
再将$(MK_EMAGENT_NMECTL)修改为: $(MK_EMAGENT_NMECTL) -lnnz11
问题7.dbca建库的时候使用ASM存储管理的时候报错如图,选择存储类型为ASM的步骤,出现选择数据文件存放磁盘的ASM磁盘列表为空白
解决方法:
进入grid软件下的bin目录
#/u01/app/11.2.0.4/grid/bin查看目录下名为oracle文件的权限
# ll oracle-rwxr-x--x 1 grid oinstall 209840392 Jul 16 05:26 oracle
修改oracle文件权限
chmod +s oracle
修改过后的oracle文件权限
[# ll oracle-rwsr-s--x 1 grid oinstall 209840392 Jul 16 05:26 oracle
回退重新选择,ASM磁盘已找到
本次安装部署单实例+ASM管理存储的部署结束