10g ASM IMPLEMENTATION USING ASMLIB ON RHEL - 4.8 PDF

You might also like

You are on page 1of 51

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.

8)

ASM IMPLEMENTATION USING ASMLIB


This Tutorial was done on RHEL-AS (4.8) installed on VMWare for learning purpose.
ASM can be setup using the ASM Library Driver or RAW devices. For older Oracle database
and Red-Hat Enterprise Linux versions RAW devices are still a recommended option for ASM
and data files, and remain supported. RAW Partitions allow Oracle to bypass the OS cache.
ASM Feature Supports 2 different types of IO.

Standard UNIX IO and ASMLib IO

ASM WITH ASMLIB I/O

It creates all Oracle database files on RAW BLOCK DEVICES managed by ASM using ASMLib
calls. RAW devices are NOT required with this method as ASMLib works with block devices.
ASM WITH STANDARD UNIX I/O

This method creates all Oracle database files on RAW CHARACTER DEVICES managed by ASM using
Standard Linux I/O system calls. You will be required to create RAW devices for all disk
partitions used by ASM.
DESUPPORT OF RAW DEVICES

For Oracle 10g Release 2 in Red Hat Enterprise Linux 4 and 5 it is NOT recommended to use
raw devices but to use block devices instead. Raw I/O is still available in Red Hat
Enterprise Linux 4 and 5, but it is now a deprecated interface.
By default reading and writing to block devices are buffered I/Os. In fact, Raw I/O was
briefly deprecated by the Linux community, why because it has been replaced by the O_DIRECT
flag which can be used to open block devices to bypass the OS cache. So Oracle 10g R2 no
longer requires raw devices for the database. Oracle database 10g R2 automatically opens
all block devices such as SCSI disks using the O_DIRECT flag, thus bypasses the OS cache;
so starting with Oracle 10g under Linux, RAW devices support does NOT matter anymore.
Since Oracle uses the O_DIRECT kernel flag to open database files and thereby bypass file
caching so RAW driver is DEPRECATED does NOT mean removed; it means they suggest you

DO NOT USE it. The deprecation was because they intended to remove it at some future point
but never actually did.
As I said above In LINUX kernel, RAW devices were deprecated and scheduled for removal at
one point, because the O_DIRECT flag can be used instead. However, later the decision was
made to keep RAW devices support since some software cannot use the O_DIRECT flag. Support
for raw devices was reinstated in Red Hat Enterprise Linux 5.4 and later.
In this article, we are going to implement ASM using ASMLIB interface.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

WHAT IS ASMLIB ?

Oracle has developed a storage management interface called the ASMLIB API.
ASMLib is the support library for the ASM. Although ASMLib is NOT mandatory to run ASM.
ASMLIB allows an Oracle database using ASM more efficient and capable access to disk groups.
ASMLIB is an alternative interface for ASM to access block devices. ASM is STILL able to
access block devices without ASMLib, by simply using the block device drivers that have
always been supplied by the OS. On Linux, ASM is capable of referencing disks as raw devices
or by using the ASMLib software. Oracle ASMLIB is explained at Oracle Linux: Oracle ASMLib.

PURPOSE OF ASMLIB

The ASMLIB API provides 2 major feature enhancements over standard interfaces.
I/O processing To enable more efficient I/O.
Disk Discovery Provides more information about the storage attributes to the database.

Linux does NOT guarantee persistent device naming i.e. Linux may change the device names
on reboot. The name of the devices are assigned by the Linux and is determined by the scan
order of the bus. Therefore, the device names are not guaranteed to persist across reboots.
For example, SCSI device /dev/sdb can change to /dev/sda if the scan order of the controllers
is not configured.
But ASM would be able to find its disks by scanning the device header because ASMLib labels
the disks and ensures that ASM can see the same disk names when trying to mount a diskgroup.
But still you have to configure the correct ownership and permissions for the device file
for ASM to be able to work with this device. Device Persistence with Oracle Linux ASMLib.
When using ASMLib no need to create raw devices & to point the Disk discovery path to it.
SYSTEM CONFIGURATION

Operating System : Linux - RHEL(AS)-4.8


Kernel Version

: 2.6.9-89.ELsmp

Architecture

: 32 bit - (i686)

Database Version : 10g R2 10.2.0.5.0


DISPLAYS LINUX SYSTEM INFORMATION

# uname -a
Linux RAC-SERVER1 2.6.9-89.EL #1 Mon Apr 20 10:23:08 EDT 2009 i686 i686 i386 GNU/Linux
The 32 bit system will show i686 and i386 after the install date and time.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

DOWNLOAD ASMLIB RPMS FROM FOLLOWING URL

Oracle ASMLib is available for Linux; as a kernel module is needed only the supported Linux
distributions, the required RPM packages are downloadable from OTN. You need to pick exact
version that matches to your distribution based on kernel and architecture.

# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 8)
Oracle ASMLib Downloads for Red Hat Enterprise Linux 4 AS
http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel4-092650.html

There are 3 packages that one would normally install as part of ASM:
oracleasm + oracleasm-support + oracleasmlib

oracleasm (uname r) # Kernel Driver (Determines machine kernel version)


oracleasmlib

# ASM Libraries

oracleasm-support

# Support Scripts for the ASM driver up & running.

