Anda di halaman 1dari 69

<Insert Picture Here>

Oracle Database 11g Release 2


ASM Top 5 Essential Features
Nitin Vengurlekar - Grid Product Strategy

Safe Harbor Statement

The following is intended to outline our general product


direction. It is intended for information purposes only,
and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or
functionality, and should not be relied upon in making
purchasing decisions.
The development, release, and timing of any features or
functionality described for Oracles products remains at
the sole discretion of Oracle.

2
Audience Poll

<Insert Picture Here>

How many of you have standardized on ASM?


How many of you are running ASM for non-RAC?
How many of you are running 11.1? 10.2? 9.2?
How many of you are System Administrators and
manage ASM? DBAs who manage ASM?

3
Agenda
Brief ASM Overview
<Insert Picture Here>
Simplified Technology Stack

Simplified Storage Provisioning

Simplified user interface for manageability


asmca, asmcmd, acfsutil and EM

ASM Clustered File System

Disk Group Rename

4
What is Oracle ASM?

Application
Application Oracle
OracleDatabase
Database

File
FileSystem
System
ASM
ASM
Logical
LogicalVolume
VolumeManager
Manager

Operating
OperatingSystem
System Operating
OperatingSystem
System

Hardware
Hardware Hardware
Hardware
ASM Benefits
I/O is spread evenly across diskgroup disks
Prevents hot spots and maximizes performance.
ASM eliminates need for over provisioning and maximizes
storage utilization
Great driver for database consolidation.
Rebalance - online redistribution of extents
Initiate with incremental addition/removal of storage
Can leverage ASM redundancy or 3rd party RAID
functionality.
Supports single instance databases as well as RAC.
Various tools to manage ASM
EM, asmcmd, asmca, Sql*Plus
Reduces overall Oracle Database TCO without
compromising performance or availability.

6
Screen reader hint: This
slide contains a diagram that
is explained in the speaker
notes.

ASM Instance Architecture


Agenda
Brief ASM Overview
<Insert Picture Here>
Simplified Technology Stack

Simplified Storage Provisioning

Simplified user interface for manageability


asmca, asmcmd, acfsutil and EM

ASM Clustered File System

Disk Group Rename

11
ASM Cluster File System (ACFS)
Overview - Metalink Doc ID: 948187.1

General purpose scalable file system


 Journaling, extent based
 Single node and cluster
 POSIX, X/OPEN file system solution for UNIX/Linux
 Accessible through NAS protocols (NFS, CIFS)

Integrated with Oracle Clusterware for cluster support


Multi OS platform (Supported on Red Hat 5 and Windows at initial
release)
Integrated with Oracle system management tools
 Oracle installation and configuration
 Enterprise Manager and ASM Storage mgt tools
 Native OS File System Management tools

12
ACFS Architecture

Oracle 3rd Party 3rd Party


Database Application File System

ASM ASM Cluster


File System

Dynamic Volume Manager

ASM Instance

rd
Database & 3 Party
ACFS
Clusterware File System
Files
Files Files
Disk Group Dynamic Volume
Practical Usages of ACFS
Oracle database installation binaries
RAC or single instance ORACLE_HOME directories
Database exports
Database logs and trace files
File based database objects
UTL_FILE_DIR location
Directories used by extproc routines
Directory objects for external BFILES and external tables
Application logs
Shared documents
Report output
Data dumps

14
ACFS
Cost Savings Use Cases

Customer running In house application needs cluster


filesystem for shared report and batch loading
capabilities. Additionally, they want to replace existing
3rd party high availability solution

Replace existing NAS appliance for their test/Q/A. ACFS


can be leveraged as a Poor Mans NAS
Export ACFS file system from a designated Grid Infrastructure
server and mount as NFS or CIFS mount point on the clients

15
ACFS for E-Business Suite Customers

RAC DB Tier Shared Apps Tier:


NFS Share - /etc/exports ORA_TOP
COMMON_TOP

NFS APPLTOP

Concurrent Manager
Each node NFS Mount File System Output and
UTL_FILE_DIR
Forms Concurrent Web App
Server Manager APPLPTMP
Server Server
APPLTMP
APPLCFS/OUT
APPLCFS/LOG
16
Dynamically Resize ACFS
Reduce Application Downtime

Privileged Users can increase the size of an active file


system (acfsutil)
Implicitly will grow the ASM Volume
No need to unmount the file system to extend/shrink
the file system

#1: Extend DIAG_DEST FS on the fly


