Sie sind auf Seite 1von 92

B

O r a c l e C e r t i f i e d P a r t nData Softech Incorporation. er

AGENDA
ASMOverview ASMUsers/Privileges/Diskgroup ASMDynamicVolumeManager(ADVM) ASMClusterFileSystems(ACFS) ACFSSnapshots ASMFileAccessControlLists(ACLs) ASMIntelligentDataPlacement(IDP) Sector4KSupport Q&A

Data Softech Incorporation.

ASM OVERVIEW

Data Softech Incorporation.

AUTOMATICSTORAGEMANAGEMENTASM I/O Performance Stripingallowseec4veI/O tuning Tuning Data Automa4cDatabaseFile Management Reorganiza4on

Simplies administra4onof Oraclerelatedles. Ahighperformance storagemanagement solu4on.

File Naming

EnablesDatabaseObjects Management

Storage LogicalVolume,Filesystem,CFS Management andRawDeviceManagement

Data Softech Incorporation.

ASMAUTOMATICMEMORYMANAGEMENT

TouseASM,youneed ASMinstancebefore RDBMSinstance ContainsSGAand backgroundprocesses UseAMMbydefault. Defaultto256MB memorytarget. Increasesautoma4cally ifsetforalowervalue.

Data Softech Incorporation.

ASMINSTANCE ASMINSTANCEMEMORYCOMPONENTS Shared Pool Large Pool ASM Cache Free Memory Storesmetadata informa4on

ParallelOpera4ons DuringRebalance Opera4on,reading andwri4ngblocks Availablefreespace thatisunallocated

Data Softech Incorporation.

ASMBACKGROUNDPROCESSES

ThebackgroundprocessesforASM instancedonotperformthesametask astheydoindatabaseinstance. Example: DatabaseInstanceLGWR,theLog Writerprocesscopieschangedvectors fromSGALogBuertotheonlineredo logs. ASMInstance LGWR,theLogWriterprocesscopies logginginforma4ontoanASMdisk group.

Data Softech Incorporation.

ASMINSTANCEPROCESSES

RBAL ARBn GMON MARK

Coordinatesrebalanceac4vityforASMdiskgroups. RebalancesdataextentswithinanASMdiskgroup. Monitorsallthediskgroupsmountedandmaintain consistentdiskmembership. MarksASMalloca4onunitsthatrequire resynchroniza4onifmissedwritetoanoinedisk.

Data Softech Incorporation.

ASMINSTANCEPROCESSES

ACFS DBWn LGWR

ARBn DIAG MARK

ARCn DRnn

Bnnn

CKPT

GMON Jnnn

MMAN MMON OCFn PSPO VMB0 QMNn XDMG RECO Xnnn CLUSTERPROCESSES LMON LMDn LMSn LCKn

PMON PRnn SMON VKTM

Data Softech Incorporation.

ASMINITIALIZATIONPARAMETERS ASM_DISKGROUP ASM_DISKSTRING ASM_POWER_LIMIT INSTANCE_TYPE PROCESSES REMOTE_LOGIN_PASSWORDFILE DB_CACHE_SIZE DIAGNOSTIC_DEST LARGE_POOL_SIZE SHARED_POOL_SIZE
ListDiskgrouptomountatASMinstancestartup Speciestheloca4onofdisksforASMdiscovery ControlstheworkersforDiskgrouprebalancing MANDATORYasiden4fythatitisASMorRDBMS instance Speciestheprocessallowed.Use50+50*n seeng speciesthatASMinstancecheckforpassword lelikeRDBMSinstance ControlstheASMCachewhichstoresmetadata blocks.Takefromoneofthepreviousslide Loca4onofADR Usedforlargealloca4ons Determinestheamountofmemoryrequiredto managetheinstance

Data Softech Incorporation.

ASMENHANCEMENTSOVERVIEW

ASMManagesOracleDatabase Files ADVMvolumemanager capabili9es ACFSManagesleotherthanASM managedles ADVM&ACFSEliminatesneedfor separateCFS 3rdPartyFileSystemonASM Volumes NewGraphicalASMCAfor managingASM NewCommandLineInterfaceto manageASMusingASMCMD

APPLICATION

DATABASE

ACFS

3RD PARTY FS

ASM/ADVM

OPERATING SYSTEM

Data Softech Incorporation.

DATABASEANDASMINSTANCEINTERACTION

Adatabaseinstancemust interactwithASMtomap databaselestoASM extents. ASMopera4onssuchas diskrebalancing con4nuouslysendstream ofmessagestodatabase instance. DatabaseconductsI/O opera4onsdirectlyagainst ASMles.

Data Softech Incorporation.

ASMRDBMSFILECREATIONSFLOW

CreateDATAFILErequest Allocation

DatabaseRequestforaddingDataletothe Tablespace.

ASMforegroundprocesscreatesaCon9nuing Opera9onDirectoryorCODentryand allocatesspaceforthenewleacrossthedisk group. TheCODisanalogoustoanundotablespace whichmaintainsthestateofac9veASM opera9onssuchasdiskordataledrop/add. TheCODlogrecordiseithercommiIedor rolledbackbasedonthesuccessofthe opera9on.

