Download - Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

Transcript
Page 1: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

Automatic Storage Management

UKOUG RAC & HA SIGSeptember 30, 2010

Frits Hoogland

1

Page 2: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 3: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 4: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 5: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 6: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 7: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

Redundancy Is your storage redundant?

Purpose of redundancy: stretch MTBF

7

Page 8: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

ASM terminology ASM instance Diskgroup Disk Failgroup AU (allocation unit)

8

Page 9: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 10: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 11: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 12: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 13: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 14: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 15: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 16: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 17: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 18: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

Oracle Managed Files First appeard in version 9 Goal: easy database files management Did never gain wide acceptance (AFAIK)

Re-introduced with ASM

18

Page 19: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 20: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 21: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

ASMLib Support library for ASM

–Kernel module

Disks for ASM can be used in three ways:–Raw devices–Block devices–ASMLib devices

21

Page 22: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 23: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 24: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 25: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 26: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 27: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 28: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 29: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

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

Page 30: Automatic Storage Management UKOUG RAC & HA … · Automatic Storage Management UKOUG RAC & HA SIG September 30, 2010 Frits Hoogland 1. Poll ... –Clusterware files –Can be accomplished

Q & A

30