Ease of Management - increase space immediately rather than
hunt and peck and delete log, core and trace files
#2: Extend ETL FS on the fly
Running out of space in the ETL file system. Cannot acquire
downtime to unmount/mount file system to increase

18
Resize ACFS on the fly
No need to kick off the users to increase file system size

Command Function

acfsutil info Display new ACFS file and file system features (ACFS,
snapshots, registry, size) and information

acfsutil size Resize an ACFS file system

Command-line syntax
# /sbin/acfsutil size +4G -d
/dev/asm/lobdata_db1-212
/apps/oracle/product/11.2.0/db_1acfsutil size:
new file system size: 10737418240 (10240MB)

19
ACFS Read-Only Snapshots
ACFS snapshot is an online, read-only, point in time copy of an
ACFS file system
The snapshot copy is initially sparse and merely references the
storage allocation information maintained by the file system
Automatically built when filesystem is created
Snapshot storage is maintained within the file system
Before an ACFS file extent is modified/deleted, its current value is
copied to the snapshot.
Copy-On-Write (COW) technique to maintain the snapshot's
point-in-time view of the file system
Snapshots can be created on demand to deliver a current,
consistent, online view of an active file system

20
ACFS Read-Only Snapshots
An enabler for:
On-line, disk-based, file backup model using snapshots and
individual file recoveries

Up to 64 snapshot images per ASM file system


Policy based snapshots:
Schedule snapshots on an interval basis: every 5 seconds,
every 30 minutes, daily, with recycling (using EM)

ACFS CLIs support creation and removal of snapshots

ACFS Snapshot functions integrated with EM

ACFS Snapshots are always available in a mounted


file system

21
ACFS Snapshots
The New Upgrade and Patching Strategy

File System Database

1.Flashback capability of Database Guaranteed


ACFS file system Restore Points (GRP)
2.ACFS Snapshots should
be part of every database Flashback Recovery Area
upgrade or patch (FRA)
3.ACFS Snapshots should
be part of every application
server patch or upgrade
For SAs: The most convenient way to create or remove snapshots is
with the acfsutil OS command

23
Agenda

Brief ASM Overview


<Insert Picture Here>
Simplified Technology Stack

Simplified Storage Provisioning

Simplified user interface for manageability


asmca, asmcmd, acfsutil and EM

ASM Clustered File System

Disk Group Rename

24
Storage Provisioning Pitfalls Pre 11.2
Reduces provisioning and planning for RAC

Requires many distinct


requests for space
Error-prone to define
permissions and config
for OCR/Vote
Potentially requires odd
LUN size requests
Many Admins
fdisk/partition the disks
for the OCR/Vote files

25
Storage Provisioning 11.2+
Simplified Storage Provisioning
New Way - Reduces
provisioning and
planning for RAC
Provision storage for
ASM Disks only
No need to nickel and
dime SAN Architects
for trivial space
Only manage ASM
Disks
ASM can now store:
OCR, Vote, ASM
Spfile, database home
All allocated from the
requested disk pool

26
Everything Inside ASM Model

27
Extending ASM to Manage ALL Data

Database RAC Application 3rd Party FS

Automatic Storage Management (ASM)


ACFS Snapshot

ASM Cluster & Single


Node File System
ASM Instance (ACFS)
Managing
Oracle DB Files
Dynamic Volume Manager

ASM Files Dynamic Volumes


ASM
DB
DB
DBDatafiles
Datafiles
Datafiles
Disk DB
DBDatafiles
DB Datafiles
Datafiles
ACFS FS 3rd Party
Oracle Bin FS
Group OCR
OCR&&Voting
Votingfiles
files
Agenda
Brief ASM Overview
<Insert Picture Here>
Simplified Technology Stack

Simplified Storage Provisioning

Simplified user interface for manageability


asmca, asmcmd, acfsutil and EM

ASM Clustered File System

Disk Group Rename

29
Managing ASM
Which management interface should I use?

ASMCA (GUI)
Lightweight tool to create ASM Disk Groups, Volumes and ACFS
Command line option is available in silent mode

Enterprise Manager Grid Control


Easy ASM Volumes and ACFS creation and management
HTTP Access via Database Control
Designed to be the all inclusive tool

ASMCMD
Great for reports and listings

SQL*Plus Command Line

30
Storage Manageability - asmca
Even a caveman can do it !

Just like we have the database configuration and network configuration


assistants, we now have an ASM configuration assistant

Simplifies ASM Maintenance

Extremely low learning curve


Lightweight
Simplistic
GUI

