2020-12-23 乐帮网
oracle
下面开始安装Oracle ASM,一些较老的教程上说需要安装oracleasmlib,不过现在在Oracle Linux7上不需要这一步了,可以参见:http://www.oracle.com/technetwork/topics/linux/asmlib/index-101839.html
The Oracle ASMLib kernel driver is now included in the Unbreakable Enterprise Kernel. No driver package needs to be installed when using this kernel. The oracleasm-support and oracleasmlib packages still need to be installed from ULN.
下面只需要在节点1上进行安装和配置
(1)安装oracleasm-support
[root@localhost ~]# rpm -qa |grep asm
[root@localhost ~]# yum install oracleasm-support
ol7_UEKR3 | 1.2 kB 00:00:00
ol7_latest | 1.4 kB 00:00:00
(1/5): ol7_UEKR3/x86_64/updateinfo | 85 kB 00:00:01
(2/5): ol7_latest/x86_64/group | 681 kB 00:00:02
(3/5): ol7_latest/x86_64/updateinfo | 1.6 MB 00:00:02
(4/5): ol7_UEKR3/x86_64/primary | 29 MB 00:00:22
(5/5): ol7_latest/x86_64/primary | 31 MB 00:00:30
ol7_UEKR3 696/696
ol7_latest 23517/23517
Resolving Dependencies
--> Running transaction check
---> Package oracleasm-support.x86_64 0:2.1.8-3.1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================
Package Arch Version Repository Size
======================================================================================================================
Installing:
oracleasm-support x86_64 2.1.8-3.1.el7 ol7_latest 79 k
Transaction Summary
======================================================================================================================
Install 1 Package
Total download size: 79 k
Installed size: 243 k
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7Server/ol7_latest/packages/oracleasm-support-2.1.8-3.1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Public key for oracleasm-support-2.1.8-3.1.el7.x86_64.rpm is not installed
oracleasm-support-2.1.8-3.1.el7.x86_64.rpm | 79 kB 00:00:01
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Importing GPG key 0xEC551F03:
Userid : "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>"
Fingerprint: 4214 4123 fecf c55b 9086 313d 72f9 7b74 ec55 1f03
Package : 7:oraclelinux-release-7.0-1.0.3.el7.x86_64 (@anaconda/7.0)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : oracleasm-support-2.1.8-3.1.el7.x86_64 1/1
Note: Forwarding request to 'systemctl enable oracleasm.service'.
ln -s '/usr/lib/systemd/system/oracleasm.service' '/etc/systemd/system/multi-user.target.wants/oracleasm.service'
Verifying : oracleasm-support-2.1.8-3.1.el7.x86_64 1/1
Installed:
oracleasm-support.x86_64 0:2.1.8-3.1.el7
Complete!
(2)安装kmod-oracleasm
[root@e7node1 dev]# yum install kmod-oracleasm
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package kmod-oracleasm.x86_64 0:2.0.8-19.0.1.el7 will be installed
--> Processing Dependency: kernel >= 3.10.0-685.el7 for package: kmod-oracleasm-2.0.8-19.0.1.el7.x86_64
--> Running transaction check
---> Package kernel.x86_64 0:3.10.0-693.11.1.el7 will be installed
--> Processing Dependency: dracut >= 033-502 for package: kernel-3.10.0-693.11.1.el7.x86_64
--> Processing Dependency: linux-firmware >= 20170606-55 for package: kernel-3.10.0-693.11.1.el7.x86_64
--> Running transaction check
---> Package dracut.x86_64 0:033-161.el7 will be updated
--> Processing Dependency: dracut = 033-161.el7 for package: dracut-network-033-161.el7.x86_64
--> Processing Dependency: dracut = 033-161.el7 for package: dracut-config-rescue-033-161.el7.x86_64
---> Package dracut.x86_64 0:033-502.0.1.el7 will be an update
--> Processing Dependency: systemd >= 219 for package: dracut-033-502.0.1.el7.x86_64
---> Package libertas-sd8686-firmware.noarch 0:20140213-0.3.git4164c23.0.1.el7 will be obsoleted
---> Package libertas-sd8787-firmware.noarch 0:20140213-0.3.git4164c23.0.1.el7 will be obsoleted
---> Package libertas-usb8388-firmware.noarch 2:20140213-0.3.git4164c23.0.1.el7 will be obsoleted
---> Package linux-firmware.noarch 0:20140213-0.3.git4164c23.0.1.el7 will be updated
---> Package linux-firmware.noarch 0:20171128-57.git17e62881.0.2.el7 will be obsoleting
--> Running transaction check
---> Package dracut-config-rescue.x86_64 0:033-161.el7 will be updated
---> Package dracut-config-rescue.x86_64 0:033-502.0.1.el7 will be an update
---> Package dracut-network.x86_64 0:033-161.el7 will be updated
---> Package dracut-network.x86_64 0:033-502.0.1.el7 will be an update
---> Package systemd.x86_64 0:208-11.0.1.el7 will be updated
--> Processing Dependency: systemd = 208-11.0.1.el7 for package: systemd-sysv-208-11.0.1.el7.x86_64
--> Processing Dependency: systemd = 208-11.0.1.el7 for package: libgudev1-208-11.0.1.el7.x86_64
--> Processing Dependency: systemd = 208-11.0.1.el7 for package: systemd-python-208-11.0.1.el7.x86_64
---> Package systemd.x86_64 0:219-42.0.2.el7_4.4 will be an update
--> Processing Dependency: systemd-libs = 219-42.0.2.el7_4.4 for package: systemd-219-42.0.2.el7_4.4.x86_64
--> Processing Dependency: kmod >= 18-4 for package: systemd-219-42.0.2.el7_4.4.x86_64
--> Running transaction check
---> Package kmod.x86_64 0:14-9.el7 will be updated
---> Package kmod.x86_64 0:20-15.0.1.el7_4.6 will be an update
---> Package libgudev1.x86_64 0:208-11.0.1.el7 will be updated
---> Package libgudev1.x86_64 0:219-42.0.2.el7_4.4 will be an update
--> Processing Dependency: glib2 >= 2.42 for package: libgudev1-219-42.0.2.el7_4.4.x86_64
---> Package systemd-libs.x86_64 0:208-11.0.1.el7 will be updated
---> Package systemd-libs.x86_64 0:219-42.0.2.el7_4.4 will be an update
---> Package systemd-python.x86_64 0:208-11.0.1.el7 will be updated
---> Package systemd-python.x86_64 0:219-42.0.2.el7_4.4 will be an update
---> Package systemd-sysv.x86_64 0:208-11.0.1.el7 will be updated
---> Package systemd-sysv.x86_64 0:219-42.0.2.el7_4.4 will be an update
--> Running transaction check
---> Package glib2.x86_64 0:2.36.3-5.el7 will be updated
---> Package glib2.x86_64 0:2.50.3-3.el7 will be an update
--> Processing Conflict: kernel-3.10.0-693.11.1.el7.x86_64 conflicts kexec-tools < 2.0.14-3
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package kexec-tools.x86_64 0:2.0.4-32.0.2.el7 will be updated
---> Package kexec-tools.x86_64 0:2.0.14-17.2.0.1.el7_4 will be an update
--> Processing Conflict: kernel-3.10.0-693.11.1.el7.x86_64 conflicts xfsprogs < 4.3.0
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package xfsprogs.x86_64 0:3.2.0-0.10.alpha2.0.2.el7 will be updated
---> Package xfsprogs.x86_64 0:4.5.0-12.0.1.el7 will be an update
--> Processing Conflict: systemd-219-42.0.2.el7_4.4.x86_64 conflicts initscripts < 9.49.28-1
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package initscripts.x86_64 0:9.49.17-1.0.1.el7 will be updated
---> Package initscripts.x86_64 0:9.49.39-1.0.1.el7 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================================================================================================
Installing:
kernel x86_64 3.10.0-693.11.1.el7 ol7_latest 43 M
kmod-oracleasm x86_64 2.0.8-19.0.1.el7 ol7_latest 278 k
linux-firmware noarch 20171128-57.git17e62881.0.2.el7 ol7_latest 44 M
replacing libertas-sd8686-firmware.noarch 20140213-0.3.git4164c23.0.1.el7
replacing libertas-sd8787-firmware.noarch 20140213-0.3.git4164c23.0.1.el7
replacing libertas-usb8388-firmware.noarch 2:20140213-0.3.git4164c23.0.1.el7
Updating:
initscripts x86_64 9.49.39-1.0.1.el7 ol7_latest 435 k
kexec-tools x86_64 2.0.14-17.2.0.1.el7_4 ol7_latest 332 k
xfsprogs x86_64 4.5.0-12.0.1.el7 ol7_latest 894 k
Updating for dependencies:
dracut x86_64 033-502.0.1.el7 ol7_latest 322 k
dracut-config-rescue x86_64 033-502.0.1.el7 ol7_latest 56 k
dracut-network x86_64 033-502.0.1.el7 ol7_latest 98 k
glib2 x86_64 2.50.3-3.el7 ol7_latest 2.3 M
kmod x86_64 20-15.0.1.el7_4.6 ol7_latest 120 k
libgudev1 x86_64 219-42.0.2.el7_4.4 ol7_latest 83 k
systemd x86_64 219-42.0.2.el7_4.4 ol7_latest 5.2 M
systemd-libs x86_64 219-42.0.2.el7_4.4 ol7_latest 376 k
systemd-python x86_64 219-42.0.2.el7_4.4 ol7_latest 116 k
systemd-sysv x86_64 219-42.0.2.el7_4.4 ol7_latest 70 k
Transaction Summary
=========================================================================================================================================================================================================
Install 3 Packages
Upgrade 3 Packages (+10 Dependent packages)
Total size: 97 M
Total download size: 278 k
Is this ok [y/d/N]: y
Downloading packages:
kmod-oracleasm-2.0.8-19.0.1.el7.x86_64.rpm | 278 kB 00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : systemd-libs-219-42.0.2.el7_4.4.x86_64 1/33
Updating : systemd-219-42.0.2.el7_4.4.x86_64 2/33
Updating : kmod-20-15.0.1.el7_4.6.x86_64 3/33
Updating : dracut-033-502.0.1.el7.x86_64 4/33
Updating : glib2-2.50.3-3.el7.x86_64 5/33
Updating : initscripts-9.49.39-1.0.1.el7.x86_64 6/33
warning: /etc/sysctl.conf created as /etc/sysctl.conf.rpmnew
Updating : dracut-network-033-502.0.1.el7.x86_64 7/33
Installing : linux-firmware-20171128-57.git17e62881.0.2.el7.noarch 8/33
Installing : kernel-3.10.0-693.11.1.el7.x86_64 9/33
Installing : kmod-oracleasm-2.0.8-19.0.1.el7.x86_64 10/33
Updating : kexec-tools-2.0.14-17.2.0.1.el7_4.x86_64 11/33
Updating : libgudev1-219-42.0.2.el7_4.4.x86_64 12/33
Updating : dracut-config-rescue-033-502.0.1.el7.x86_64 13/33
Updating : systemd-sysv-219-42.0.2.el7_4.4.x86_64 14/33
Updating : systemd-python-219-42.0.2.el7_4.4.x86_64 15/33
Updating : xfsprogs-4.5.0-12.0.1.el7.x86_64 16/33
Cleanup : systemd-sysv-208-11.0.1.el7.x86_64 17/33
Cleanup : dracut-config-rescue-033-161.el7.x86_64 18/33
Cleanup : libgudev1-208-11.0.1.el7.x86_64 19/33
Cleanup : kexec-tools-2.0.4-32.0.2.el7.x86_64 20/33
Cleanup : initscripts-9.49.17-1.0.1.el7.x86_64 21/33
Cleanup : systemd-python-208-11.0.1.el7.x86_64 22/33
Cleanup : dracut-network-033-161.el7.x86_64 23/33
Erasing : libertas-sd8787-firmware-20140213-0.3.git4164c23.0.1.el7.noarch 24/33
Erasing : libertas-sd8686-firmware-20140213-0.3.git4164c23.0.1.el7.noarch 25/33
Erasing : 2:libertas-usb8388-firmware-20140213-0.3.git4164c23.0.1.el7.noarch 26/33
Cleanup : linux-firmware-20140213-0.3.git4164c23.0.1.el7.noarch 27/33
Cleanup : dracut-033-161.el7.x86_64 28/33
Cleanup : systemd-208-11.0.1.el7.x86_64 29/33
Cleanup : kmod-14-9.el7.x86_64 30/33
Cleanup : systemd-libs-208-11.0.1.el7.x86_64 31/33
Cleanup : glib2-2.36.3-5.el7.x86_64 32/33
Cleanup : xfsprogs-3.2.0-0.10.alpha2.0.2.el7.x86_64 33/33
Verifying : dracut-config-rescue-033-502.0.1.el7.x86_64 1/33
Verifying : kernel-3.10.0-693.11.1.el7.x86_64 2/33
Verifying : xfsprogs-4.5.0-12.0.1.el7.x86_64 3/33
Verifying : systemd-sysv-219-42.0.2.el7_4.4.x86_64 4/33
Verifying : dracut-network-033-502.0.1.el7.x86_64 5/33
Verifying : systemd-python-219-42.0.2.el7_4.4.x86_64 6/33
Verifying : dracut-033-502.0.1.el7.x86_64 7/33
Verifying : initscripts-9.49.39-1.0.1.el7.x86_64 8/33
Verifying : linux-firmware-20171128-57.git17e62881.0.2.el7.noarch 9/33
Verifying : kmod-oracleasm-2.0.8-19.0.1.el7.x86_64 10/33
Verifying : kexec-tools-2.0.14-17.2.0.1.el7_4.x86_64 11/33
Verifying : systemd-libs-219-42.0.2.el7_4.4.x86_64 12/33
Verifying : glib2-2.50.3-3.el7.x86_64 13/33
Verifying : systemd-219-42.0.2.el7_4.4.x86_64 14/33
Verifying : kmod-20-15.0.1.el7_4.6.x86_64 15/33
Verifying : libgudev1-219-42.0.2.el7_4.4.x86_64 16/33
Verifying : libertas-sd8686-firmware-20140213-0.3.git4164c23.0.1.el7.noarch 17/33
Verifying : 2:libertas-usb8388-firmware-20140213-0.3.git4164c23.0.1.el7.noarch 18/33
Verifying : systemd-libs-208-11.0.1.el7.x86_64 19/33
Verifying : systemd-208-11.0.1.el7.x86_64 20/33
Verifying : dracut-config-rescue-033-161.el7.x86_64 21/33
Verifying : xfsprogs-3.2.0-0.10.alpha2.0.2.el7.x86_64 22/33
Verifying : initscripts-9.49.17-1.0.1.el7.x86_64 23/33
Verifying : kmod-14-9.el7.x86_64 24/33
Verifying : libgudev1-208-11.0.1.el7.x86_64 25/33
Verifying : kexec-tools-2.0.4-32.0.2.el7.x86_64 26/33
Verifying : dracut-033-161.el7.x86_64 27/33
Verifying : systemd-sysv-208-11.0.1.el7.x86_64 28/33
Verifying : linux-firmware-20140213-0.3.git4164c23.0.1.el7.noarch 29/33
Verifying : glib2-2.36.3-5.el7.x86_64 30/33
Verifying : libertas-sd8787-firmware-20140213-0.3.git4164c23.0.1.el7.noarch 31/33
Verifying : dracut-network-033-161.el7.x86_64 32/33
Verifying : systemd-python-208-11.0.1.el7.x86_64 33/33
Installed:
kernel.x86_64 0:3.10.0-693.11.1.el7 kmod-oracleasm.x86_64 0:2.0.8-19.0.1.el7 linux-firmware.noarch 0:20171128-57.git17e62881.0.2.el7
Updated:
initscripts.x86_64 0:9.49.39-1.0.1.el7 kexec-tools.x86_64 0:2.0.14-17.2.0.1.el7_4 xfsprogs.x86_64 0:4.5.0-12.0.1.el7
Dependency Updated:
dracut.x86_64 0:033-502.0.1.el7 dracut-config-rescue.x86_64 0:033-502.0.1.el7 dracut-network.x86_64 0:033-502.0.1.el7 glib2.x86_64 0:2.50.3-3.el7
kmod.x86_64 0:20-15.0.1.el7_4.6 libgudev1.x86_64 0:219-42.0.2.el7_4.4 systemd.x86_64 0:219-42.0.2.el7_4.4 systemd-libs.x86_64 0:219-42.0.2.el7_4.4
systemd-python.x86_64 0:219-42.0.2.el7_4.4 systemd-sysv.x86_64 0:219-42.0.2.el7_4.4
Replaced:
libertas-sd8686-firmware.noarch 0:20140213-0.3.git4164c23.0.1.el7 libertas-sd8787-firmware.noarch 0:20140213-0.3.git4164c23.0.1.el7 libertas-usb8388-firmware.noarch 2:20140213-0.3.git4164c23.0.1.el7
Complete!
(3)配置asm并启动
[root@e7node1 dev]# /usr/sbin/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 <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@e7node1 dev]# /usr/sbin/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
启动asm
[root@e7node1 init.d]# /etc/init.d/oracleasm start
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
查看asm状态
[root@e7node1 init.d]# oracleasm status
Checking if ASM is loaded: no
Checking if /dev/oracleasm is mounted: no
(4)挂载硬盘
[root@e7node1 dev]# cd /dev
[root@e7node1 dev]# ls sd*
sda sda1 sda2 sdb sdb1 sdc sdc1 sdd sdd1
[root@e7node1 dev]# /usr/sbin/oracleasm createdisk CRSVOL1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@e7node1 dev]# /usr/sbin/oracleasm createdisk CRSVOL2 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@e7node1 dev]# /usr/sbin/oracleasm createdisk CRSVOL3 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@e7node1 dev]# /usr/sbin/oracleasm listdisks
CRSVOL1
CRSVOL2
CRSVOL3
原创作品,禁止转载!
Oracle RAC 搭建系列目录:
Oracle RAC 集群搭建 Oracle Linux crs主机(二)
Oracle RAC 集群搭建 安装Oracle Grid前配置(四)
Oracle RAC 集群搭建 安装oracleasm(五)
关注我的微信公众号
在公众号里留言交流
投稿邮箱:1052839972@qq.com
庭院深深深几许?杨柳堆烟,帘幕无重数。
玉勒雕鞍游冶处,楼高不见章台路。
雨横风狂三月暮。门掩黄昏,无计留春住。
泪眼问花花不语,乱红飞过秋千去。
如果感觉对您有帮助
欢迎向作者提供捐赠
这将是创作的最大动力