You are on page 1of 5

How to install ASMLib on CentOS 7.

2 | Pierre blog

Pierre blog
Pierre Forstmann Oracle Database blog

All posts
OT: Explaining 1st International
Obfuscated C Code Contest
(1984) anonymous.c (C est lavie)
February 15, 2016
How to install ASMLib on

How to install ASMLib on CentOS7.2


The purpose of this blog post is to show that you can install ASMLib on CentOS 7.2
although CentOS 7 is not supported by Oracle Corp.
Disclaimer: This configuration is not supported by Oracle Corp. Use it at your own
risks.

CentOS7.2
January 13, 2016
How I Simplified Oracle Database
12.1.0.2 Installation on CentOS
7.2 with Oracle
PreinstallationRPM
January 7,
2016
Oracle Database Client 12.1.0.2
silent installation onWindows
December 18, 2015
Creating a DBCA template for an
Oracle 12.1.0.2 container
database without any
databaseoption
November 25,
2015
Scripting DBCA to create an Oracle
12.1.0.2 container database
without any databaseoption
November 11, 2015
Trying to raise Oracle Live SQL
database hood
October 14,
2015
How to install Oracle RAC 12.1.0.2
Standard Edition 2 (SE2) in silent
mode on Oracle Linux 6.7 with
VirtualBox Part2
September 16,
2015
How to install Oracle RAC 12.1.0.2
Standard Edition 2 (SE2) in silent
mode on Oracle Linux 6.7 with
VirtualBox Part1
September 14,
2015
How to install Oracle 12.1.0.2
Standard Edition 2 (SE2) and to
create a SE2 database in
silentmode
September 1, 2015
Oracle RAC standby 12.1.0.2
database switchover (without Data
GuardBroker)
August 18, 2015
Create RAC physical standby
database with Oracle RAC

For this installation I have used following documents:


Red Hat Oracle ASMLib Availability and Support
OTN Oracle ASMLib Downloads for Red Hat Enterprise Linux 7.

Short version
You only need to run following commands on your Centos 7.2 machine (assuming
your machine is connected to Internet and its yum configuration is OK):
# yum -y install kmod-oracleasm
# wget http://download.oracle.com/otn_software/asmlib/oracleasmlib2.0.12-1.el7.x86_64.rpm
# yum -y localinstall oracleasmlib-2.0.12-1.el7.x86_64.rpm
# wget
http://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracleasmsupport-2.1.8-3.el7.x86_64.rpm
# yum -y localinstall oracleasm-support-2.1.8-3.el7.x86_64.rpm

Long version
Linux VirtualBox (VBOX) configuration
I have first created 2 virtual disks (first disk as system disk and second disk as ASM
disk):
vboxmanage
format=VDI
vboxmanage
format=VDI

createhd --filename co7tosa0.sata.0.vdi --size=40960 --variant fixe


createhd --filename co7tosa0.sata.1.vdi --size=12040 --variant fixe

I have created a 5.0.4 VBOX virtual machine with following commands:


vboxmanage createvm --name co7tosa0 --basefolder "M:\VirtualBox VMs" -register
vboxmanage modifyvm co7tosa0 --ostype Linux --memory 2048 --nic1 nat -nic2 hostonly
vboxmanage modifyvm co7tosa0 --nictype1 82540EM
vboxmanage modifyvm co7tosa0 --nictype2 82540EM
vboxmanage modifyvm co7tosa0 --hostonlyadapter2 "VirtualBox Host-Only
Ethernet Adapter"
vboxmanage modifyvm co7tosa0 --ostype "RedHat_64"
vboxmanage storagectl co7tosa0 --add ide --name IDE --controller PIIX4
vboxmanage modifyvm co7tosa0 --vram 12
vboxmanage storagectl co7tosa0 --add sata --name SATA --portcount 4
vboxmanage storageattach co7tosa0 --storagectl SATA --port 0 --type hdd -medium co7tosa0.sata.0.vdi
vboxmanage storageattach co7tosa0 --storagectl SATA --port 1 --type hdd -medium co7tosa0.sata.1.vdi
vboxmanage storageattach co7tosa0 --storagectl IDE --device 0 --port 0 -type dvddrive --medium j:\free_media\CentOS-7-x86_64-Minimal.iso