ExtentsMapsinforma4on

The ASMB database process receives an extent map for the new file.

Data Softech Incorporation.

ASMRDBMSFILECREATIONSFLOW

Ini4aliza4on

Thedatabaseprocessini9alizestheledirectly astheleisopen.

Commit CleartheCODentry

The database process requests the file created to be committed. As a result, foreground processes clear the COD entry and mark the file as created.

CloseCalls

Thecommitisacknowledgedandtheleis closed.Forfutureuse,thelehastobere opened.

Data Softech Incorporation.

ASM USER MANAGEMENT

Data Softech Incorporation.

ASMPRIVIEGES:SYSOPER

ASMinstancehavenouserdic4onaryand soonlywaytoconnectisOS authen4ca4onwithSYSDBA/SYSOPER/ SYSASMprivileges


STARTUP/SHUTDOWN ALTER DISKGROUP MOUNT/DISMOUNT ALTER DISKGROUP ONLINE/OFFLINE DISK ALTER DISK REBALANCE ALTER DISKGROUP CHECK
Access to all V$ASM_* views
(notAvailableinOracle11g)

Data Softech Incorporation.

ASMPRIVIEGES:SYSDBA

ALLSYSOPER(RHS)
CREATE DISKGROUP ADD/DROP/RESIZE DISK

STARTUP/SHUTDOWN ALTER DISKGROUP MOUNT/DISMOUNT ALTER DISKGROUP ONLINE/OFFLINE DISK ALTER DISK REBALANCE ALTER DISKGROUP CHECK
Access to all V$ASM_* views

Data Softech Incorporation.

ASMPRIVIEGES:SYSASM

ALLSYSOPER(RHS)
CREATE DISKGROUP ADD/DROP/RESIZE DISK CREATE USER

ALLOpera4ons

STARTUP/SHUTDOWN ALTER DISKGROUP MOUNT/DISMOUNT ALTER DISKGROUP ONLINE/OFFLINE DISK ALTER DISK REBALANCE ALTER DISKGROUP CHECK

Access to all V $ASM_* views

By Default SYS has SYSASM privilege


Data Softech Incorporation.

USERADDITIONSINASM
SQL> CREATE USER indy IDENTIFIED BY indy; SQL> GRANT SYSDBA to indy;
$ asmcmd orapwusr --add --privilege sysasm indy Enter password: ****

SQL> SELECT * FROM v$pwfile_users;


USERNAME ---------------------SYS ASMSNMP INDY SYSDBA SYSOPER SYSASM ------ ------- -----TRUE TRUE TRUE TRUE FALSE FALSE FALSE TRUE FALSE

$ asmcmd lspwusr Username sysdba sysoper sysasm SYS TRUE TRUE TRUE ASMSNMP TRUE FALSE FALSE INDY FALSE FALSE TRUE

SQL> DROP USER indy;


$ asmcmd orapwusr --delete indy

Data Softech Incorporation.

NEW11GASMUSERANDPRIVIEGES

Duringinstalla9on,theASMSNMPuserwithSYSDBAprivilegesiscreatedfor monitoringtheOracleASMinstance
SYSASM -----TRUE FALSE

SQL> select * from v$pwfile_users; USERNAME SYSDBA SYSOPER ---------------------- ------ ------SYS TRUE TRUE ASMSNMP TRUE FALSE

InASMCMD

Useaop9ontoconnectasSYSDBAorSYSASM SYSASMisthedefault.

ToconnectwiththeSYSDBAprivilege,usethefollowingsyntax: asmcmd a SYSDBA

Data Softech Incorporation.

ASM DISKGROUP

Data Softech Incorporation.

ASMDISKGROUPANDLAYERS

ASMsupport63DiskGroups. Eachdiskgroupcontains associatedmetadatainforma4on. SingleDiskgroupcanhavedata frommul4pleDBinstances Thecontentsinadiskgroupare evenlystripedordistributed acrossthedisks,elimina4ngany hotspots, NoMirroring/DoubleMirroring/ TripleMirroringallowed

Data Softech Incorporation.

ASMSTORAGEFACTS
Storage System
63diskgroups

Coarsegrainstriping Spreadstheextentsinto1MAU. StripingisdoneatAUlevel Finegrainstriping Spreadstheextentsinto128KB Usedforcontrol/onlineredologles.

Oracle Exadata Storage


4PBforeach ASMdiskusing OracleExadata 2PBforeach ASMdisk,not usingOracle Exadata

Maximum FileSize
1millionles foreachdisk group. 40PBstorage, usingOracle Exadata 20PBstorage, notusing OracleExadata

10,000ASM disks

FileExtentSize

EqualsAUsizefortherst20,000 extentsets.From0to19,999 Equals4*AUsizeforthenext20,000 extentsets.From20,000to39,999 Equals16*AUsizeforthenext 20,000andhigherextentsFrom 40,000andabove.

140PB External Redundancy ASMMaximumFilesize Limitwhen1MBAUsize.

15PBHigh Redundancy

42PBNormal Redundancy

Data Softech Incorporation.

ASMDISKGROUPFAILUREGROUPS

Failuregroupsare collec4onsofdisksthat storemirrorcopiesofdata. Failuregroupcanbeusedto protectfromthefailureof individualdisks,disk controllersetc.