# uname r
2.6.9-89.EL
Drivers for kernel 2.6.9-89.EL
oracleasm-2.6.9-89.ELxenU-2.0.5-1.el4.i686.rpm
oracleasm-2.6.9-89.ELsmp-2.0.5-1.el4.i686.rpm
oracleasm-2.6.9-89.ELhugemem-2.0.5-1.el4.i686.rpm
oracleasm-2.6.9-89.EL-debuginfo-2.0.5-1.el4.i686.rpm
oracleasm-2.6.9-89.EL-2.0.5-1.el4.i686.rpm

All ASMLib installations require the oracleasmlib & oracleasm-support packages appropriate
for their machine. Library and Tools common for all.
# uname p i
i686 i386
Library and Tools
oracleasm-support-2.1.7-1.el4.i386.rpm
oracleasmlib-2.0.4-1.el4.i386.rpm

uname p

This command shows Processor Type , xxxx

uname i

This command shows Hardware Platform

Once you download above packages using ftp upload above all in Linux Server. You need #

(root) privilege to install all downloaded rpms.


Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

POINTS TO NOTE

The oracleasm-2.6 package is a kernel driver that ships for various different kind of Linux
kernels that existed under EL 4. But we only need the driver for the kernel we are using
and cannot install the driver for a kernel we do not have installed.
According to our uname output we have kernel 2.6.9-89.EL, not ELsmp.
Under EL 4, SMP is for multiple CPU support. But our kernel is single CPU.
We should only install the RPM for the kernel only. We are NOT running (the hugemem, smp
and xenU kernels) so we cannot install any of those.
We need only following 3 packages
oracleasmlib

oracleasmlib-2.0.4-1.el4.i386.rpm

oracleasm-support oracleasm-support-2.1.7-1.el4.i386.rpm
oracleasm kernel driver oracleasm-2.6.9-89.EL-2.0.5-1.el4.i686.rpm

DEVICE NAME BASED ON TYPE OF THE DISK

I am going to use SCSI Disks for ASM implementation.


DISK TYPE

DEVICE NAME FORMAT

DESCRIPTION

SCSI Disk

/dev/sdxn

In this example, x is a letter that identifies the


SCSI Disk and n is the partition number.
For example, /dev/sda is the first disk on the first
SCSI bus.

/dev/sd<x> SCSI Disk


/dev/sd<x><#> = (e.g /dev/sdb1)

STEPS TO CREATE +ASM INSTANCE

1. Add SCSI disk(s) to the Linux Server


2. Create required partitions on added SCSI disks.
3. Download and Install the appropriate ASM Library S/W.
4. Execute oracleasm init script with configure option.
5. Stamp/Label the partitions as ASM disks. Configure ENV files for asm & oracle.
6. Initiate cssd process as root user, run Oracle CSS script.
7. Create an +ASM Instance and Disk Groups using DBCA/MANUALLY.
8. Create a database with Automatic Storage Management.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

ADD REQUIRED DISK(S) TO THE LINUX SERVER

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

I have added 1st disk. Follow same procedure for other 5 disks. Each disk size is 10G and
all on different SCSI disk controller. Now you can create remaining all disks in the same
way as shown in figure above steps.

Above screenshot states we have added 6 Virtual disks for our ASM configuration. Once we
created required disks, then power on your Virtual machine just above left side of the
VMWARE WORK STATION and login as root # user.
# ls /dev/sd*
...
Since we added SCSI disk we can use /dev/sd* command. sda is our main disk where OS and
other apps are installed and sda1 to sda8 are its partitions. The following output from
'cat /proc/partitions' shows [sdb to sdg] are not partitioned yet.
# cat /proc/partitions
major minor

#blocks

name

85983232 sda

112423 sda1

32764567 sda2

22531162 sda3

1 sda4

10546641 sda5

6144831 sda6

3068383 sda7

10811713 sda8

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

16

10485760 sdb

32

10485760 sdc

48

10485760 sdd

64

10485760 sde

80

10485760 sdf

96

10485760 sdg

STEPS TO PARTITIONING DISKS

# fdisk -l |

grep ^Disk

Disk /dev/sdb doesn't contain a valid partition table


Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/sdd doesn't contain a valid partition table
Disk /dev/sde doesn't contain a valid partition table
Disk /dev/sdf doesn't contain a valid partition table
Disk /dev/sdg doesn't contain a valid partition table
Disk /dev/sda: 88.0 GB, 88046829568 bytes
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
Disk /dev/sdc: 10.7 GB, 10737418240 bytes
Disk /dev/sdd: 10.7 GB, 10737418240 bytes
Disk /dev/sde: 10.7 GB, 10737418240 bytes
Disk /dev/sdf: 10.7 GB, 10737418240 bytes
Disk /dev/sdg: 10.7 GB, 10737418240 bytes

6 disks (sdb to sdg) are the disks that Just I have added. ASMLib requires attached disks
to be partitioned. In this example, three 10Gg VMware virtual disks are to be used.
As of now no partitions, I would like to create at-least one partition one each disk. We
can create more than one partition on each disk and its possible to use each partition as
a different ASM disk.
Creating single partition on the whole device is really good because the reason is you have
one controller per disk in this case so as faster IO (If each disks are separated).
For production environment it is recommended to spread the data over different Physical
disks, to keep IO low for a Single disk. Just spreading data over different mount points
(on the same Physical disk) has no effect. At the end all IO gets to the same disk multiple
partitions on the same Physical spindle will NOT increase your I/O.

# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

The number of cylinders for this disk is set to 1305.


There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): m

<-----

help

Command action
a

toggle a bootable flag

edit bsd disklabel

toggle the dos compatibility flag

delete a partition

list known partition types

print this menu

add a new partition

create a new empty DOS partition table

print the partition table

quit without saving changes

create a new empty Sun disklabel