I have installed CentOS 7.2 the same way like in my previous blog post.

12.1.0.2 and RMAN


activeduplication
July 20, 2015
Oracle Client 12.1.0.2 silent
installations on OracleLinux
June
29, 2015
Under the hood of
apex.oracle.comdatabase
May
26, 2015
How to install Oracle RAC 12.1.0.2
in silent mode on Oracle Linux 7.1
with VirtualBox Part2
April 20,
2015
How to install Oracle RAC 12.1.0.2
in silent mode on Oracle Linux 7.1
with VirtualBox Part1
April 8,

ASMLib packages installation


I have checked operating system version:

Follow

# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
# cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)

Follow Pierre blog

I have installed wget:

Get every new post delivered to


# yum -y install wget
Loaded plugins: fastestmirror
your Inbox.
Loading mirror speeds from cached hostfile
* base: mirrors.ircam.fr
Join 25 other followers
* extras: centos.mirror.fr.planethoster.net
* updates: fr2.rpmfind.net
Resolving Dependencies
--> Running transaction check
Enter your email address
---> Package wget.x86_64 0:1.14-10.el7_0.1 will be installed
--> Finished Dependency Resolution

2015
Schema as a service with definer

Dependencies Resolved

rights PL/SQLpackage
March 24,

Package
Arch
Version
Repository
Size
Build a website with WordPress.com
======================================================================================================

2015
How to rename an Oracle schema

Sign me up
======================================================================================================

without exporting and importing all

Installing:
wget
base

schemadata
February 27, 2015
How I Simplified Oracle Database

Transaction Summary
======================================================================================================

12c Installations on Oracle Linux 7

Install

with Oracle PreinstallationRPM


January 31, 2015

Total download size: 545 k


Installed size: 2.0 M
Downloading packages:

x86_64
545 k

1 Package

https://pierreforstmanndotcom.wordpress.com/2016/01/13/how-to-install-asmlib-on-centos-7-2/[25/02/2016 14:23:15]

1.14-10.el7_0.1

How to install ASMLib on CentOS 7.2 | Pierre blog

October 31, 2014

wget-1.14-10.el7_0.1.x86_64.rp FAILED
http://mirror.ate.info/ftp.centos.org/7.2.1511/os/x86_64/Packages/wget1.14-10.el7_0.1.x86_64.rpm: [Errno 12] Timeout on
http://mirror.ate.info/ftp.centos.org/7.2.1511/os/x86_64/Packages/wget1.14-10.el7_0.1.x86_64.rpm: (28, 'Connection timed out after 30001
milliseconds')
Trying other mirror.
warning: /var/cache/yum/x86_64/7/base/packages/wget-1.1410.el7_0.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5:
NOKEY
Public key for wget-1.14-10.el7_0.1.x86_64.rpm is not installed
wget-1.14-10.el7_0.1.x86_64.rpm
| 545 kB 00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
Userid
: "CentOS-7 Key (CentOS 7 Official Signing Key) "
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package
: centos-release-7-2.1511.el7.centos.2.10.x86_64 (@anaconda)
From
: /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : wget-1.14-10.el7_0.1.x86_64
1/1
Verifying : wget-1.14-10.el7_0.1.x86_64
1/1

How to install Grid Infrastructure


12.1.0.2 on Windows 2012 in

Installed:
wget.x86_64 0:1.14-10.el7_0.1

How to install ASMLib on Oracle


Linux 7 with Unbreakable
Enterprise Kernel(UEK)
January
20, 2015
Configuring Data Guard Broker
with Oracle Database12.1.0.2
December 30, 2014
Create a physical standby
database with Oracle 12.1.0.2 and
RMAN activeduplication
November 28, 2014
How to install Oracle Database
12.1.0.2 and to create databases
in silent mode on Windows2012

(almost) full silentmode


