Server Appliance Proposal

Download Report

Transcript Server Appliance Proposal

Bare Bones ASM
What 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 Applications
17 Applications Suites
 Meds Manager
 ER
 Billing/Revenue Management
 Nursing
 NICU/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?
 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
Automatic Storage
Management
 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
--------------asm_diskgroups
 service oracleasm
string
DGROUP1
asm_diskstring
 /dev/oracleasm
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_diskgroups
*.asm_diskstring=‘/dev/c0t1d1*’
string
DGROUP1– unix
*.asm_diskstring=‘/dev/sda1’
asm_diskstring
*.instance_type='asm'
string
ORCL:VOL*
*.processes=500 - Set to minimum of 25 + 15 *
number of databases uses ASM for storage
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
– the default – two way mirroring, each stripe is written
to two extents
 Normal
– three way mirroring – each stripe written to one primary
and two mirrored extents
 High
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 diskgroup
DROP 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
Database RAC
Application
3rd Party FS
Automatic Storage Management (ASM)
ACFS Snapshot
ASM Instance
Managing
Oracle DB Files
ASM Files
ASM Cluster & Single
Node File System
(ACFS)
Dynamic Volume Manager
Dynamic Volumes
ASM
Disk
Group
DB
Datafiles
DB
DBDatafiles
Datafiles
OCR & Voting files
ACFS FS
Oracle Bin
3rd Party
FS
Oracle Database 11g Release 2
Automatic Storage Management (ASM)
`
The foundation for Grid
Storage
SOA
IMDB
OC4J
APACHE
Siebel
Web
PSFT
EBS
File
System
DW
ODS
Binaries
OCR &
Voting Files
DB
Datafiles
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