31
ASM Configuration Assistant (ASMCA)
Recommended tool to configure ASM, Create ACFS file systems
Dynamic Volumes and ACFS
Ready for Oracle DB Home
Upgrade previous versions of ASM to the binaries to be installed
current version (11g R2)
Create & manage Dynamic Volumes

32
asmca Create Disk Group
1. Recommended to create
disk groups with asmca

2. Recommended AU in 11g
is 4MB

ADVM Compatibility must


be set to 11.2 to utilize
ACFS

33
asmca Create ACFS for Database Home
Create a shared file system for Oracle Binary

34
Linux-Unix Extensions
Ease of Management

Identical to other Unix file system management commands


Create an ACFS file system mkfs.acfs [-vf] [-n name ] device
# mkfs.acfs /dev/asm/vol1-123

Mount an ACFS file system mount.acfs [-v] [-o options] device dir
# mount.acfs /dev/asm/vol1-123
/u01/oracle/acfsmounts

Unmount an ACFS file system umount [-v] device|dir

Check and repair an ACFS file fsck.acfs [-avnf] [info] device


system # fsck.acfs /dev/asm/vol1-123

35
Extensions for asmcmd

Everything you can do in SQL*Plus, you can do in asmcmd

Privileged Users are encouraged to manage the


Cluster / ASM and ACFS
Single point of entry for ASM maintenance
No more need to go back and forth between asmcmd
and SQL*Plus
Now, asmcmd is an attractive tool that Privileged
Users can swallow

36
Extensions for asmcmd
As a Privileged User life is easy

1. You can startup and shutdown ASM instance (non-RAC)


2. Create (mkdg) / Drop (dropdg) / Mount (mount) / Dismount
(umount) ASM Disk Group
Add / remove disk from ASM disk group (chdg)
View Disk I/O Statistics (iostat)
View Disk Group Level Information (lsdg)
View Disk Level Information (lsdsk)
Create (volcreate) / Resize (volresize) / Enable (volenable)/
Disable (voldisable) Volumes
Rebalance Disk Group(rebal)

37
Enterprise Manager
Create Snapshot
1. Create
Snapshots

2. Delete
Snapshots

Manage up to
63 Snapshots

Command-line syntax
# /sbin/acfsutil snap create 11oct2009_db_1.before.patch
/apps/oracle/product/11.2.0/db_1acfsutil snap create:
Snapshot operation is complete.

39
Agenda
Brief ASM Overview
<Insert Picture Here>
Simplified Technology Stack

Simplified Storage Provisioning

Simplified user interface for manageability


asmca, asmcmd, acfsutil and EM

ASM Clustered File System

Disk Group Rename

40
Rename Disk Group
Clone databases on same node or another node

Change the name of a cloned disk group


Simplify server relocation

With triple mirroring technologies, you can split the third


mirror and mount it locally
Rename DG / Mount DG
Fast way to clone a database

41
Rename Disk Group
Recommended Method: Phase One followed by Phase Two

Phase One Creates a Config File


# renamedg phase=one dgname=dg_prod_data newdgname=data2
config=rename_to_data2.conf verbose=true
# cat rename_to_data2.conf
ORCL:DATA1 DG_PROD_DATA DATA2
ORCL:DATA2 DG_PROD_DATA DATA2
ORCL:DATA3 DG_PROD_DATA DATA2

Phase Two Apply the config file generated from Phase One
# renamedg phase=two dgname=dg_prod_data newdgname=data2
config=rename_to_data2.conf verbose=true

Parsing parameters..
Parameters in effect:
Old DG name : DG_PROD_DATA
New DG name : DATA2

42
Agenda
Brief ASM Overview
<Insert Picture Here>
Simplified Technology Stack

Simplified Storage Provisioning

Simplified user interface for manageability


asmca, asmcmd, acfsutil and EM

ASM Clustered File System

Disk Group Rename

43
Pre-11gR2 Installation

Install Clusterware

Install ASM in a separate ORACLE_HOME

Install Database home in a separate ORACLE_HOME

44
GI Tech Stack
Simplified Technology Stack only 2 Homes to manage

Grid Infrastructure - FREE


Clusterware Grid Infrastructure Home
ASM
i.e. /apps/11.2.0/grid
ACFS
Managed by privileged user

Database Home
i.e. /apps/oracle/product/11.2.0/db_1
Managed by DBAs

45
GI Tech Stack
Benefits of a Simplified Technology Stack

OHASD replaces inittab entries and manages stack

OHASD manages startup and shutdown of entire stack