October
27, 2014
How to clone a single instance
database to a RACdatabase
October 25, 2014
How to move or rename
OracleHome
September 30, 2014
On installing Oracle Database
onUNIX
September 29, 2014
Upgrading Grid Infrastructure from
12.1.0.1 to 12.1.0.2 for a 2-node

Complete!

kmod-oracleasm is in the Centos yum repository: I have installed it with yum:


# yum -y install kmod-oracleasm
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.ircam.fr
* extras: centos.mirror.fr.planethoster.net
* updates: fr2.rpmfind.net
Resolving Dependencies
--> Running transaction check
---> Package kmod-oracleasm.x86_64 0:2.0.8-15.el7.centos will be
installed
--> Finished Dependency Resolution
Dependencies Resolved

RAC cluster in silentmode


August

======================================================================================================

26, 2014
Upgrading single instance Oracle

Package
Arch
Version
Repository
Size
======================================================================================================

database from 12.1.0.1 to12.1.0.2

August 19, 2014

Installing:
kmod-oracleasm
base

Upgrading Oracle Grid

x86_64

2.0.8-15.el7.centos

35 k

Infrastructure for a standalone

Transaction Summary
======================================================================================================

server (Oracle Restart) from

Install

12.1.0.1 to 12.1.0.2 in silentmode

Total download size: 35 k


Installed size: 123 k
Downloading packages:
kmod-oracleasm-2.0.8-15.el7.centos.x86_64.rpm
| 35 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : kmod-oracleasm-2.0.8-15.el7.centos.x86_64
1/1
Verifying : kmod-oracleasm-2.0.8-15.el7.centos.x86_64
1/1

August 8, 2014
How to install Oracle Database
12.1.0.2 and create a 12.1.0.2
database in silentmode
July 22,
2014
A long story
July 21, 2014
How to add a node to a 12c RAC
cluster in silentmode
July 5, 2014
Install a 12.1 single node RAC

1 Package

Installed:
kmod-oracleasm.x86_64 0:2.0.8-15.el7.centos

cluster in silentmode
June 30,
2014
Using RMAN active duplication to

Complete!

move a 12c database to another

# wget http://download.oracle.com/otn_software/asmlib/oracleasmlib2.0.12-1.el7.x86_64.rpm
--2016-01-12 20:01:28-http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.121.el7.x86_64.rpm
Resolving download.oracle.com (download.oracle.com)... 23.10.251.16,
23.10.251.67
Connecting to download.oracle.com
(download.oracle.com)|23.10.251.16|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19360 (19K) [application/x-redhat-package-manager]
Saving to: oracleasmlib-2.0.12-1.el7.x86_64.rpm

filesystem
May 28, 2014
How to test distributed transaction
with Oracle 12c
pluggabledatabases
April 25,
2014
How DBCA is using DB_NAME,
INSTANCE_NAME and
DB_UNIQUE_NAME for a
RACdatabase
March 18, 2014

I have downloaded oracleasmlib from OTN:

100%[==================================================================>]
19,360
--.-K/s
in 0.02s
2016-01-12 20:01:28 (1.14 MB/s) - oracleasmlib-2.0.12-1.el7.x86_64.rpm
saved [19360/19360]

Identify empty datafiles without


usingDBA_EXTENTS
February 3,
2014
How to install Oracle Database
12.1 and create a database in
silent mode onWindows
December 27, 2013
How to test OCI row prefetch count
in Java with oraaccess.xml in

I have installed it with yum:


# yum -y localinstall oracleasmlib-2.0.12-1.el7.x86_64.rpm
Loaded plugins: fastestmirror
Examining oracleasmlib-2.0.12-1.el7.x86_64.rpm: oracleasmlib-2.0.121.el7.x86_64
Marking oracleasmlib-2.0.12-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracleasmlib.x86_64 0:2.0.12-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved

Oracle12.1
August 29, 2013

======================================================================================================

Does ASM use OS system calls for


I/O requests?
August 17, 2013

Package
Arch
Version
Repository
Size
======================================================================================================

How to trace system calls in an


Oracleprocess
August 16, 2013

Installing:
oracleasmlib
2.0.12-1.el7.x86_64

