Escolar Documentos
Profissional Documentos
Cultura Documentos
ASM ON LINUX
ASM ON LINUX
You can use any physical disk for Automatic Storage Management,
as long as it is partitioned.
ASM ON LINUX
Identify the device name for the disks that you want to use.
# /sbin/fdisk -l
Use either fdisk or parted to create a single whole-disk partition on the disk
devices that you want to use.
ASM ON LINUX
ASM ON LINUX
1. Raw Devices.
ASM ON LINUX
1. Raw Devices.
ASM ON LINUX
1. Raw Devices.
ASM ON LINUX
1. Raw Devices.
4) For the raw device that you created for ASM, set the owner,
group, and permissions on the device file:
ASM ON LINUX
1. Raw Devices.
ASM ON LINUX
2. Block Devices
ASM ON LINUX
2. Block Devices
ASM ON LINUX
2. Block Devices
3) For the block device that you created for ASM, set the owner,
group, and permissions on the device file:
ASM ON LINUX
2. Block Devices
ASM ON LINUX
2. Block Devices
3. ASMLIB
INTRODUCTION
http://oss.oracle.com/
ASMLIB
BENEFITS
The main ASMLIB functions are grouped into three collections of
functions:
Device discovery functions must be implemented in any ASMLIB.
Discover strings usually contains a prefix identifying which ASMLIB
this discover string is intended for. For the Linux ASMLIB provided
by Oracle, the prefix is ORCL:*.
Note.394959.1 Device Persistence and Oracle Linux ASMLib
ASMLIB
oracleasm-support-2.0.3-1.i386.rpm
oracleasmlib-2.0.2-1.i386.rpm
oracleasm-2.6.9-42.0.3.EL-2.0.3-1.i686.rpm
ASMLIB
# /etc/init.d/oracleasm configure
ASMLIB
# /etc/init.d/oracleasm createdisk
# /etc/init.d/oracleasm scandisks
ASMLIB
ASM_DISKSTRING='ORCL:*'
On 10gR2 and onwards if the disks are not discovered using the
string ORCL:*, the alternative option is using
/dev/oracleasm/disks. This could be set in parameter
asm_diskstring or using this path in the DDL statement when
creating a diskgroup or adding a disk. This is only a temporary
workaround until you fix the discovery issue and it does not
pretend to be final solution since with this action you are
bypassing the ASMLIB API.
ASMLIB
ASMLIB
ASMLIB
ASMLIB Configuration
ASMLIB
3. Install the proper packages for your platform. For example, if you
are using Red Hat Enterprise Linux AS 3.0 enterprise kernel,
enter a command similar to the following:
# rpm -i oracleasm-support-1.0.0-1.i386.rpm \
oracleasm-2.4.9-e-enterprise-1.0.0-1.i386.rpm \
oracleasmlib-1.0.0-1.i386.rpm
# /etc/init.d/oracleasm configure
ASMLIB
The UID of the driver owner. This will be the UID for the
Oracle user.
The GID of the driver group. This will be the GID for the dba
group.
Whether the ASMLIB driver should be loaded at startup. The
corrects answer is YES.
ASMLIB
ASMLIB
This will install the support tools, the library, and the kernel driver for
the currently running kernel.
ASMLIB
1. If necessary, install the shared disks that you intend to use for the
diskgroup and restart the system.
2. To identify the device name for the disks that you want to use,
enter the following command:
#/sbin/fdisk -l
ASMLIB
ASMLIB
3. Using fdisk, create a single whole-disk partition on the device that you
want to use.
4. Mark a disk as an ASM disk:
# /etc/init.d/oracleasm createdisk DISK1 /dev/hda7
In this example, DISK1 is the tag or name that you want to assign to the
disk.
5. On RAC, to make the disk available on other cluster nodes, enter the
following command as root on each node:
# /etc/init.d/oracleasm scandisks
This command identifies all the shared disks attached to the node that
are marked as ASM disks.
ASMLIB
ASMLIB
ASMLIB
ASMLIB Configuration
(Example Installation)
ASMLIB
ASMLIB Configuration
ASMLIB
ASMLIB Configuration
ASMLIB
ASMLIB Configuration
ASMLIB
ASMLIB Configuration
ASMLIB
ASMLIB Configuration
ASMLIB
ASMLIB Upgrade
ASMLIB
ASMLIB
1) Disk should not be mapped thru raw devices, ASM cannot see the
disk twice.
# raw /dev/raw/raw12 0 0
# raw /dev/raw/raw13 0 0
2) Remove it from /etc/sysconfig/rawdevices
3) Set: asm_diskstring='ORCL:*
instead of: asm_diskstring=/dev/raw/*
4) Shutdown the ASM instance (Very important!).
5) Label the disk thru the oracleasm command:
# /etc/init.d/oracleasm force-renamedisk /dev/hda18 DISK1
# /etc/init.d/oracleasm force-renamedisk /dev/hda22 DISK2
ASMLIB
ASMLIB
ASMLIB
Access the source code repository for this project in one of the
following ways:
http://oss.oracle.com/projects/oracleasm/source.html
ASMLIB
Troubleshooting
# df -ha
# lsmod
# cat /proc/filesystems
# /etc/init.d/oracleasm configure
$> cat /etc/*release
$> uname -a
# rpm -qa |grep oracleasm
$> ls -l /dev/oracleasm/disks
SQL> alter system set asm_diskstring = ORCL:* scope=both;
$> /usr/sbin/oracleasm-discover
$> kfod asm_diskstring='ORCL:*' disks=all
$> kfed read /dev/oracleasm/disks/VOl1
ASMLIB
Troubleshooting
ASMLIB
Troubleshooting
ASMLIB
Troubleshooting
ASMLIB
Troubleshooting
ASMLIB
Troubleshooting
ASMLIB
Troubleshooting
ASMLIB
Troubleshooting
ASMLIB
Troubleshooting
ASMLIB
Troubleshooting
ASMLIB
References
=)> http://www.oracle.com/technology/tech/linux/asmlib/index.html
=)> http://asm.us.oracle.com/
=)> Note.313387.1 How to know Which Disks Are Handled by ASMLib Kernel
Driver?
Author: Esteban Bernal (Storage Team) 56
ASMLIB
References
=)> Note.461718.1 How To Install ASMLIB API via the Unbreakable Linux
Network
=)> http://oss.oracle.com/projects/oracleasm-support/
=)> http://oss.oracle.com/projects/oracleasm/