ACFS modules get loaded
ASM gets started and diskgroups mounted
ACFS filesystems get mounted
Database(s) get started

46
Grid Infrastructure Stack
Roles and Responsibilities

Components of GI stack run as privileged user


Oracle recommends GI stack to be managed by privileged
user (i.e. System Administrator)
Clustering, file system and storage volume management
roles are traditionally handled by SAs
 Significant changes in GI stack manageability that
cater to SAs
 Rich command-line features in ASMCMD and a
compact GUI tool (ASMCA) are available for SA
disposal

47
<Insert Picture Here>

ACFS ADVM Operational


Overview

49
ACFS Installation

No separate install for ACFS software


Installed as part of the Oracle Clusterware Grid
Infrastructure installation along with ASM

Includes kernel drivers and userspace tools


Kernel drivers are installed as part of the GI installation
The utilities for ACFS and ADVM are located in /sbin.
Drivers are located in /lib/modules/<os>/extra/usm.

50
Dynamic Volume Manager and
Dynamic Volumes
Provides volume management services and
OS standard disk device driver interface to ACFS
/dev/asm/vol1-123

Loadable kernel driver


ASM DG
Once the volume is created anOS system device
+DATA/ file is also created
Can be seen as /dev/asm/<volume-name>

File systems issue I/O requests to the ADVM


volume devices.
ADVM driver maps I/O requests against a volume
device to the corresponding volume file located within
an ASM disk group

Managed using SQL, ASMCMD, EM, ASMCA

Note: An AVD volume device may not be used as an OS boot or swap device, nor used as a root file system of the OS 51
ADVM Concepts
ADVM supports all storage solutions supported for ASM
except Exadata
Inherits and leverages underlying ASM redundancy
On Linux platforms Oracle ADVM volume devices are created
as block devices
Do not use raw (8) to map ADVM volume block devices into
raw volume devices.
All device management is performed against the ASM disks
underneath ADVM, so need to manage ADVM devices
Do not create multipathed devices over ADVM devices
Do not create ASMLIB devices on ADVM devices
Device partitioning (fdisk) not supported on ADVM
devices

52
Space Management with ACFS

Conventional LUN, volume and ASM based space, volume and


file system management file system management
Define SAN LUNs Define SAN LUNs
Present LUNs to OS Present LUNs to OS
Group LUNs into volume group Group LUNs into ASM disk
or pool group
Create logical volume Create ASM logical volume
Create file system Create ACFS file system

53
ACFS Build Walk-through

Planning
Create a ASM diskgroup
Create a Shared DB Home Filesystem
Create local volume
Create a local filesystem
Create a ACFS snapshot

55
Build Walk-thru - Planning
A typical deployment work flow:

Systems Administrator installs the Oracle Clusterware


software
Oracle recommends that the GI stack be installed using the
grid user, with a primary group as oinstall
Sysadmin via ASMCMD or ASMCA (recommended),
create appropriate disk groups
Flash Recovery Area, disk group for database binaries,
database external data, etc
Create an ASM volume
Create a ACFS fileystem

57
Build Walk-thru - Planning
Creation of ASM diskgroups, volumes, or filesystems
does not require root access
Mounting the filesystem will require root access.

Once the ACFS filesystem or diskgroup is created,


the DBA can use these containers for the appropriate
purposes
Install Oracle database software in the ACFS filesystem
The DBA should install database software using a
username different than grid; eg, oracle with primary group
as oinstall

Create databases in ASM

58
ACFS ASM Deployment Practices
Two Disk Groups
DATA diskgroup -
Database datafiles
Oracle clusterware file (OCR and Voting Disk)
ACFS-ADVM volumes for:
ORACLE_HOME (Oracle binaries)
Oracle external files types
BFILEs
UTL_DIR
ETL data and external tables

FRA diskgroup holds database recovery related files.


Archive logs
Backup and dumpsets
Flashback logs

59
ACFS ASM Deployment
Alternative

DATA diskgroup - database datafiles Oracle Clusterware files


(OCR/Vote files)

FRA diskgroup holds database recovery related files.


Archived log files, backups, dumpsets, flashback logs,
etc.

DATAOH diskgroup houses ASM volumes.


ORACLE_HOME (Oracle binaries)
Oracle external file types, such as BFILEs , UTL_DIR
directory contents, or ETL data/external tables

60
Build Walk-thru

ASMCMD

ASMCA
Shared Oracle Home
Non-db home (local filesystem)

61
ACFS-ADVM Build - ASMCMD