How to install ASMLib on Oracle

x86_64

2.0.12-1.el7

/oracleasmlib-

39 k

Linux6
August 15, 2013

Transaction Summary
======================================================================================================

How to install Oracle Client 12.1 on

Install

Windows in silentmode
July 29,

Total size: 39 k
Installed size: 39 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded

2013
How to install Oracle RAC 12.1 and
to create a RAC 12.1 database in

1 Package

https://pierreforstmanndotcom.wordpress.com/2016/01/13/how-to-install-asmlib-on-centos-7-2/[25/02/2016 14:23:15]

How to install ASMLib on CentOS 7.2 | Pierre blog

silentmode
July 14, 2013
How to install Grid Infrastructure
12.1 in silentmode
July 11, 2013
How to create a 12.1 database in
silentmode
June 27, 2013
How to install Oracle 12.1 in
silentmode
June 27, 2013

Archives
Select Month
Select
Month

Blog Stats
105,937 hits

Running transaction
Installing : oracleasmlib-2.0.12-1.el7.x86_64
1/1
Verifying : oracleasmlib-2.0.12-1.el7.x86_64
1/1
Installed:
oracleasmlib.x86_64 0:2.0.12-1.el7
Complete!

I have downloaded oracleasm-support using OTN link:


# wget
http://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracleasmsupport-2.1.8-3.el7.x86_64.rpm
--2016-01-12 20:02:03-http://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracleasmsupport-2.1.8-3.el7.x86_64.rpm
Resolving yum.oracle.com (yum.oracle.com)... 2.22.22.225, 2.22.22.218
Connecting to yum.oracle.com (yum.oracle.com)|2.22.22.225|:80...
connected.
HTTP request sent, awaiting response... 200 OK
Length: 80968 (79K) [application/x-rpm]
Saving to: oracleasm-support-2.1.8-3.el7.x86_64.rpm
100%[======================================>] 80,968
0.2s

ClustrMap

328KB/s

in

2016-01-12 21:02:03 (328 KB/s) - oracleasm-support-2.1.83.el7.x86_64.rpm saved [80968/80968]

I have installed it with:


# yum -y localinstall oracleasm-support-2.1.8-3.el7.x86_64.rpm
Loaded plugins: fastestmirror
Examining oracleasm-support-2.1.8-3.el7.x86_64.rpm: oracleasm-support2.1.8-3.el7.x86_64
Marking oracleasm-support-2.1.8-3.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracleasm-support.x86_64 0:2.1.8-3.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================
Package
Arch
Version
Repository
Size
======================================================================================================
Installing:
oracleasm-support
2.1.8-3.el7.x86_64

x86_64
242 k

2.1.8-3.el7

/oracleasm-support-

Transaction Summary
======================================================================================================
Install

1 Package

Total size: 242 k


Installed size: 242 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : oracleasm-support-2.1.8-3.el7.x86_64
1/1
Note: Forwarding request to 'systemctl enable oracleasm.service'.
Created symlink from /etc/systemd/system/multiuser.target.wants/oracleasm.service to
/usr/lib/systemd/system/oracleasm.service.
Verifying : oracleasm-support-2.1.8-3.el7.x86_64
1/1
Installed:
oracleasm-support.x86_64 0:2.1.8-3.el7
Complete!

I have created oracle user account and related groups because they must own the
ASM devices:
# groupadd --gid 54321 oinstall
# groupadd --gid 54322 dba
# useradd --uid 54321 --gid 54321 --groups 54322 oracle
# id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba)

ASMLib configuration
I have created a single disk partition in ASM device disk:
# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xe7333a6d.
Command (m for help): n
Partition type:
p
primary (0 primary, 0 extended, 4 free)
e
extended
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-24657919, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-24657919, default 24657919):
Using default value 24657919
Partition 1 of type Linux and of size 11.8 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

I have configured ASMLib and created an ASM disk with oracleasm command:
# 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 []: dba

https://pierreforstmanndotcom.wordpress.com/2016/01/13/how-to-install-asmlib-on-centos-7-2/[25/02/2016 14:23:15]