Example Alldisksaoachedtosinglecontrollercouldbewithinasinglefailure group(Default). Fileextentscanbemirroredondisksconnectedtoseparatecontrollers. Administratorcanchoosedierentfailuregrouppolicythanthedefault one.


Data Softech Incorporation.

ASMDISKGROUPFAILURERECOVERY Normalredundancydiskgroupswith8disksin totalarespreadacross2failuregroups.

Data Softech Incorporation.

ASMDISKGROUPCOMPATIBILITY

ASMCompa4bility
Minimumsoqwareversion requiredbyOracleASMtousea diskgroup. Aectsthedatastructures formatfortheOracleASM metadataonthedisk. ASMcompa4bilitylevelshould begreaterthanRDBMS compa4bilitylevelofthesame diskgroup.

RDBMS Compa4bility
MinimumCOMPATIBLE databaseini4aliza4on parameterseengforany databaseinstancethatusesthe ASMdiskgroup. COMPATIBLEparametertoat leastthevalueorgreaterthan theCOMPATIBLE.RDBMS Databasenego4atewithhighest soqwareversiononbothsides.

ADVM Compa4bility
Determineswhetherthedisk groupcancontainOracleASM volumes. TheCOMPATIBLE.ASMvalue mustbe11.2orhigher.Then ADVMCompa4bilityvaluemust besetto11.2orhigher. ADVMvolumedriversmustbe loaded.

Data Softech Incorporation.

ASMCHECKDISKLIKEFSCKUNIXCOMMAND CHECKkeywordOpera4ons
ALTER DISKGROUP <dg> CHECK [ REPAIR | NOREPAIR ]

Checksdiskconsistency EquivalenttoCHECKDISKandCHECKDISK INFAILGROUPinpreviousreleases. EquivalenttoCHECKFILEthatchecksall theleextentmapsandalloca4ontables forconsistencyinpreviousreleases. Ensureconnec4onbetweenthealias metadatadirectoryandtheledirectory Checksforlinkofthealiasdirectory CheckswhetherASMmetadata directoriesdonotpossessunreachable blocks.

Note:Theclauseinearlier versionthatcouldbeusedfor ALL,DISK,DISKSINFAILGROUP andFILEhavebeendeprecated. Checkwithrepairornorepair clauseenablesASMtoxerrors automa4callyornot.

Data Softech Incorporation.

ASMDISKGROUPDROP

TheDROPDISKclauseallowstodrop oneormoredisksfromthediskgroup. Automa4callyrebalancethediskgroup. TheDROPDISKSINFAILGROUPclause allowstodropallthedisksinthe speciedfailuregroup. DropdisksaremarkedasFORMER Beforedroppingadiskgroup,ASM instancechecks:

Ifdiskgroupismountedelsewhere Ifdiskgroupisbeingusedbyanyother ASMinstance Ifdiskgroupisonanotherclusterandis mountedbyaninstanceinthatcluster

Data Softech Incorporation.

CONFIGURINGDISKGROUPUSINGASMCA

Data Softech Incorporation.

CONFIGURINGDISKGROUPUSINGEM

Data Softech Incorporation.

CONFIGURINGDISKGROUPUSINGSQL*Plus CREATEDISKGROUPACFSNORMALREDUNDANCY FAILGROUPACFS2 DISK'ORCL:DATA7'SIZE512M,'ORCL:DATA8'SIZE512M FAILGROUPACFS1 DISK'ORCL:DATA5'SIZE512M,'ORCL:DATA6'SIZE512M ATTRIBUTE'compa9ble.rdbms'='11.2.0.0.0', 'compa9ble.asm'='11.2.0.0.0', 'compa9ble.advm'='11.2.0.0.0';

Data Softech Incorporation.

CONFIGURINGDISKGROUPUSINGASMCMD
<<<<<dg_cong.xmlle>>>>> <dgname="data"redundancy="normal"> <fgname="fg1"> <dskstring="/dev/disk1"/> <dskstring="/dev/disk2"/></fg> <fgname="fg2"> <dskstring="/dev/disk3"/> <dskstring="/dev/disk4"/></fg> <aname="compa9ble.asm"value="11.2"/> <aname="compa9ble.rdbms"value="11.2"/> <aname="compa9ble.advm"value="11.2"/> </dg>

asmcmdmkdgdg_cong asmcmddropdgrdata

Data Softech Incorporation.

CONFIGURINGDISKGROUPUSINGASMCMD

Command
chkdg dropdg mkdg mount Umount lsattr setattr rebal

Description
Checks or repairs a disk group Drops a disk group Creates a disk group Mounts a disk group Dismounts a disk group Lists the attributes of a disk group Sets attributes in a disk group Rebalances a disk group

Data Softech Incorporation.

ASMATTRIBUTES ThexedviewV$ASM_ATTRIBUTEletsyouchecktheaoributes. Name au_size Property Create, Alter Create, Alter Values 1,2,4,8,16,32MB Description Allocation unit size in the disk group Length of time before removing a disk once offline.

disk_repair_time

0 M to 2 to the power 32 D

Disk Group Attributes can be set in different ways. SQL statements:


ALTER DISKGROUP data1 SET ATTRIBUTE compatible.rdbms=11.2.0.0.0;

ASMCMD: ASMCMD> setattr -G data compatible.rdbms 11.2.0.0.0 Oracle ASM Configuration Assistant (ASMCA)

Data Softech Incorporation.

ASMDISKGROUPREPAIRTIME

Data Softech Incorporation.

ASMCMDcpCOMMAND
cp +DATA/ORCL/DATAFILE/data1.111.11111111 +DATA/ORCL/data1.orig CopylebetweenASMdiskgroupsonlocalinstances.

cp +DATA/ORCL/DATAFILE/data1.111.11111111 /backup/oracle/data1.dbf CopyanASMletoyouropera4ngsystem.

cp /u01/oradata/orcl/data1.dbf +data/indy Copyalefromyouropera4ngsystemtoanASMdirectory. cp +DATA/orcl/datafile/d1.111.111111 sys@db2.+ASM2:+DATA2/ips/da.dbf CopyanASMlefromyourlocalASMInstancetoaremoteInstance.

Data Softech Incorporation.

ASMDISKGROUPMETADATABACKUPMD_BACKUP
The md_backup command creates a backup file containing metadata for one or more disk groups. Syntax md_backup backup_file [-G 'diskgroup [,diskgroup,...]']

ASMCMD [+] > md_backup /backup/alldgs Disk group metadata to be backed up: DATA Disk group metadata to be backed up: FRA Current alias directory path: ORCL/ONLINELOG Current alias directory path: ORCL/PARAMETERFILE Current alias directory path: ORCL Current alias directory path: ASM .

Data Softech Incorporation.

ASMDISKGROUPMETADATARESTOREMD_RESTORE
The md_restore command restores disk groups from a metadata backup file. Syntax md_restore backup_file [--silent] --full | --nodg | --newdg -o 'old_dg:new_dg -S sql_script_file -G 'diskgroup [,diskgroup...]'] .. ASMCMD [+] > md_restore alldgs20100422 ASMCMD [+] > md_restore alldgs20100422 ASMCMD [+] > md_restore scratch/backup/datadg ASMCMD [+] > md_restore datadg -full G data -silent /backup/ -nodg G data -silent /backup/ -newdg -o 'data:data2' --silent / -S override.sql --silent /backup/

Data Softech Incorporation.

ASM BASED OCR/VOTING DISK


OCR

VOTING

Data Softech Incorporation.

OCR

OCR/VOTINGDISKONASM REDUNDANCY
External Normal High

VOTING

Minimum # of Disks
1 2 3

OCR Files
280 M 560 M 840 M

REDUNDANCY
External Normal High

Minimum # of Disks
1 3 5

Voting Files
280 M 840 M 1.4 G

Failover
None Can Survive one Failure Can Survive 2 Failure

Note:MovingVo4ngDisktoASM Anormalredundancydiskgroupmustcontainatleasttwofailuregroups butifyouarestoringyourvo4ngdisksonOracleASM, thenanormalredundancydiskgroupmustcontainatleastthreefailuregroups

Data Softech Incorporation.

OCR

OCR/VOTINGDISKONASM
Voting disk are managed with crsctl How to Add/Migrate Voting disk to an ASM disk group named VOTE:

VOTING

# crsctl replace votedisk +VOTE


Add/Delete an OCR location to either ASM or other storage device To remove an OCR location at least one OCR must be online

# ocrconfig -add +DATA2 # ocrconfig -delete +DATA2

To replace the current OCR location

# ocrconfig -replace /dev/sde1 -replacement +DG2

Data Softech Incorporation.

ASM DYNAMIC VOLUME MANAGER


OS view

ASM disk

ASM disk group

ASM volume file

Data Softech Incorporation.

ASMDYNAMICVOLUMEMANAGER Database RAC Application 3rd Party FS

A S M D
I S K G

ASM Instance Managing Oracle DB Files

ACFS Snapshot ACFS Cluster/Single Node Dynamic Volume Manager General Purpose Files Dynamic Volumes
ACFS FS 3rd Party FS

Database/ASM Files
DB Files OCR/Voting Files

ASM Disk

ASM Disk ASM Disk ASM Disk ASM Disk

R O
Data Softech Incorporation.

ADVM/ACFS

Data Softech Incorporation.

ACFSANDADVMARCHITECTURE
ASM Cluster File System 3rd Party File System

OS view

mkfs, mount,

ASM Dynamic Volume /dev/asm/Volname-id


VDBG VBG# VMB

SQL, ASMCA, EM, ASMCMD


ASM disk

ASM disk

ASM disk

ASM disk

ASM view ASM disk group

ASM volume file

Data Softech Incorporation.

NEWADVMBACKGROUNDPROCESS
VolumeDriverBackground(VDBG) ForwardASMRequesttoADVMdrivertoperformVolumeRelatedtaskslike ToAdd/Drop/OineaDisk ResizetheVolume Lock/Unlockextentforrebalancing DismounttheDiskgroup FatalprocessandunplanneddeathcanstoptheASMinstance $ ps -ef|grep vdbg grid 11746 1 0 Apr18 ? 00:00:00 asm_vdbg_+ASM
SQL, ASMCA, EM, ASMCMD
ASM disk