change a partition's system id

change display/entry units

verify the partition table

write table to disk and exit

extra functionality (experts only)

Command (m for help): p

<-----

Print Partition Table

Disk /dev/sdb: 10.7 GB, 10737418240 bytes


255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot

Start

Command (m for help): n

End
<-----

Blocks

Id

System

Add a new partition

Command action
e

extended

primary partition (1-4)

<-----

Primary Partition

Partition number (1-4): 1


First cylinder (1-1305, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305):
Using default value 1305

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Command (m for help): w

<-----

Write table to disk and exit

The partition table has been altered!


Calling ioctl() to re-read partition table.
Syncing disks.
Repeat the fdisk operation for all remaining disks in the same way as demonstrated above.
# fdisk /dev/sdb
# fdisk /dev/sdc
..
...
Once you created new partition using fdisk then you need to reboot LINUX based systems to
get partition recognized. The new table will be used at the next reboot. However you can
use partition table changes, by requesting that the operating system re-read the partition
table without reboot by partprobe command.

# fdisk -l | grep ^Disk


Disk /dev/sda: 107.3 GB, 107374182400 bytes
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
Disk /dev/sdc: 10.7 GB, 10737418240 bytes
Disk /dev/sdd: 10.7 GB, 10737418240 bytes
Disk /dev/sde: 10.7 GB, 10737418240 bytes
Disk /dev/sdf: 10.7 GB, 10737418240 bytes
Disk /dev/sdg: 10.7 GB, 10737418240 bytes
# partprobe /dev/sd[b-g]
# ls -l /dev/sd[b-g]1
brw-rw----

1 root disk 8, 17 Feb 15 22:47 /dev/sdb1

brw-rw----

1 root disk 8, 33 Feb 15 22:47 /dev/sdc1

brw-rw----

1 root disk 8, 49 Feb 15 22:47 /dev/sdd1

brw-rw----

1 root disk 8, 65 Feb 15 22:47 /dev/sde1

brw-rw----

1 root disk 8, 81 Feb 15 22:47 /dev/sdf1

brw-rw----

1 root disk 8, 97 Feb 15 22:47 /dev/sdg1

TO LIST ALL PARTITION TABLES

# fdisk -l /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg


Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot
/dev/sdb1

Start

End

Blocks

Id

System

1305

10482381

83

Linux

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

..
...
Disk /dev/sdg: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot

Start

End

Blocks

Id

System

1305

10482381

83

Linux

/dev/sdg1

Following output shows that i have one partition for every disk.
# cat /proc/partitions
major minor

#blocks

name

85983232 sda

112423 sda1

32764567 sda2

22531162 sda3

1 sda4

10546641 sda5

6144831 sda6

3068383 sda7

10811713 sda8

16

10485760 sdb

17

10482381 sdb1

32

10485760 sdc

33

10482381 sdc1

48

10485760 sdd

49

10482381 sdd1

64

10485760 sde

65

10482381 sde1

80

10485760 sdf

81

10482381 sdf1

96

10485760 sdg

97

10482381 sdg1

ASMLIB INSTALLATION

Install ASMLibs in following order to avoid package dependency errors make sure you are
logged in as root. Install using this command rpm -ivh package-name

i - Install

h - Hash to display

v Verbose

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Install ASMLibs in following order to avoid package dependency errors make sure you are
logged in as # (root) user.

oracleasm-support +

oracleasm + oracleasmlib

The oracleasm-support package provides the utilities used to get the ASM driver up and
running. The oracleasm kernel driver (for the kernel you use. The oracleasmlib package
provides the actual ASM library; which provides the ASM discover utility, is not GPL and
therefore a separate download and not included in the Linux OS release distribution

# rpm -Uvih oracleasm-support-2.1.7-1.el4.i386.rpm


warning: oracleasm-support-2.1.7-1.el4.i386.rpm: V3 DSA signature: NOKEY,
key ID b38a8516
Preparing...

########################################### [100%]

1:oracleasm-support

########################################### [100%]

# rpm -Uvih oracleasm-2.6.9-89.EL-2.0.5-1.el4.i686.rpm


warning: oracleasm-2.6.9-89.EL-2.0.5-1.el4.i686.rpm: V3 DSA signature: NOKEY, key ID
b38a8516
Preparing...

########################################### [100%]

1:oracleasm-2.6.9-89.EL

########################################### [100%]

# rpm -Uvih oracleasmlib-2.0.4-1.el4.i386.rpm


warning: oracleasmlib-2.0.4-1.el4.i386.rpm: V3 DSA signature: NOKEY, key ID b38a8516
Preparing...

########################################### [100%]

1:oracleasmlib

########################################### [100%]

LISTING INSTALLED ORACLEASM RPMS

# rpm -qa | grep oracleasm*


oracleasm-2.6.9-89.EL-debuginfo-2.0.5-1.el4
oracleasm-support-2.1.7-1.el4
oracleasm-2.6.9-89.EL-2.0.5-1.el4
oracleasmlib-2.0.4-1.el4
NOTE: Do NOT install a debuginfo RPM unless directed by support.

USAGE OF ORACLEASM COMMAND

# oracleasm -h
Usage: oracleasm [--exec-path=<exec_path>] <command> [ <args> ]
oracleasm --exec-path
oracleasm -h
oracleasm V

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

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

CONFIGURE THE ASM KERNEL MODULE.

You must be logged on as the # user to run the oracleasm script. The script calls a number
of library functions which are declared in /usr/lib/oracleasm/oracleasm.init.functions.
The /etc/init.d/oracleasm script has following options

# /etc/init.d/oracleasm
Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|
deletedisk|querydisk|listdisks|scandisks|status}
configure: Configure ASM.
start: Start the ASM service.
stop: Stop the ASM service.
status: Print the status of ASM service.
createdisk: Create an ASM disk.
scandisks: Search for ASM disks.
listdisks: List ASM disks.
querydisk: Query the current status of an ASM disk.
deletedisk: Delete an ASM disk.
restart: Restart the ASM service.
link: Load the oracleasm module.
enable: Enable the ASM service.
disable: Disable the ASM service.
ASM is initially configured on each host using /etc/init.d/oraclesam configure
# /etc/init.d/oracleasm configure
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

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