asmcmd> mkdg diskgroup_create_crsdata.xml

asmcmd> mkdg diskgroup_create_data.xml

ASMCMD> lsdg
State Type Rebal Sector Block AU
Total_MB Free_MB Req_mir_free_MB Usable_file_MB
Offline_disks Voting_files Name
CONNECTED NORMAL N 512 4096 1048576
157479 151671 52493 49589
0 Y CRSDATA/
MOUNTED NORMAL N 512 4096 1048576
209972 176839 52493 62173
0 N DATA/

62
ACFS-ADVM Build - ASMCMD

$ asmcmd
ASMCMD [+] > volcreate -G DATA -s 5g ohdg1
ASMCMD [+] > volinfo -a
Diskgroup Name: DATA
Volume Name: OHDG1
Volume Device: /dev/asm/ohdg1-296
State: ENABLED
Size (MB): 5120
Resize Unit (MB): 256
Redundancy: UNPROT
Stripe Columns: 4
Stripe Width (K): 128
Usage:
Mountpath:

63
ACFS-ADVM Build - ASMCMD

$ ls -l /dev/asm/*
brwxrwx--- 1 root oinstall 252, 151553 Jun 30 12:40 /dev/asm/ohdg1-
296

# mkfs.acfs /dev/asm/ohdg1-296
mkfs.acfs /dev/asm/ohdg1-296
mkfs.acfs: version = 11.2.0.0.2.0
mkfs.acfs: on-disk version = 38.0
mkfs.acfs: volume = /dev/asm/ohdg1-296
mkfs.acfs: volume size = 5368709120
mkfs.acfs: Format complete.

# mkdir /u01/app/grid/product/11.2.0/db1
# mount /dev/asm/ohdg1-296 /u01/app/grid/product/11.2.0/db1

64
ACFS-ADVM Build - ASMCMD
ACFS resize - Walk-thru

$ /acfsutil size +200G -d /dev/asm/ohdg1-296


/u01/app/grid/product/11.2.0/db1
acfsutil size: new file system size: 322122547200
(307200MB)

65
ACFS-ADVM Build - ASMCMD
ACFS Snapshots - Walk-thru
$ acfsutil snap create oh_db_snap \
/u01/app/grid/product/11.2.0/db1
acfsutil snap create: Snapshot operation is
complete.

$ ls l /u01/app/grid/product/11.2.0/db1
/.ACFS/snaps]#
drwxrwxr-x 69 oracle oinstall 8192 Jan 5 00:23
oh_db_snap

66
ACFS-ADVM Build Walk Thru
using ASMCA

67
Create ASM Diskgroup

68
Create Shared DB Home contd

70
Shared DB Home Post-exec script

71
Create non-DB home volume

72
Verify Volume is created/enabled

73
Create filesystem over volume
YOUR DONE !!

75
ADVM-ACFS and Oracle Clusterware -
Startup
The ADVM-ACFS drivers are loaded
The CRS ASM agent will start the ASM instance
As part of ASM instance startup, disk groups will be
mounted
All ASM Dynamic volumes are enabled.
The OS ADVM volume device node in /dev is created
The CRS agent mounts any ACFS filesystems
The appropriate CRS agents will start their respective
resources.
RDBMS CRS agent will startup the database.

76
ADVM-ACFS and Oracle Clusterware -
Shutdown
The ACFS CRS agent will attempt to perform umounts for
filesystems on ASM volumes.
The pids of active processes using that filesystem will be
displayed and logged for sysadmin action
Eventually CRS shutdown will terminate active pids.

The important lesson: CRS should be seen as moving closer to


the operating system rather than just part of the Oracle stack.

Shutting down the clusterware will stop ASM, thus shutting down
all ACFS file systems.

77
ASM 11gR2 How-Tos
http://www.dbaexpert.com/blog/category/asm/

1. ACFS command-line tools available in Oracle Database 11g Release 2


2. Configure ACFS for auto-startup for non-RAC database servers
3. Volume Management with asmcmd
4. Rename Disk Group
5. Ways to mount and dismount disk groups in Oracle Database 11g
Release 2
6. New ways to create disk groups in Oracle Database 11g Release 2
ASMCA Command-line Interface
7. Maintaining ASM Volumes and Cluster File Systems in Oracle
Database 11g Release 2
8. Creating ASM Volumes and Cluster File Systems with Enterprise
Manager in 11g Release 2
9. Creating ASM Snapshots with Enterprise Manager in 11g Release 2

78
79

Anda mungkin juga menyukai