Oracle ASMLib
Oracle ASMLib is an optional software component that can be used in
configurations utilizing Oracle ASM on Linux. ASMLib allows an Oracle Database
using ASM more efficient and capable access to the disk groups it is using.
Purpose of Oracle ASMLib
- Persistent Device Naming
- Linux does not guarantee persistent device naming w/o further mechanisms
- Note: ASM would be able to find its disks by scanning the device header, so a changed device name wouldn‘t be a problem. But you would still have to configure the correct ownership and permissions for the device file for ASM to be able to work with this device
- Correct ownership and permissions for the ASM devices
- Before Oracle 10gR2 the limited number of raw devices supported by the
kernel could become a problem (Kernel 2.4: 256 devices, Kernel 2.6: 8192
devices); but starting with 10gR2 Oracle ASM is able to use block devices
directly (w/o raw emulation)
- With ASMLib the disks are correctly released after having dropped a
disk group (with block devices you must clean them (with dd))
Availability of Oracle ASMLib
Oracle ASMLib is only available for Linux; as a kernel module is needed only the supported Linux distributions, the required RPM packages are downloadable from OTN.
For RHEL6, Oracle will only provide ASMLib software and updates when configured with a kernel distributed by Oracle. Oracle will not provide ASMLib packages for kernels distributed by Red Hat as part of RHEL6. ASMLib updates will be delivered via Unbreakable Linux Network(ULN) which is available to customers with Oracle Linux support.
Installation and configuration
First we have to install
the needed rpms, The three RPM packages are installing with the standard rpm
command:
·
oracleasm-support-xxxxxxx.rpm: Utilities used to get the ASM driver up and
running
·
oracleasmlib- xxxxxxx.rpm : Actual ASM library
·
oracleasm- xxxxxxx.rpm : Kernel driver for the ASM library
Note: When using the “Unbreakable Enterprise Kernel” from Oracle, the kernel driver is already included in the Kernel.
Usage of oracleasm command:
# oracleasm -h
Usage: oracleasm [--exec-path=<exec_path>]
<command> [ <args> ]
oracleasm --exec-path
oracleasm -h
oracleasm –V
The basic oracleasm commands are:
configure Configure
the Oracle Linux ASMLib driver
init Load and
initialize the ASMLib driver
exit Stop the
ASMLib driver
scandisks Scan the
system for Oracle ASMLib disks
status Display
the status of the Oracle ASMLib driver
listdisks List known
Oracle ASMLib disks
querydisk Determine
if a disk belongs to Oracle ASMlib
createdisk Allocate a
device for Oracle ASMLib use
deletedisk Return a
device to the operating system
renamedisk Change the
label of an Oracle ASMlib disk
update-driver Download the latest ASMLib driver
Initial configuration
The initial
configuration is being started with the command “oracleasm configure”:
# 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 []: oracle
Default group to own the driver interface []: dba
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
Usually is the user
“oracle” the owner of the driver interface, but in case of privilege separation
the owner can be the grid user; the same applies to the group (here “dba”). In
most configurations it makes sense to have the driver interface automatically
started at system boot and also to scan for ASM(Lib) disk devices at startup.
Oracleasm processes need
to be started manually if no reboot takes place after the installation:
# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm
Disk creation
(labelling), the device needs to be partitioned :
# oracleasm createdisk DATA1 /dev/sdc1
Writing disk header: done
Instantiating disk: done
The device is now
configured and can be listed:
# oracleasm listdisks
DATA1
In a RAC you would have
to scan for the devices on the other nodes:
# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
# oracleasm listdisks
DATA1
You can check if a disk
is in use with ASM(Lib):
# oracleasm querydisk /dev/sdc1
Device "/dev/sdc1" is marked an ASM disk with the
label "DATA1"
No comments:
Post a Comment