loaded on boot and what permissions it will have.


will be shown in brackets ('[]').

The current values

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
Initializing the Oracle ASMLib driver:

OK

Scanning the system for Oracle ASMLib disks:

OK

Initializing the Oracle ASMLib driver:

OK

Scanning the system for Oracle ASMLib disks:

OK

ENABLING ASM

# /etc/init.d/
# ./oracleasm enable
Writing Oracle ASM library driver configuration: done

Above command will load the ASM driver and mount the ASM driver. By selecting y during
the configuration, the system will always load the module and mount it on system boot.
DISKS FOR ASM USAGE

# EARLIER CREATED PARTITIONS


# ls -l /dev/sd[b-g]1
brw-rw----

1 root disk 8,

17 Feb 10 05:44 /dev/sdb1

brw-rw----

1 root disk 8,

33 Feb 10 05:44 /dev/sdc1

brw-rw----

1 root disk 8,

49 Feb 10 05:44 /dev/sdd1

brw-rw----

1 root disk 8,

65 Feb 10 05:44 /dev/sde1

brw-rw----

1 root disk 8,

81 Feb 10 05:44 /dev/sdf1

brw-rw----

1 root disk 8,

97 Feb 10 05:44 /dev/sdg1

STAMP OR LABELING DISKS

# cd /etc/init.d/
[root@RAC-SERVER1 init.d]# ./oracleasm createdisk VOL1 /dev/sdb1
Marking disk "VOL1" as an ASM disk:

OK

[root@RAC-SERVER1 init.d]# ./oracleasm createdisk VOL2 /dev/sdc1


Marking disk "VOL2" as an ASM disk:

OK

[root@RAC-SERVER1 init.d]# ./oracleasm createdisk VOL3 /dev/sdd1


Marking disk "VOL3" as an ASM disk:

OK

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

[root@RAC-SERVER1 init.d]# ./oracleasm createdisk VOL4 /dev/sde1


Marking disk "VOL4" as an ASM disk:

OK

[root@RAC-SERVER1 init.d]# ./oracleasm createdisk VOL5 /dev/sdf1


Marking disk "VOL5" as an ASM disk:

OK

[root@RAC-SERVER1 init.d]# ./oracleasm createdisk VOL6 /dev/sdg1


Marking disk "VOL6" as an ASM disk:

OK

LISTING AND QUERYING DISKS

# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
..
...
# /etc/init.d/oracleasm querydisk VOL1
Disk "VOL1" is a valid ASM disk
# /etc/init.d/oracleasm querydisk VOL2
Disk "VOL2" is a valid ASM disk
..
...
# ls -l /dev/oracleasm/disks/
total 0
brw-rw----

1 oracle dba 8, 17 Feb 16 19:40 VOL1

brw-rw----

1 oracle dba 8, 33 Feb 16 19:41 VOL2

brw-rw----

1 oracle dba 8, 49 Feb 16 19:41 VOL3

brw-rw----

1 oracle dba 8, 65 Feb 16 19:41 VOL4

brw-rw----

1 oracle dba 8, 81 Feb 16 19:41 VOL5

brw-rw----

1 oracle dba 8, 97 Feb 16 19:41 VOL6

We have done installation and configuration of ASMLib on Linux (RHEL 4.8)


CHECK IF CREATED DISKS ARE IN USE WITH ASMLIB

# oracleasm querydisk /dev/sd[b-g]1


Device "/dev/sdb1" is marked an ASM disk with the label "VOL1"
Device "/dev/sdc1" is marked an ASM disk with the label "VOL2"
Device "/dev/sdd1" is marked an ASM disk with the label "VOL3"
Device "/dev/sde1" is marked an ASM disk with the label "VOL4"
Device "/dev/sdf1" is marked an ASM disk with the label "VOL5"
Device "/dev/sdg1" is marked an ASM disk with the label "VOL6"

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

CONFIGURE ENVIRONMENT FILES

$ cat ora10.env
export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_home
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=orcl
$ cat asm.env
export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/asm_home
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=+ASM
START LISTENER

$ lsnrctl start listener_name


$ lsnrctl start listener
CREATE ASM INSTANCE

$ . ./asm.env
$ dbca

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

If the Oracle Cluster Synchronization Service (CSS) is not currently running, a warning
screen will be displayed. Follow the instructions and click the "OK" button. Once you've
returned to the previous screen, click the "Next" button again.

# /u02/app/oracle/product/10.2.0/db_home/bin/localconfig add
/etc/oracle does not exist. Creating it now.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized
Adding to inittab
Startup will be queued to init within 30 seconds.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Checking the status of new Oracle init process...


Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
devserver
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
Asking password for +ASM instance

Click ok on the confirmation screen

ASM Instance is created.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Click on Create New to create the Disk group

Enter Disk Group Name - and select required disks and click on OK.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Disk Group ASM_DG_DATA is created