ASM Dynamic Volume


VDBG VBG# VMB

ASM disk

ASM disk

ASM disk

ASM view ASM disk group

ASM volume file

Data Softech Incorporation.

NEWADVMBACKGROUNDPROCESS
VolumeBackground(VBGn)wheren=09 TakeRequestfromADVMdriverandsendtoASMInstancelike Open/CloseaVolume(duetoFSmount/UmountRequest) UnplanneddeathhasnoeectonASMinstanceAutoma9cRestart $ ps -ef|grep vbg grid 11699 grid 11750 grid 11752 1 1 1 0 Apr18 ? 0 Apr18 ? 0 Apr18 ? 00:00:00 asm_vbg0_+ASM 00:00:00 asm_vbg1_+ASM 00:00:00 asm_vbg2_+ASM
SQL, ASMCA, EM, ASMCMD
ASM disk

ASM Dynamic Volume


VDBG VBG# VMB

ASM disk

ASM disk

ASM disk

ASM view ASM disk group

ASM volume file

Data Softech Incorporation.

NEWADVMBACKGROUNDPROCESS
VolumeMembershipBackground(VMB) MaintainsClusterMembershiponbehalfofASMvolumedrivewithASMinstance ProvidesIObarrier/fencingfunc9on Con9nuestoexistaoerASMinstancefailureun9lADVMdriverhadachancetowriteout pendingIO

$ ps -ef|grep asm_vm grid 11748 1

0 Apr18 ?

00:00:00 asm_vmb0_+ASM

ASM Dynamic Volume


VDBG VBG# VMB

SQL, ASMCA, EM, ASMCMD


ASM disk

ASM disk

ASM disk

ASM disk

ASM view ASM disk group

ASM volume file

Data Softech Incorporation.

ACFSANDADVM
ACFSandADVMcomponentsareintegratedwithotherASMcomponentsinGRID infrastructurehome AnASMvolumeisanASMlewhichinheritsASMdiskgroupproper9es YoucanCreateMul9pleVolumefromSameDiskgroupfornewFilesystem Thevolumedevicelenamesareuniqueclusterwideandpersistentacrossallnodesinthe clusterthathaveanASMinstancerunningwiththediskgroupmountedandvolumesenabled. EachVolumeisconguredforSingleFilesystem. ADVMvolumescannotbeusedasabootdeviceorarootlesystem.

ACFS Supports files like Executables Report Files BFILE ORACLE_HOME

Trace Files Alert Logs EXTERNAL TABLES

Application Files Cluster/Single Node UTL_FILE

ACFS do not support file like Grid Infrastructure Home

ORACLE_BASE directory

OS root directory

Data Softech Incorporation.

ADVMSPACEALLOCATION
Diskgroupsmallestalloca4onisAU(Alloca4onUnit) Volumesmallestalloca4onSpaceisVAU(VolumeAlloca4onUnit) VAU=VolumeExtentSize*StripeColumn VolumeExtentSizeisbasedonAU Default1MAUhasVolumeExtentSizeof64M EachvolumeExtentisallocatedroundrobinondierentdisk(each onthenextdiskinthediskgroup) StripecolumnisnumberofvolumeextentsallocatedineachVAU Rangefrom18 Defaultis4 Example: Valueof1meansvolumestripingisturnedo If the stripe column =4 and the AU = 1 MB, Then volume extent = 64 MB Hence VAU will be (64 * 4)256 MB.

Data Softech Incorporation.

STRIPINGINSIDETHEVOLUME
ASMCMD [+] > volcreate -G data -s 10G --width 16K --column 4 volume1

Creating new 160 Kb file in the file system

All the files will be stored in pieces the size of stripe width Pieces are spread across the disk in the diskgroup

16K * 4 = 64K
Stripe Column 4, Stripe Width 16K

16K * 8 = 128K
Stripe Column 4, Stripe Width 16K

16K * 10 = 160K
Stripe Column 4, Stripe Width 16K

Data Softech Incorporation.

STRIPINSINSIDETHEVOLUME Weaddanotherleof60Kb,thenitwillbeallocatedasshownbelow

16K * 2 = 32K
Stripe Column 4, Stripe Width 16K

16K * 4 = 64K
Stripe Column 4, Stripe Width 16K

Data Softech Incorporation.

ACFSVOLUMEPREREQUISITES
compatible.asm' = '11.2'; compatible.advm' = '11.2'; acfsload start s only

AS ROOT for ORACLE RESTART

# lsmod | egrep "oracle|Module" Module Size Used by oracleacfs 877192 0 oracleadvm 221504 5 oracleoks 277008 2 oracleacfs,oracleadvm

Data Softech Incorporation.