How to install ASMLib on CentOS 7.2 | Pierre blog


Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
# 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 createdisk ASM1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
# oracleasm querydisk /dev/sdb1
Device "/dev/sdb1" is marked an ASM disk with the label "ASM1"

I have rebooted to check ASM disk device persistence:


# oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted:
# oracleasm listdisks
ASM1
# ls -al /dev/oracleasm/disks
total 0
drwxr-xr-x. 1 root
root
0 Jan 12
drwxr-xr-x. 4 root
root
0 Jan 12
brw-rw----. 1 oracle dba 8, 17 Jan 12

yes

20:52 .
20:52 ..
20:52 ASM1

As expected the ASM device is persistent.


Note also that there is a systemd service named oracleasm created for oracleasm
Linux kernel module:
# systemctl status oracleasm
oracleasm.service - Load oracleasm Modules
Loaded: loaded (/usr/lib/systemd/system/oracleasm.service; enabled;
vendor preset: disabled)
Active: active (exited) since Tue 2016-01-12 20:52:29 CET; 51s ago
Process: 609 ExecStart=/usr/sbin/service oracleasm start_sysctl
(code=exited, status=0/SUCCESS)
Main PID: 609 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/oracleasm.service
Jan 12 20:52:26 co7tosa0.localdomain systemd[1]: Starting Load oracleasm
Mod....
Jan 12 20:52:27 co7tosa0.localdomain service[609]: Initializing the
Oracle AS...
Jan 12 20:52:29 co7tosa0.localdomain service[609]: Scanning the system
for Or...
Jan 12 20:52:29 co7tosa0.localdomain systemd[1]: Started Load oracleasm
Modules.
Hint: Some lines were ellipsized, use -l to show in full.

Share this:

Twitter

Facebook

Google


Like
Be the first to like this.

Related

How to install ASMLib on


Oracle Linux 6
In "11g"

How I Simplified Oracle


Database 12.1.0.2
Installation on CentOS
7.2 with Oracle
Preinstallation RPM
In "12c"

How I Simplified Oracle


Database 12c
Installations on Oracle
Linux 7 with Oracle
Preinstallation RPM
In "12c"

By pforstmann, on January 13, 2016 at 7:12 pm, under Uncategorized. 4 Comments


Post a comment or leave a trackback: Trackback URL.

How I Simplified Oracle Database 12.1.0.2 Installation on CentOS 7.2 with Oracle
PreinstallationRPM
OT: Explaining 1st International Obfuscated C Code Contest (1984) anonymous.c (C
est lavie)
Comments

https://pierreforstmanndotcom.wordpress.com/2016/01/13/how-to-install-asmlib-on-centos-7-2/[25/02/2016 14:23:15]

How to install ASMLib on CentOS 7.2 | Pierre blog

FredOn February 13, 2016 at 9:44 pm

Permalink | Reply

Thank you for this tutorial. Just done it on CentOS Linux release 7.2.1511.
However, I created 2 disks (one for DATA, one for LOG).

The only difference for me : command oracleasm init returned nothing for me

pforstmannOn February 14, 2016 at 8:35 am

Permalink | Reply

You can check /var/log/oracleasm for possible errors.

However if running oracleasm status and oracleasm listdisks are OK installation


should be OK.

FredOn February 17, 2016 at 2:01 pm

Permalink | Reply

Yep I did the installation again and everything ran smoothlyI am facing another
problem now trying to install Grid (cf patch 18370031). I am currently on holidays
and I dont have access to my MOS account. Can you please download this patch
(18370031, about 170mo) and me a access to itca serait formidable
merci
pforstmannOn February 17, 2016 at 5:21 pm

Glad that it works bette now..

But I cannot download any patch from MOS for you. Sorry.

Leave a Reply

Enter your comment here...

Create a free website or blog at WordPress.com.


|
The NotesIL Theme.

https://pierreforstmanndotcom.wordpress.com/2016/01/13/how-to-install-asmlib-on-centos-7-2/[25/02/2016 14:23:15]

Permalink | Reply