Enter Disk Group Name - and select remaining disks and click on OK.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Disk Group ASM_DG_FRA is created

Disk group has been created and mounted.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Now I want to close DBCA (Click on NO)

BACKGROUP PROCESSES OF ASM INSTANCE

$ ps -ef | grep asm


oracle

1924

0 00:21 ?

00:00:00 asm_pmon_+ASM

oracle

1926

0 00:21 ?

00:00:00 asm_psp0_+ASM

oracle

1928

0 00:21 ?

00:00:00 asm_mman_+ASM

oracle

1930

0 00:21 ?

00:00:00 asm_dbw0_+ASM

oracle

1932

0 00:21 ?

00:00:00 asm_lgwr_+ASM

oracle

1934

0 00:21 ?

00:00:00 asm_ckpt_+ASM

oracle

1936

0 00:21 ?

00:00:00 asm_smon_+ASM

oracle

1938

0 00:21 ?

00:00:00 asm_rbal_+ASM

oracle

1940

0 00:21 ?

00:00:00 asm_gmon_+ASM

oracle

2100

1075

0 00:59 pts/2

00:00:00 grep asm

0 00:21 ?

00:00:00 asm_pmon_+ASM

0 01:57 pts/1

00:00:00 grep pmon

$ ps -ef | grep pmon


oracle

1924

oracle

2350 32469

$ ps -ef | grep css


root
oracle
oracle

1583

1852 1583

0 00:15 ?
0 00:15 ?

2354 32469

00:00:00 /bin/sh /etc/init.d/init.cssd run


00:00:02 /u02/app/oracle/product/10.2.0/db_home/bin/ocssd.bin

0 01:58 pts/1

00:00:00 grep css

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

REDUNDANCY
In our example, the "High" redundancy is used. So I choose 3 disks for ASM_DG_DATA disk group &
another 3 disks for ASM_DG_FRA disk group. By default, each disk is a failure group.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

POINTS TO NOTE

High redundancy means file extents are mirrored among 3 failure groups. When we go to normal
or high redundancy multiple fail groups and each group has to have at least one disk. The
level of redundancy cannot be change once a disk group has been created. ASM does not
mirror devices and provides file based redundancy only between failure groups.
HIGH REDUNDANCY = (STRIPPING & MIRRORING)

EXAMPLE FOR STRIPPING & MIRRORING

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

POINTS TO NOTE

A minimum of four LUNs (Oracle ASM disks) of equal size and performance is recommended for
each disk group. ASM is NOT RAID; it provides Stripping and Mirroring capabilities which
are similar to RAID 10.
RAID uses a fixed stripe size and mirrors data at the device block level. i.e. (RAID Stripes
at the block-level and doesnt aware of the different Oracle file types). ASM does not
behave exactly as RAID and it can be even smarter. It is aware of the different Oracle file
types so it can Stripe data differently.
Coarse Stripping for Data Files
Fine Stripping for Redo Log Files & Control Files

The Coarse-Grained Stripe size is always equal to AU SIZE. (AU_SIZE=1M)


The Fine-Grained Stripe size always equals to 128 KB.
ASM Stripes the data in small chunks of 128KB for lower I/O latency for small I/O operations
such as writing redo log entries to the redo log files (Fine-Grained Striping). For Data
Files for example, ASM will stripe the data in bigger chunks which are equal to the
Allocation Unit Size (Coarse-Grained Striping). Get more detail from here
LETS CREATE DATABASE

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

BACKGROUNP PROCESSES OF ASM INSTANCE

$ ps -ef | grep asm


oracle

20905

0 21:19 ?

00:00:00 asm_pmon_+ASM

oracle

20907

0 21:19 ?

00:00:00 asm_psp0_+ASM

oracle

20909

0 21:19 ?

00:00:00 asm_mman_+ASM

oracle

20911

0 21:19 ?

00:00:06 asm_dbw0_+ASM

oracle

20913

0 21:19 ?

00:00:00 asm_lgwr_+ASM

oracle

20915

0 21:19 ?

00:00:00 asm_ckpt_+ASM

oracle

20917

0 21:19 ?

00:00:00 asm_smon_+ASM

oracle

20919

0 21:19 ?

00:00:00 asm_rbal_+ASM

oracle

20921

0 21:19 ?

00:00:03 asm_gmon_+ASM

oracle

21578

0 21:35 ?

00:00:00 asm_o001_+ASM

oracle

21608

0 21:35 ?

00:00:00 ora_asmb_orcl

oracle

30710 20778

0 23:28 pts/1

00:00:00 grep asm

$ ps -ef | grep pmon


oracle

20905

0 21:19 ?

00:00:00 asm_pmon_+ASM

oracle

21580

0 21:35 ?

00:00:00 ora_pmon_orcl

oracle

30791 20778

0 23:31 pts/1

00:00:00 grep pmon

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

CONNECT RDBMS INSTANCE

. ./db10.env
ORACLE_SID = [orcl] ? orcl
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Feb 18 23:33:43 2016
Copyright (c) 1982, 2010, Oracle.