CREATINGACFSVOLUMEUSINGSQL*Plus
Pre-Requisite ALTER DISKGROUP data SET ATTRIBUTE 'compatible.asm' = '11.2'; ALTER DISKGROUP data SET ATTRIBUTE 'compatible.advm' = '11.2'; Manage Oracle ADVM volumes ALTER DISKGROUP ... ADD | RESIZE |DROP | ENABLE | DISABLE VOLUME Create Volume SQL> ALTER DISKGROUP DATA_DG ADD VOLUME volume1 SIZE 100G; Resize Volume SQL> ALTER DISKGROUP DATA_DG RESIZE VOLUME volume1 SIZE 105G; Drop Volume SQL> ALTER DISKGROUP DATA_DG DROP VOLUME asmvol1; Enable/Disable Volume SQL> ALTER DISKGROUP DATA_DG ENABLE VOLUME asmvol1; SQL> ALTER DISKGROUP ALL DISABLE VOLUME ALL;

Data Softech Incorporation.

CREATINGACFSVOLUMEUSINGASMCMD

PreRequisiteCOMPATIBLE.ADVMmustbe11.2.0orhigher
asmcmd setattr -G DATA_DG compatibility.advm 11.2.0.0.0 ASMCMD VOLCREATE|VOLDELETE|VOLDISABLE|VOLENABLE|VOLINFO| VOLRESIZE Createthevolume(needSYSDBAonASMinstance) $ asmcmd volcreate -d DATA_DG -s 100G VOLUME1 Viewthevolumeinforma9on: $ asmcmd volinfo d DATA_DG VOLUME1 Makeamountpointdirectory: $ mkdir /u01/acfsdata/volume1 Makethelesystem(asroot): # mkfs -t acfs /dev/asm/volume1-111 Mountthelesystemtothemountpoint: # mount -t acfs /dev/asm/volume1-111 /u01/acfsdata/volume1 OnlyOnelesystemperVolume OnlyACFSissupportedforClusterFilesystem

Data Softech Incorporation.

CREATINGACFSVOLUMEUSINGASMCMD

Command
Volcreate Voldelete Voldisable Volenable Volinfo Volresize Volset Volstat

Descrip4on
CreatesanOracleADVMvolumeinthespecieddiskgroup DeletesanOracleADVMvolume DisablesOracleADVMvolumesinmounteddiskgroups EnablesOracleADVMvolumesinmounteddiskgroups Displaysinforma4onaboutOracleADVMvolumes ResizesanOracleADVMvolume SetsaoributesofanOracleADVMvolumeinmounteddiskgroup ReportsvolumeI/Osta4s4cs

Data Softech Incorporation.

CREATINGACFSVOLUMEUSINGEM

Data Softech Incorporation.

CREATINGACFSVOLUMEUSINGEM

Data Softech Incorporation.

CREATINGACFSVOLUMEUSINGEM

Data Softech Incorporation.

CREATINGACFSVOLUMEUSINGASMCA

Data Softech Incorporation.

CREATINGACFSVOLUMEUSINGASMCA

Data Softech Incorporation.

ASM CLUSTER FILESYSTEM


OS view

ASM disk

ASM disk group

ASM volume file

Data Softech Incorporation.

ACFSASMCLUSTERFILESYSTEM

ScalableGeneralpurposelesystem

Mul9OSSupport SupportClusteraswellasSingleNode Supportslargeleswith64bitle POSIX/XOPENcompliantlesystem

ACFSlesystemscanbeexportedtoremoteclientsthroughNASprotocolssuch asNFSandCIFS. Eliminatestheneedforexpensivethirdpartyclusterlesystemsolu9ons ACFSsupportsdynamiclesystemexpansion/Shrinkwithoutanydown9me. ACFSishighlyavailableu9lizingASMmirroringandstripingfeatures ExtendASMtosupportlesoutsideofOracleDatabase ACFScanbemanagedwithtoolsfamiliartotheDBA:EnterpriserManager, SQL*Plus,ASMCMD,ASMCA

Data Softech Incorporation.

ACFSMOUNTREGISTRY

OSIndependent,Mul9platormmountregistra9onfacility FilesystemsthataretobemountedpersistentlycanberegisteredwithOracle ACFSmountRegistry Useacfsu9lregistrycommandtoregisterthelesystem

Data Softech Incorporation.

ACFSSUPPORT
UserCommands chgrp ar Chmod Cat chown dd AdminCommands fsck umount

df Cp mv

diff Du pwd

find fuser more

gzip Grep tar

rm Rmdir tail

mount

mkfs

Data Softech Incorporation.

ACFSADMINUNIXCOMMANDS
CreateanACFSlesystemCommands mkfs[vf]tacfs[bblksz][nname]device[blocks] e.g. # mkfs -t acfs /dev/asm/vol1-nnn Moun4nganACFSlesystem mount[v]tacfs[oop4ons]devicedir e.g. # mount -t acfs /dev/asm/vol1-nnn UnmountanACFSlesystem # umount [-v] device|dir CheckandrepairanACFSlesystem fsck[avnf]tacfs[info]device e.g. # fsck -t acfs /dev/asm/vol1-nnn

/oracle/cluster1/myacfs

Data Softech Incorporation.

ACFS - SNAPSHOTS

Data Softech Incorporation.

