Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG...
Transcript of Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG...
Automatic Storage Management
UKOUG RAC & HA SIGSeptember 30, 2010
Frits Hoogland
1
Poll Anyone using ASM currently?
Version of ASM?–10.1–10.2–11.1–11.2
Anyone using OMF?–As part of ASM implementation–Without ASM?
2
ASM - The Oracle definitonhttp://www.oracle.com/technology/products/database/asm/index.html:
(link now gone)
Automatic Storage Management (ASM) is a feature in Oracle Database 10g/11g that provides the database administrator with a simple storage management interface that is consistent across all server and storage platforms. As a vertically integrated file system and volume manager, purpose-built for Oracle database files, ASM provides the performance of async I/O with the easy management of a file system. ASM provides capability that saves the DBAs time and provides flexibility to manage a dynamic database environment with increased efficiency.
3
ASM - The Oracle definiton Storage management interface that is
consistent across all server and storage platforms
Vertically integrated file system and volume manager
Purpose-built for Oracle database files Performance of async I/O with the easy
management of a filesystem(http://www.oracle.com/technology/products/manageability/database/pdf/asmov.pdf)
4
The database and ASM ASM components
–(s)pfile–CSS
The function of the ASM instance–Disk and diskgroup management–Database and ASM disk I/O
5
Redundancy Volume manager capabilities
“External redundancy”–No redundancy at ASM level
“Normal redundancy”–Mirroring at ASM level
“High redundancy”–Triple mirroring at ASM level
6
Redundancy Is your storage redundant?
Purpose of redundancy: stretch MTBF
7
ASM terminology ASM instance Diskgroup Disk Failgroup AU (allocation unit)
8
AU Spreading
9
AU 10-
AU 0-
AU 50-
AU 40-
AU 30-
AU 20-
Disk header (name, AT, FST, PST)
File directory
Disk directory
Active Change Directory
Continuing Operation Directory
Template Directory
Alias Directory
Free AU
Disk1
AU Spreading
10
AU 10-
AU 0-
AU 50-
AU 40-
AU 30-
AU 20-
Disk header (name, AT, FST, PST)
File directory
Disk directory
Active Change Directory
Continuing Operation Directory
Template Directory
Alias Directory
Free AU
Disk1 Disk2
AU Spreading
11
AU 10-
AU 0-
AU 50-
AU 40-
AU 30-
AU 20-
Disk header (name, AT, FST, PST)
File directory
Disk directory
Active Change Directory
Continuing Operation Directory
Template Directory
Alias Directory
Free AU
Disk1 Disk2 Disk3
Allocation policiesScenario 1:
Allocation of 10 AU’sDiskgroup DG1; 1 disk: D1
12
DG1,D1 0 ... 50 51 52 53 54 55 56 57 58 59 60
Allocation policiesScenario 2: Allocation of 10 AU’s Diskgroup DG1; 2 disks: D1,D2 (equally sized)
13
DG1,D1 0 ... 50 51
26
52
27
53
28
54
29
55
30DG1,D2 0 ... 25
Allocation policiesScenario 3:
Allocation of 10 AU’sDiskgroup DG1; normal redundacy2 FG’s: FG1,FG2; 4 disks: D1,D2,D3,D4 (eq. sized)
14
DG1,FG1,D1 0 ... 50
DG1,FG1,D2 0 ... 25
DG1,FG2,D3
DG1,FG2,D4
0 ... 50
0 ... 25
51
51
26
26
52
52
27
27
53
53
28
28
54
54
29
29
55
55
30
30
Scenario 4: Allocation of AU’sDiskgroup DG1; external redundacy3 disks: D1,D2,D3 (eq. sized)
Allocation policies
15
DG1,D1 0 ... 50
DG1,D2 0 ... 25
DG1,D3 0 ... 17
51
24
3026
52
27
53
28
54
29
55
18
56
31
19
57
32
20
58
33
21
59
34
22
60
35
23
61
36
ORA-15041: diskgroup space exhausted
Scenario 5: Allocation of 10 AU’sDiskgroup DG1; external redundacy2 disks: D1,D2 (unequally sized)
Allocation policies
16
DG1,D1 0 ... 50
DG1,D2 0 ... 25
51
26 27
52
28 29
53
30 31
54
How ASM tunes I/O I/O tuning is done using the allocation policy
This means no tuning is done on runtime
Mirror/secondary AU reads–ASM_PREFERRED_READ_FAILURE_GROUP–Corruption found
Unequal sized disk (!!)
17
Oracle Managed Files First appeard in version 9 Goal: easy database files management Did never gain wide acceptance (AFAIK)
Re-introduced with ASM
18
Oracle Managed Files OMF & ASM are separate options
–OMF can be used without ASM, and vice versa
OMF makes sense with ASM–File structure standardisation–File naming standardisation–No manual action needed with file manipulation–Database removal?
19
ASM Disks ASM sees a disk as an individual entity
–That is why ASM stripes everything over all disks
Is a disk a real individual entity nowadays?–SAN/NAS anyone?–Anyone who uses DAS for production databases?
20
ASMLib Support library for ASM
–Kernel module
Disks for ASM can be used in three ways:–Raw devices–Block devices–ASMLib devices
21
ASMLib Rumored to have started as a framework for
storage vendors to add functionality
Reported functionality:–Device name labels–Device ownership and permissions–Async I/O management– I/O optimisation–Sanity checkups
- (http://blogs.oracle.com/AlejandroVargas/newsItems/viewFullItems$96)
22
ASMLib Device name labels
–NOT the diskname in ASM
Device ownership and rights–ASMLib creates a meta device with correct rights–Clusterware files–Can be accomplished with udev
- (http://www.oracle.com/technology/products/database/asm/pdf/device-mapper-udev-crs-asm%20rh4.pdf)
23
ASMLib Async I/O management
–Using ASMLib there’s a synchronous write to meta-device
–Async I/O is enabled by default
I/O optimisation–Same I/O using different codepath–No I/O optimisation in ASMLib according to Wim Coekaerts- (http://forums.oracle.com/forums/thread.jspa?threadID=498215)
24
ASMLib Sanity checkups
–Ownership and rights?–Can anyone think of any other checkup?
Partition/disk name persistence–/dev/sd*–/dev/disk/by-id/ !–ASM recognises disks by name in the diskheader!
25
ASMLib Do NOT use ASMLib
–No added functionality which can not be resolved in an other way
–Extra layer in the technology stack–Add a kernel dependency–Only available on linux
26
Advantages of ASM (Part of) volume manager- & filesystem-
management become DBA responsibility Database files become “black boxed” Everything always striped over all disks in a
diskgroup RMAN mandatory for backup & restore No filesystem imposed limits RAC / cluster aware
27
Disadvantages of ASM (Part of) volume manager- & filesystem-
management becomes DBA responsibility Database files become “black boxed” Everything always striped over all disks in a
diskgroup RMAN mandatory for backup & restore Relative ‘young’ Unequal disk sizes give unequal I/O
28
Conclusion File / filesystem management
–Error prone–Hard to maintain standards
Principal deployment of SAME–Which is good–Necessary to know ASM inner working
Rebalancing ASM and online storage migration
29
Q & A
30
Bibliography http://docs.oracle.com http://otn.oracle.com http://dims.ncsa.uiuc.edu/san/src/linux-
mpio.pdf http://jarniel.wordpress.com http://canali.web.cern.ch/canali
31