All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS> select name from v$datafile;
NAME
-------------------------------------------------------------------------------+ASM_DG_DATA/orcl/datafile/system.256.904166909
+ASM_DG_DATA/orcl/datafile/undotbs1.258.904166911
+ASM_DG_DATA/orcl/datafile/sysaux.257.904166909
+ASM_DG_DATA/orcl/datafile/users.259.904166911
+ASM_DG_DATA/orcl/datafile/example.265.904167107
SYS> select name from v$controlfile;
NAME
-------------------------------------------------------------------------------+ASM_DG_DATA/orcl/controlfile/current.260.904167019
+ASM_DG_FRA/orcl/controlfile/current.256.904167019
SYS> select member from v$logfile;
MEMBER
-------------------------------------------------------------------------------+ASM_DG_DATA/orcl/onlinelog/group_3.263.904167043
+ASM_DG_FRA/orcl/onlinelog/group_3.259.904167049
+ASM_DG_DATA/orcl/onlinelog/group_2.262.904167033
+ASM_DG_FRA/orcl/onlinelog/group_2.258.904167037
+ASM_DG_DATA/orcl/onlinelog/group_1.261.904167023
+ASM_DG_FRA/orcl/onlinelog/group_1.257.904167027
6 rows selected.
SYS> show parameter db_recovery_file_dest;
NAME

TYPE

VALUE

------------------------------------ ----------- -----------------------------db_recovery_file_dest

string

+ASM_DG_FRA

db_recovery_file_dest_size

big integer 2G

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

CONNECT ASM INSTANCE

$ . ./asm.env
ORACLE_SID = [orcl] ? +ASM
$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Feb 19 00:14:32 2016
Copyright (c) 1982, 2010, Oracle.

All Rights Reserved.

Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production


With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS> select status from v$instance;
STATUS
-----------STARTED
SYS> show parameter instance_type;
NAME

TYPE

VALUE

------------------------------------ ----------- -----------------------------instance_type

string

asm

SYS> select instance_name from v$instance;


INSTANCE_NAME
---------------+ASM
SYS> select name from v$asm_diskgroup;
NAME
-----------------------------ASM_DG_DATA
ASM_DG_FRA
SYS> select group_number, disk_number, name, path,failgroup
GROUP_NUMBER DISK_NUMBER NAME

PATH

from v$asm_disk;
FAILGROUP

------------ ----------- -------------------- ---------------------- -----------------------1

2 DISK1

ORCL:VOL1

FG1

1 DISK2

ORCL:VOL2

FG2

0 DISK3

ORCL:VOL3

FG3

2 DISK4

ORCL:VOL4

FG4

1 DISK5

ORCL:VOL5

FG5

0 DISK6

ORCL:VOL6

FG6

6 rows selected.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

SQL> show parameter pfile;


NAME

TYPE

VALUE

------------------------------------ ----------- -----------------------------spfile

string

/u02/app/oracle/product/10.2.0
/db_home/dbs/spfile+ASM.ora

SYS> create pfile='/tmp/init+ASM.ora' from spfile;


File created.

ASM INSTANCE INITIALIZATION PARAMETERS

$ cat /tmp/init+ASM.ora
+ASM.asm_diskgroups='ASM_DG_DATA','ASM_DG_FRA'#Manual Mount
*.asm_diskgroups='ASM_DG_DATA','ASM_DG_FRA'
*.background_dump_dest='/u02/app/oracle/admin/+ASM/bdump'
*.core_dump_dest='/u02/app/oracle/admin/+ASM/cdump'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='SHARED'
*.user_dump_dest='/u02/app/oracle/admin/+ASM/udump'

CHECK ASM DISK GROUPS THROUGH OEM

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Oracle ASM Striping has 2 Primary purposes:

To balance loads across all of the disks in a disk group

To reduce I/O latency

Oracle ASM Stripes and spreads data evenly across all of the disks in a disk group.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

FILE TEMPLATES

ASM mirrors files using a variable Stripe size according to file templates. Templates are
collections of attribute values that are used to specify disk regions, file mirroring, and
striping attributes for an Oracle ASM file when it is created. When creating a file, you
can include a template name and assign desired attributes based on an individual file
rather than the file type.

Coarse-grained striping provides load balancing for disk groups while fine-grained striping
reduces latency for certain file types by spreading the load more widely.
ASMCMD COMMANDS
$ export ORACLE_SID=+ASM
$ asmcmd
ASMCMD> help
asmcmd [-p] [command]
The environment variables ORACLE_HOME and ORACLE_SID determine the
instance to which the program connects, and ASMCMD establishes a
bequeath connection to it, in the same manner as a SQLPLUS / AS
SYSDBA.

The user must be a member of the SYSDBA group.

Specifying the -p option allows the current directory to be displayed in the command
prompt, like so:

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

ASMCMD [+DATAFILE/ORCL/CONTROLFILE] >


[command] specifies one of the following commands, along with its parameters.
Type "help [command]" to get help on a specific ASMCMD command.
commands:
-------cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
ASMCMD> ls
ASM_DG_DATA/
ASM_DG_FRA/
ASMCMD> ls -lrt
State

Type

Rebal

Unbal

Name

MOUNTED

HIGH

ASM_DG_FRA/

MOUNTED

HIGH

ASM_DG_DATA/

ASMCMD> lsdg

ASMCMD> ls
ASM_DG_DATA/
ASM_DG_FRA/
ASMCMD> cd ASM_DG_DATA
ASMCMD> ls -l
Type

Redund

Striped

Time

Sys

Name

ORCL/

ASMCMD> cd ORCL
ASMCMD> pwd
+ASM_DG_DATA/ORCL

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

ASMCMD> ls l
Type

Redund

Striped

Time

Sys

Name

CONTROLFILE/

DATAFILE/

ONLINELOG/

PARAMETERFILE/

TEMPFILE/

spfileorcl.ora =>

+ASM_DG_DATA/ORCL/PARAMETERFILE/spfile.266.904167283
ASMCMD> cd DATAFILE
ASMCMD> ls -l
Type

