Bare Bones ASM What Every DBA Needs to Know Jay Caviness Sr. Systems Engineer McKesson Provider...
-
Upload
dashawn-viel -
Category
Documents
-
view
212 -
download
0
Transcript of Bare Bones ASM What Every DBA Needs to Know Jay Caviness Sr. Systems Engineer McKesson Provider...
Bare Bones ASMWhat Every DBA Needs to Know
Jay Caviness
Sr. Systems Engineer
McKesson Provider Technologies
Topics
What is ASM?
Using ASM
Caveats and Issues
New Features in 11gR2
McKesson Provider Technologies
Largest Healthcare IS Company
Oracle Solutions Partner
McKesson Clinicals Applications17 Applications Suites
Meds ManagerERBilling/Revenue ManagementNursingNICU/PICU
About Me
Oracle DBA for 20 years
Senior Engineering DBA and Oracle Infrastructure Architect for McKesson Provider Technologies
Administered Oracle from v5.1 – 11g
Beta team for 11gR2
Oracle Certified Professional
Known as the “Grumpy DBA”
McKesson Horizon Clinicals and ASM
Over 800 hospital deploy McKesson applications
ASM deployed starting in late 2005 (10gR1)
As of today more than 475 hospitals run Oracle ASM
- Most run Oracle RAC - over 700 clusters
- Linux, HP/UX and IBM-AIX
McKesson Horizon Clinicals Client
Starting disk space per installation: 400GB+
Growth 20%–30% year over year
Retention requirements vary by HIPAA rules, typically 7-10 years
Automated Storage Management
Why ASM
Why choose ASM?
Setup and Management
Simplicity
Scalability & Performance
Robust and Stable
What is ASM?
Automatic StorageManagement
Replaces conventional file systems and volume managers
Capacity on demand Add/drop disks online
Automatic I/O load balancing Stripes data across disks to balance
load
Automatic mirroring
Easy to set up and use
Works with SAN, NAS or filesystems
What ASM does do…
Stripe & mirror data across multiple disks
Reduces management overhead
Provides 0, 2 or 3-way mirroring
Can store almost all types of database related files*
What ASM does not do…
Not an I/O broker or controller – I/O is still managed by the individual instances
Not a database – INSTANCE_TYPE=‘asm’
Acts as the mediator and definer
Not foolproof, luns can be removed out from under ASM!
ASM - Setup
Install in own Oracle Home
Determine redundancy/mirroring
Determine LUN/Disk size
Partition devices
Install ASM software and start the “mini-cluster”
The “mini-cluster”
The Oracle Cluster Synchronization Services Daemon is required for ASM – even for a single (non-RAC) database
Used for communication between ASM and database instances
Root.sh will create an entry in /etc/inittab to respawn cssd
ASMlib
Defines disk/luns for use with ASM
Only available on Linux
service oracleasm
/dev/oracleasm
------------------------------------ ----------- ------------------------------asm_diskgroups string DGROUP1asm_diskstring string ORCL:VOL*
init+ASM.ora
Only one ASM instance per node
*.asm_diskgroups=‘DATA'*.asm_diskstring='ORCL:*‘ -- linux*.asm_diskstring=‘/dev/asm_disk*’ -- unix*.asm_diskstring=‘/dev/c0t1d1*’ – unix*.asm_diskstring=‘/dev/sda1’*.instance_type='asm'*.processes=500 - Set to minimum of 25 + 15 * number of databases uses ASM for storage
------------------------------------ ----------- ------------------------------asm_diskgroups string DGROUP1asm_diskstring string ORCL:VOL*
Diskgroups
Diskgroups are the logical storage units for ASM
One or more for all databases on a server or cluster
Often, two diskgroups are created, one for tablespace and
another for FRA
Diskgroups may also be created by SAN speed (fast, middle,
slow)
Redundancy
ASM supports three types of redundancy
External – no mirroring within ASM, all at the OS level
Normal – the default – two way mirroring, each stripe is written to two extents
High – three way mirroring – each stripe written to one primary and two mirrored extents
Failgroups
Failgroups cannot be removed without recreating the diskgroup.
If one failgroup is lost or offline for a period of time, it will be re-synced when available again
Fail groups should be across different controllers or SANs
Tools to Manage ASM
SQL*Plus
ASMCMD
Grid Control / Database Control
SRVCTL – RAC only
Basic ASM Commands
Create a diskgroup:CREATE DISKGROUP dgroup1 DISK ’orcl:vol001’,’orcl:vol002’;
Drop a diskgroupDROP DISKGROUP dgroup1;
To drop a diskgroup which still contains data:DROP DISKGROUP dgroup1 INCLUDING CONTENTS;
Basic ASM Commands
Add luns to a diskgroup: ALTER DISKGROUP dgroup1 ADD DISK ‘orcl:vol006’;
Remove luns from a diskgroup:ALTER DISKGROUP dgroup1 REMOVE DISK ‘vol006’;
Do both at the same time:ALTER DISKGROUP dgroup1
ADD DISK'ORCL:VOL003','ORCL:VOL004'DROP DISK'VOL005'REBALANCE POWER 6;
Rebalancing
Redistribution only occurs when adding or dropping disk
Change the asm_power_limit, default 1, 0 up to 11
To modify the power limit for a disk group: alter diskgroup dgroup1 rebalance power 11;
Check on the status via V$ASM_OPERATION
Basic ASM Commands – Database level
Set for default diskgroup
db_create_file_dest=‘+DGROUP1’
Create tablespaces without names using OMF
CREATE TABLESPACE testts DATAFILE SIZE 5g;
ALTER TABLESPACE testts ADD DATAFILE SIZE 10g;
Basic ASM Commands – Database level
Set for default diskgroup for logfiles:
db_create_online_log_dest_1=‘+DGROUP1’
db_create_online_log_dest_2=‘+DGROUP1’
Create redo logs without names using OMF
ALTER SYSTEM ADD LOGFILE SIZE 200m;
Caveats
If ASM goes down, all instance that use ASM will immediately crash.
Normal or high redundancy may not show the actual disk use
Databases can remain unnoticed if not dropped
Loss of a disk (when using external redundancy) will result in the loss of the diskgroup
ASM Myths and Legends
ASM will automatically rebalance hot spots
ASM controls file I/O
ASM must run on RAID 10
Disks/Luns must be added to a diskgroup in multiples of 4 or 8
Quick Guide to 11gR2
New Features
3rd Party FSApplication
Automatic Storage Management (ASM)
ASM Instance Managing
Oracle DB Files
ASM Cluster & Single Node File System
(ACFS)
Database RAC
ACFS Snapshot
ASM Files
Dynamic Volume Manager
Dynamic Volumes
ACFS FSOracle
Bin
3rd PartyFS
DB DatafilesDB DatafilesDB DatafilesDB Datafiles
DB DatafilesDB Datafiles
OCR & Voting filesOCR & Voting files
ASM
Disk
Group
Oracle Database 11g Release 2Automatic Storage Management (ASM)
`
The foundation for Grid Storage
SiebelSiebelWebWeb
PSFTPSFT
DWDWODSODS
SOASOAIMDBIMDBOC4JOC4J
APACHEAPACHE
EBSEBS
DB Datafiles
DB Datafiles
OCR &Voting Files
OCR &Voting Files
BinariesBinaries
FileSystem
FileSystem
Au
tom
ati
c S
tora
ge
Man
ag
eme
nt
Au
tom
ati
c S
tora
ge
Man
ag
eme
nt
New in 11gR2
ASM part of the clusterware
ACFS
ASMCA, ASMCMD
RAC - OCR/Voting disks in ASM
Diskgroup rename
Recommended Reading
www.oracle.com/technology/asm - Oracle White Papers
www.oracleracsig.com – Oracle RAC SIG
www.oracle-base.com/articles/10g/ASMUsingASMLibAndRawDevices.php
www.juliandyke.com – Author Julian Dyke
www.idevelopment.info – Jeff Hunter
More information
Contact: [email protected]
Corporate: www.mckesson.com/clinicals
Personal: www.grumpy-dba.com