ACFSSNAPSHOTS Readonly,LowoverheadusingCopyonwritetechnology Pointin9mecopiesofACFSles BeforeACFSleextentmodied/Deleted,currentvalue copiedtoSnapshot Ituseadirectoryonthesamevolume Availableimmediatelyforuseraoercrea9on Alwaysonlinewhenlesystemismounted SpaceEcient.Whenasnapshotiscreated SetofMetadataaboutvolumeiscreated DirectoryStructure Namesofallles SharelesystemblockwithoriginalFilesystemun9la lechanges UsingPointerstoblocks
Data Softech Incorporation.

ACFSSNAPSHOTS Administered using acfsutil snap command or EM Snapshotallowsto: Revertlestotheversionatthe9meofthe snapshot Recoveradeletedle Backupaconsistentdataset Arelimitedto63snapshotviewspervolume Policybasedsnapshots: Schedulesnapshotsonanintervalbasis:every5 seconds,every30minutes,daily,withrecycling (usingEM) ACFSCLIssupportcrea9onandremovalofsnapshots ACFSSnapshotfunc9onsintegratedwithEM

Data Softech Incorporation.

ACFSSNAPSHOTSADMINISTRATIONacfsu4l CreateanACFSsnapshots acfsutil snap create snap1 /u01/app/oracle/acfsdata/ testsnap1 acfsutil snap create: Snapshot operation is complete DeleteACFSsnapshots acfsutil snap delete snap1 /u01/app/oracle/acfsdata/ testsnap1 View/SearchFileSystemincludingSnapshots acfsutil info fs /u01/app/oracle/acfsdata/testsnap1 ViewthenameofthesnapshotsOScommand ls l /u01/app/oracle/acfsdata/testsnap1/.ACFS/snaps

Data Softech Incorporation.

ACFSSNAPSHOTSADMINISTRATIONacfsu4l
acfsu9linfofs/u01/app/oracle/acfsdata/testvol u01/app/oracle/acfsdata/testvol ACFSVersion:11.2.0.1.0.0 ags:MountPoint,Available mount9me:WedJul112:00:102009 volumes:1 totalsize:268435456 totalfree:163360768 primaryvolume:/dev/asm/testvol403 label: ags:Primary,Available,ADVM ADVMstripewidth:131072 numberofsnapshots:1 snapshotspaceusage:32768 ls/u01/app/oracle/acfsdata/testvol/.ACFS/snaps
V$ASM_ACFSSNAPSHOTS FS_NAMETheACFSmountpoint DEVICE_NAMEThedevicename SNAPSHOT_NAMESnapshotNamewhichisavaliddirectoryname SPACE_USED_GBSpaceusedbythesnapshotinGB CREATION_TIMETheOmeatwhichthesnapshotwascreated

Data Softech Incorporation.

ACFSSNAPSHOTSADMINISTRATIONEM

Data Softech Incorporation.

ASM - ACL ACCESS CONTROL LIST

Data Softech Incorporation.

ASMACLACCESSCONTROLLIST]

Providesop9onalprotec9on/permissionatASMlelevel RestrictAccesstoASMlestoASMclientslikeuserwhoownsdatabaseHome TheyareavailableonlyonLinuxandUNIXopera9ngsystems SetDiskGroupAIributesbeforecrea9nglesinitorsetexplicitlypermission andownershiponExis9ngles NeedtohavefollowingaIributessetatcorrespondingdiskgroup COMPATIBLE.ASMto11.2orhigher COMPATIBLE.RDBMSto11.2orhigher ACCESS_CONTROL.ENABLEDtoTRUE(DefaulttoFALSE). ACCESS_CONTROL.UMASKtoamaskvalue(Defaultto066)
Introduced3classofpermissionatlelevel Thereare3Levelsofpermissionperclassdened above

Owner

Group

Other

READWRITE Valueof6

READONLY Valueof4

NONEvalueof 0

Data Softech Incorporation.

MANAGINGACLWITHACL
AnyuserwiththeSYSDBAorSYSASMprivilegemaycreategroups ALTER DISKGROUP ADD USERGROUP ... WITH MEMBER TocreateausergroupACL ALTER DISKGROUP DG_DATA ADD USERGROUP db1_grp WITH MEMBER oracle1,oracle2; YoucannowchecktheusergroupfromV$ASM_USERGROUP Each user must already exist and can be checked using the following query SQL> SELECT OS_NAME FROM V$ASM_USER; OS_NAME --------oracle1 Oracle2 Some more useful commands to manage ASM ACL are : SQL> ALTER DISKGROUP data SET PERMISSION OWNER=read write, GROUP=read only,OTHER=none FOR FILE '+data/controlfile.f'; Youcannotchangethepermissiononanopenle. OnlyFileownerorASMAdmincanchangethepermissionofale

Data Softech Incorporation.

MONITORINGACLWITHSQL
SQL> ALTER DISKGROUP data SET OWNERSHIP OWNER='oracle1', GROUP='test_grp1 FOR FILE '+data/controlfile.f'; Makesuretheusergroupnamemustexist,andtheownerofthele mustbeamemberofthatgroup. Youcannotchangetheownershipofanopenle. OnlyFileownerorASMAdmincanchangethepermissionofale

Data Softech Incorporation.