Redund

Striped

Time

Sys

Name

DATAFILE

HIGH

COARSE

FEB 19 01:00:00

EXAMPLE.265.904167107

DATAFILE

HIGH

COARSE

FEB 19 01:00:00

SYSAUX.257.904166909

DATAFILE

HIGH

COARSE

FEB 19 01:00:00

SYSTEM.256.904166909

DATAFILE

HIGH

COARSE

FEB 19 01:00:00

UNDOTBS1.258.904166911

DATAFILE

HIGH

COARSE

FEB 19 01:00:00

USERS.259.904166911

FTP AND HTTP WITH ASM

ASM is not a regular file system which can be accessed using standard FTP and HTTP service.
Oracle 10g R2 has introduced a new feature to access the ASM disk groups outside the
database via FTP and through a web browser using HTTP. The use of FTP and HTTP provide a
flexibility to manage the ASM environment.
Any FTP client can be used to move/copy the files stored on ASM DISKGROUP. To make this
enable we need to setup the Oracle XML DB access which is a onetime setup. Oracle XML DB
provides the file mapping functionality.
CONFIGURE THE PORTS FOR FTP AND HTTP
This can be done by executing the below script from SYSDBA and pass the FTP and HTTP port.
SYS> @?/rdbms/admin/catxdbdbca
SQL> SET FEEDBACK 1
SQL> SET NUMWIDTH 10
SQL> SET LINESIZE 80
SQL> SET TRIMSPOOL ON
SQL> SET TAB OFF
SQL> SET PAGESIZE 100
SQL>
SQL> define ftpport

= &1

Enter value for 1: 2020


SQL> define httpport = &2
Enter value for 2: 8080
SQL> Rem Create a function to traverse the dom elements.
SQL> CREATE OR REPLACE FUNCTION traverseDom

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

(parnode dbms_xmldom.DOMNode, pathSeg VARCHAR2)

RETURN dbms_xmldom.DOMNode IS

nodeList

dbms_xmldom.DOMNodeList;

anElement

dbms_xmldom.DOMElement;

aNode

dbms_xmldom.DOMNode;

BEGIN

-- Convert the passed in dom node to an element

anElement := dbms_xmldom.makeElement(parnode);

10
11

-- Select the path segment requested by the user

12

nodeList

:= dbms_xmldom.getChildrenByTagName(anElement, pathSeg);

13
14

-- get the first node out of the list

15

aNode := dbms_xmldom.item(nodeList, 0);

16
17

-- return that node (ignore errors here).

18

return aNode;

19

END;

20

Function created.
SQL>
SQL> declare
2

configxml

configdomdoc dbms_xmldom.DOMDocument;

textNode

dbms_xmldom.DOMNode;

aNode

dbms_xmldom.DOMNode;

protNode

dbms_xmldom.DOMNode;

anElement

dbms_xmldom.DOMElement;

listOfNodes

dbms_xmldom.DOMNodeList;

aString

VARCHAR2(100);

10

sys.xmltype;

begin

11
12

-- Select the resource and set it into the config

13

select sys_nc_rowinfo$ into configxml from xdb.xdb$config ;

14
15

-- Create a dom document out of the xmltype

16

configdomdoc := dbms_xmldom.newDOMDocument(configxml);

17
18

-- Get the root Element of the dom

19

anElement := dbms_xmldom.getDocumentElement(configdomdoc);

20
21

-- Convert this to a node

22

aNode := dbms_xmldom.makeNode(anElement);

23
24

-- Traverse One Element Down At A Time.

25

aNode := traverseDom(aNode, 'sysconfig');

26

protNode := traverseDom(aNode, 'protocolconfig');

27

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

28

-- Set the FTP port by traversing /ftpconfig/ftp-port

29

aNode := traverseDom(protNode, 'ftpconfig');

30

aNode := traverseDom(aNode, 'ftp-port');

31

textNode := dbms_xmldom.getFirstChild(aNode);

32

dbms_xmldom.setNodeValue(textNode, &ftpport);

33
34

-- Set the FTP port by traversing /ftpconfig/ftp-port

35

aNode := traverseDom(protNode, 'httpconfig');

36

aNode := traverseDom(aNode, 'http-port');

37

textNode := dbms_xmldom.getFirstChild(aNode);

38

dbms_xmldom.setNodeValue(textNode, &httpport);

39
40

dbms_xdb.cfg_update(configxml);

41

commit;

42
43

end;

44

old

32: dbms_xmldom.setNodeValue(textNode, &ftpport);

new

32: dbms_xmldom.setNodeValue(textNode, 2020);

old

38: dbms_xmldom.setNodeValue(textNode, &httpport);

new

38: dbms_xmldom.setNodeValue(textNode, 8080);

PL/SQL procedure successfully completed.


SQL>
SQL>
SQL> drop function traverseDom;
Function dropped.

$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 19-FEB-2016 02:31:59
Copyright (c) 1991, 2010, Oracle.

All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=devserver.com)(PORT=1521)))
STATUS of the LISTENER
-----------------------Alias

LISTENER

Version

TNSLSNR for Linux: Version 10.2.0.5.0 - Production

Start Date

19-FEB-2016 02:19:40

Uptime

0 days 0 hr. 12 min. 19 sec

Trace Level

off

Security

ON: Local OS Authentication

SNMP

OFF

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Listener Parameter File

/u02/app/oracle/product/10.2.0/db_home/network/admin/listener.ora

Listener Log File

/u02/app/oracle/product/10.2.0/db_home/network/log/listener.log