MONITORINGACLWITHASMCMD
asmcmd chmod ug+rw +DATA/orcl/controlfile/current.111 asmcmd chown oracle1:asm_users +DATA/orcl/controlfile/ current.111 Command mkusr rmusr chown lsusr mkgrp rmgrp chgrp lsgrp Descrip4on Addsausertodiskgroup Deletesauserfromadiskgroup Changestheownerofale(s) Listsusersinadiskgroup Createanewusergroup Deletesausergroup Changestheusergroupofale(s) Listsusergroups

Data Softech Incorporation.

MONITORINGACLWITHEM

Data Softech Incorporation.

INTELLIGENT DATA PLACEMENT


Frequently Accessed Data Infrequently Accessed Data

Data Softech Incorporation.

INTELLIGENTDATAPLACEMENT[IDP]

Data Softech Incorporation.

INTELLIGENTDATAPLACEMENTSQL*Plus
CreateTemplateIDPTEST SQL> ALTER DISKGROUP dgdata ADD TEMPLATE IDPTEST ATTRIBUTES (HOT MIRRORHOT); CreateTablespaceusingaboveTemplateIDPTEST SQL> CREATE TABLESPACE hotidp DATAFILE '+dgdata(idptest)'; AssignFilestoDiskRegionsusingleATTRIBUTES ALTER DISKGROUP dgdata MODIFY FILE '+dgdata/orcl/ datafile/users.259.679156903' ATTRIBUTES (HOT MIRRORHOT);
Abovecommanddoesnotini4ateExtentmovement Howevernewextentsareallocatedaccordingtonewzones YoucansetIDPforonlynewles. Exis4nglesmustgothrougharebalanceopera4ontoleverageIDP.

AssignFilestoDiskRegionsusingleATTRIBUTES SQL> ALTER DISKGROUP dgdata REBALANCE POWER 5;

Data Softech Incorporation.

INTELLIGENTDATAPLACEMENTEM

Data Softech Incorporation.

INTELLIGENTDATAPLACEMENTASMCA

Data Softech Incorporation.

INTELLIGENTDATAPLACEMENTEM IDPCOLDREGION

IPDHOTRegion

Data Softech Incorporation.

INTELLIGENTDATAPLACEMENTVIEWS

Useperformanceviewstoselectthecandidateles:

V$ASM_FILE PRIMARY_REGION:Regionusedforalloca9ngprimaryextents(HOT| COLD)MIRROR_REGION:Regionforalloca9ngmirroredextents (HOT|COLD) V$ASM_DISK_IOSTAT ProvidesI/Osta9s9csforthehotandcoldregions V$ASM_DISKGROUP HOT_USED_MB:Numberofusedmegabytesinthehotregion COLD_USED_MB:Numberofusedmegabytesinthecoldregion ReviewAutoma9cWorkloadRepository(AWR)reportsbeforeand aoermakingachange. UseV$FILEMETRICandV$FILEMETRIC_HISTORY

Performancebenetcanbeveriedbytes9ng.

Data Softech Incorporation.

INTELLIGENTDATAPLACEMENTGUIDELINES ReadFrequency High High Low Low WriteFrequency High Low High Low Primaryregion HOT HOT COLD COLD Secondaryregion MIRRORHOT MIRRORCOLD MIRRORHOT MIRRORCOLD

Frequently Accessed Data

Infrequently Accessed Data

Data Softech Incorporation.

ASM 4K SUPPORT

Data Softech Incorporation.

ASMSUPPORTFOR4KSECTORDISK

Newop9onalSECTOR_SIZEforCREATEDISKGROUP ATTRIBUTESECTOR_SIZE IfomittheSECTOR_SIZE,ASMwillusedefaultHardwaresectorsizeanduseit ValuesforSECTOR_SIZEcanbe512or4K OraclecheckthatalldisksforDISKGROUPhasiden9calsectorsizeandfailtocreate diskgroupformismatch Oraclealsochecknewdiskaddedtodiskgrouphasiden9calsectorsize ACFSdoesnotsupport4KBsectordisks Restric9onsonredologles: TheBLOCKSIZEredologleandtheSECTOR_SIZEdiskgroup
SQL> ALTER DATABASE ADD LOGFILE +DATA SIZE 100M BLOCKSIZE 4K

CREATEDISKGROUP.

Data Softech Incorporation.

ASMRELEASE2DISKGROUPSUMMARY
DiskGroupFeaturesEnabled IntelligentDataPlacement OCRandvo4ngdisksinadiskgroup Sectorsizesettonondefaultvalue OracleASMSPFILEinadiskgroup OracleASMFileAccessControl Volumesindiskgroups COMPATIBLE ASM >=11.2 >=11.2 >=11.2 >=11.2 >=11.2 >=11.2 COMPATIBLE RDBMS >=11.2 n/a >=11.2 n/a >11.2 n/a COMPATIBLE ADVM n/a n/a n/a n/a n/a >=11.2

Data Softech Incorporation.

WEWANTMORE!!!!!!!!!!

DiskGroupRename Userenamedgu9litytoRenameDiskgroups

SomefeatureLackingWewantMore(Always??) DirectIOsupport Snapshotsfordatales SplitMirrorFunc9onality

Data Softech Incorporation.

QUESTIONS ANSWERS

&
Data Softech Incorporation.

Data Softech Incorporation.

Das könnte Ihnen auch gefallen