Listening Endpoints Summary...


(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=devserver.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=devserver.com)(PORT=2020))(Presentation=FTP)(Sessio
n=RAW))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=devserver.com)(PORT=8080))(Presentation=HTTP)(Sessi
on=RAW))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "orcl" has 2 instance(s).
Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

Now we are ready to access ASM disk groups using FTP client or HTTP browser.
For access through web browser: http://devserver.com:8080/

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

# cd Desktop/
[root@devserver Desktop]# ls -l
total 246016
-rw-r--r--

1 root root

7 Oct 15 05:03 em

-rw-r--r--

1 root root 251666432 Feb 19 03:06 SYSAUX.257.904166909

ACCESS THROUGH FTP

[root@devserver u03]# ftp devserver.com 2020


Connected to devserver.com.
220- devserver.com
Unauthorised use of this FTP server is prohibited and may be subject to civil and criminal
prosecution.
220 devserver.com FTP Server (Oracle XML DB/Oracle Database) ready.
530

Please login with USER and PASS.

530

Please login with USER and PASS.

KERBEROS_V4 rejected as an authentication type


Name (devserver.com:root): : system
331 pass required for SYSTEM
Password:
230 SYSTEM logged in
Remote system type is Unix.
ftp> dir
227 Entering Passive Mode (192,168,100,129,167,214)
150 ASCII Data Connection
drw-r--r--

2 SYS

oracle

0 FEB 18 16:02 home

drw-r--r--

2 SYS

oracle

0 APR 19 10:31 public

drw-r--r--

2 SYS

oracle

0 FEB 18 16:02 sys

-rw-r--r--

1 SYS

oracle

0 FEB 18 21:01 xdbconfig.xml

226 ASCII Transfer Complete


ftp> cd sys
250 CWD Command successful
ftp> dir
227 Entering Passive Mode (192,168,100,129,193,15)
150 ASCII Data Connection
drw-r--r--

2 SYS

oracle

0 APR 19 10:31 acls

drw-r--r--

2 SYS

oracle

0 APR 19 10:31 apps

drw-r--r--

2 SYS

oracle

0 APR 19 10:31 asm

-rw-r--r--

1 SYS

oracle

0 FEB 18 16:02 databaseSummary.xml

drw-r--r--

2 SYS

oracle

0 APR 19 10:31 log

drw-r--r--

2 SYS

oracle

0 APR 19 10:31 oid

drw-r--r--

2 SYS

oracle

0 FEB 18 16:02 schemas

226 ASCII Transfer Complete

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

ftp> cd asm
250 CWD Command successful
ftp> dir
227 Entering Passive Mode (192,168,100,129,126,146)
150 ASCII Data Connection
drw-r--r--

2 SYS

oracle

0 FEB 18 21:44 ASM_DG_FRA

drw-r--r--

2 SYS

oracle

0 FEB 18 21:44 ASM_DG_DATA

226 ASCII Transfer Complete


ftp> cd ASM_DG_DATA
250 CWD Command successful
ftp> dir
227 Entering Passive Mode (192,168,100,129,159,179)
150 ASCII Data Connection
drw-r--r--

2 SYS

oracle

0 FEB 18 21:58 ORCL

226 ASCII Transfer Complete


ftp> cd ORCL
250 CWD Command successful
ftp> dir
227 Entering Passive Mode (192,168,100,129,236,74)
150 ASCII Data Connection
drw-r--r--

2 SYS

oracle

0 FEB 18 21:58 DATAFILE

drw-r--r--

2 SYS

oracle

0 FEB 18 21:58 CONTROLFILE

drw-r--r--

2 SYS

oracle

0 FEB 18 21:58 ONLINELOG

drw-r--r--

2 SYS

oracle

0 FEB 18 21:58 TEMPFILE

drw-r--r--

2 SYS

oracle

0 FEB 18 21:58 PARAMETERFILE

-rw-r--r--

1 SYS

oracle

3584 FEB 18 21:58 spfileorcl.ora

226 ASCII Transfer Complete


ftp> cd DATAFILE
250 CWD Command successful
ftp> dir
227 Entering Passive Mode (192,168,100,129,60,137)
150 ASCII Data Connection
-rw-r--r--

1 SYS

oracle

461381632 FEB 18 21:58 SYSTEM.256.904166909

-rw-r--r--

1 SYS

oracle

251666432 FEB 18 21:58 SYSAUX.257.904166909

-rw-r--r--

1 SYS

oracle

204480512 FEB 18 21:58 UNDOTBS1.258.904166911

-rw-r--r--

1 SYS

oracle

2228232192 FEB 18 21:58 USERS.259.904166911

-rw-r--r--

1 SYS

oracle

104865792 FEB 18 21:58 EXAMPLE.265.904167107

226 ASCII Transfer Complete


ftp> bin
200

Type set to I.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

ASM IMPLEMENTATION USING ASMLIB | RHEL-AS(4.8)

ftp> hash
Hash mark printing on (1024 bytes/hash mark).
ftp> get EXAMPLE.265.904167107
#############################################################################################
#############################################################################################
#############################################################################################
#############################################################################################
#############################################################################################
#############################################################################################
#############################################################################################
#############################################################################################
226 BIN Transfer Complete
104865792 bytes received in 8.4 seconds (1.2e+04 Kbytes/s)
ftp> bye
221 QUIT Goodbye.
[root@devserver u03]# ls -l
total 102528
-rw-r--r--

1 root

root

104865792 Feb 19 03:35 EXAMPLE.265.904167107

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

You might also like