Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3...

419
Oracle® Automatic Storage Management Administrator's Guide 21c F30296-04 August 2021

Transcript of Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3...

Page 1: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Oracle® Automatic StorageManagementAdministrator's Guide

21cF30296-04August 2021

Page 2: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Oracle Automatic Storage Management Administrator's Guide, 21c

F30296-04

Copyright © 2007, 2021, Oracle and/or its affiliates.

Primary Author: Eric Belden

Contributing Authors: Prasad Bagal, Mark Bauer, Bill Bridge, Chan Chan, Xiaobin Chen, Jonathan Creighton,Yanfei Fan, Dave Friedman, Cesar Gray, Shie-rei Huang, Rekha Iyer, Sameer Joshi, Ankur Kemkar, RichLong, Colin McGregor, Gregory Mengel, Harendra Mishra, Valarie Moore, Nitin Munjal, DarshanNagarajappa, Harish Nandyala, Bob Nelson, Balaji Pagadala, Satish Panchumarthy, Hemanth Pikkili, SomaPrasad, Hanlin Qian, Mounica Reddy, Kathy Rich, Francisco Sanchez, Santhosh Selvaraj, Luv Sharma,Duane Smith, Laura Solis, Malai Stalin, Emily Su, Amar Subba, Yaser Suleiman, Michael Timpanaro-Perrotta,Samarjeet Tomar, P Venkatraman, Rajiv Wickremesinghe, Jim A. Williams, Sivakumar Yarlagadda, Song Ye

This software and related documentation are provided under a license agreement containing restrictions onuse and disclosure and are protected by intellectual property laws. Except as expressly permitted in yourlicense agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license,transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverseengineering, disassembly, or decompilation of this software, unless required by law for interoperability, isprohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. Ifyou find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it onbehalf of the U.S. Government, then the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software,any programs embedded, installed or activated on delivered hardware, and modifications of such programs)and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government endusers are "commercial computer software" or "commercial computer software documentation" pursuant to theapplicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use,reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/oradaptation of i) Oracle programs (including any operating system, integrated software, any programsembedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oraclecomputer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in thelicense contained in the applicable contract. The terms governing the U.S. Government’s use of Oracle cloudservices are defined by the applicable contract for such services. No other rights are granted to the U.S.Government.

This software or hardware is developed for general use in a variety of information management applications.It is not developed or intended for use in any inherently dangerous applications, including applications thatmay create a risk of personal injury. If you use this software or hardware in dangerous applications, then youshall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure itssafe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of thissoftware or hardware in dangerous applications.

Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates. Other names may betrademarks of their respective owners.

Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks areused under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc,and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registeredtrademark of The Open Group.

This software or hardware and documentation may provide access to or information about content, products,and services from third parties. Oracle Corporation and its affiliates are not responsible for and expresslydisclaim all warranties of any kind with respect to third-party content, products, and services unless otherwiseset forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not beresponsible for any loss, costs, or damages incurred due to your access to or use of third-party content,products, or services, except as set forth in an applicable agreement between you and Oracle.

Page 3: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Contents

Preface

Audience xvi

Documentation Accessibility xvi

Related Documents xvi

Conventions xvii

Part I Introduction

1 Introducing Oracle Automatic Storage Management

Changes in Oracle Automatic Storage Management 21c 1-1

Overview of Oracle Automatic Storage Management 1-3

About Oracle Automatic Storage Management Cluster File System 1-5

Understanding Oracle ASM Concepts 1-5

About Oracle ASM Instances 1-5

About Oracle ASM Disk Groups 1-8

About Mirroring and Failure Groups 1-9

About Oracle ASM Disks 1-10

About Oracle ASM Allocation Units 1-10

About Oracle ASM Files 1-11

Understanding Oracle ASM Extents 1-11

Understanding Oracle ASM Striping 1-12

About Oracle ASM File Templates 1-14

Understanding Oracle ASM Disk Group Administration 1-14

About Discovering Disks 1-15

About Mounting and Dismounting Disk Groups 1-15

About Adding and Dropping Disks 1-15

About Online Storage Reconfigurations and Dynamic Rebalancing 1-16

2 Exploring Considerations for Oracle ASM Storage

Storage Resources for Disk Groups 2-1

iii

Page 4: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Oracle ASM and Multipathing 2-3

Recommendations for Storage Preparation 2-4

Storage Device Path and Permission Persistence 2-6

Part II Oracle ASM Instances and Disk Groups

3 Administering Oracle ASM Instances

Operating with Different Releases of Oracle ASM and Database Instances Simultaneously 3-1

Initialization Parameters for Oracle ASM Instances 3-2

About Initialization Parameter Files for an Oracle ASM Instance 3-3

About Backing Up, Copying, and Moving an Oracle ASM Initialization Parameter File 3-4

Creating, Copying, and Moving an SPFILE Into a Disk Group 3-5

Making a Back Up Copy of an Oracle ASM SPFILE in a Disk Group 3-6

About Oracle ASM Initialization Parameter Settings 3-7

About Automatic Memory Management for Oracle ASM 3-7

Recommended Settings for Oracle ASM Initialization Parameters 3-8

ASM_DISKGROUPS 3-9

ASM_DISKSTRING 3-10

ASM_IO_PROCESSES 3-11

ASM_POWER_LIMIT 3-12

ASM_PREFERRED_READ_FAILURE_GROUPS 3-13

DB_CACHE_SIZE 3-14

DIAGNOSTIC_DEST 3-15

INSTANCE_TYPE 3-15

LARGE_POOL_SIZE 3-16

PROCESSES 3-16

REMOTE_LOGIN_PASSWORDFILE 3-17

SHARED_POOL_SIZE 3-17

About Setting Database Initialization Parameters for Use with Oracle ASM 3-18

Administration of Oracle ASM Instances 3-18

Using Oracle Grid Infrastructure for a Standalone Server 3-19

About Starting Up an Oracle ASM Instance 3-20

Connecting To and Starting Up an Oracle ASM Instance 3-20

Starting Up an Oracle ASM instance with an Incorrect SPFILE Path 3-22

About Mounting Disk Groups at Startup 3-23

About Restricted Mode 3-23

About Shutting Down an Oracle ASM Instance 3-23

About Administering Oracle ASM Instances with Server Control Utility 3-25

About Out of Place Upgrades 3-25

About Configuring Oracle Grid Infrastructure with the Configuration Wizard 3-26

iv

Page 5: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

About Active Session History Sampling for Oracle ASM 3-26

About Oracle Home User on Windows 3-26

Upgrading and Patching Oracle ASM 3-27

About Oracle ASM Rolling Upgrade 3-27

About Oracle ASM Rolling Patches 3-28

Authentication for Accessing Oracle ASM Instances 3-29

About Privileges for Oracle ASM 3-30

Using One Operating System Group for Oracle ASM Users 3-31

Using Separate Operating System Groups for Oracle ASM Users 3-31

The SYSASM Privilege for Administering Oracle ASM 3-32

The SYSDBA Privilege for Managing Oracle ASM Components 3-33

Creating Users with the SYSASM Privilege 3-33

Operating System Authentication for Oracle ASM 3-34

Password File Authentication for Oracle ASM 3-35

Managing a Shared Password File in a Disk Group 3-35

About a Shared Password File in a Disk Group 3-36

Creating a Password File in a Disk Group 3-37

Backing Up and Restoring an Oracle ASM Password File in a Disk Group 3-38

Migration of a Database to Use Oracle ASM 3-39

About Using Oracle Recovery Manager to Migrate Databases to Oracle ASM 3-39

Best Practices Technical Briefs on Migrating to Oracle ASM 3-40

Administering Oracle ASM audit trail 3-40

Oracle ASM audit records with Syslog 3-40

Managing Oracle ASM audit records in Operating system audit trail 3-40

Operating system audit trail 3-40

Managing Oracle ASM audit records in Unified audit trail 3-41

Audit Trail Properties in Operating System and Unified Audit Trail 3-42

4 Administering Oracle ASM Disk Groups

Managing Disk Group Attributes 4-2

About Viewing and Setting Disk Group Attributes 4-2

Summary of Disk Group Attributes 4-2

ACCESS_CONTROL.ENABLED 4-3

ACCESS_CONTROL.UMASK 4-3

AU_SIZE 4-3

CELL.SMART_SCAN_CAPABLE 4-3

CELL.SPARSE_DG 4-4

COMPATIBLE.ASM 4-4

COMPATIBLE.RDBMS 4-4

COMPATIBLE.ADVM 4-4

v

Page 6: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

CONTENT.CHECK 4-4

CONTENT.TYPE 4-5

CONTENT_HARDCHECK.ENABLED 4-6

DISK_REPAIR_TIME 4-6

FAILGROUP_REPAIR_TIME 4-6

IDP.BOUNDARY and IDP.TYPE 4-7

LOGICAL_SECTOR_SIZE 4-7

PHYS_META_REPLICATED 4-7

PREFERRED_READ.ENABLED 4-8

SCRUB_ASYNC_LIMIT 4-8

SECTOR_SIZE 4-9

STORAGE.TYPE 4-9

THIN_PROVISIONED 4-10

VAM_MIGRATION_DONE 4-10

Creating Disk Groups 4-11

About Creating a Disk Group 4-11

Creating Disk Groups Using the CREATE DISKGROUP SQL Statement 4-13

Creating Disk Groups for a New Oracle Installation 4-15

Specifying the Logical and Physical Sector Size 4-16

Storing Oracle Cluster Registry and Voting Files in Oracle ASM Disk Groups 4-19

Altering Disk Groups 4-20

Adding Disks to a Disk Group 4-21

Using the ALTER DISKGROUP SQL Statement to Add Disks to a Disk Group 4-22

Replacing Disks in Disk Groups 4-23

Renaming Disks in Disk Groups 4-24

Dropping Disks from Disk Groups 4-25

Resizing Disks in Disk Groups 4-26

Undropping Disks in Disk Groups 4-27

Manually Rebalancing Disk Groups 4-27

Tuning Rebalance Operations 4-29

Scrubbing Disk Groups 4-31

Managing Oracle ADVM Volumes in a Disk Group 4-32

Oracle ASM Disk Discovery 4-33

How A Disk is Discovered 4-33

Disk Discovery Rules 4-34

Improving Disk Discovery Time 4-35

Managing Capacity in Disk Groups 4-36

Negative Values of USABLE_FILE_MB 4-38

Oracle ASM Mirroring and Disk Group Redundancy 4-38

Mirroring, Redundancy, and Failure Group Options 4-38

Oracle ASM Failure Groups 4-40

vi

Page 7: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

How Oracle ASM Manages Disk Failures 4-41

Guidelines for Using Failure Groups 4-41

Failure Group Frequently Asked Questions 4-42

Oracle ASM Recovery from Read and Write I/O Errors 4-42

Oracle ASM Fast Mirror Resync 4-43

Preferred Read Failure Groups 4-46

Performance and Scalability Considerations for Disk Groups 4-48

Determining the Number of Disk Groups 4-48

Performance Characteristics When Grouping Disks 4-49

Oracle ASM Storage Limits 4-49

Disk Group Compatibility 4-50

Overview of Disk Group Compatibility 4-51

Disk Group Compatibility Attributes 4-51

Setting Disk Group Compatibility Attributes 4-53

Valid Combinations of Compatibility Attribute Settings 4-53

Using CREATE DISKGROUP with Compatibility Attributes 4-55

Using ALTER DISKGROUP with Compatibility Attributes 4-55

Viewing Compatibility Attribute Settings 4-56

Reverting Disk Group Compatibility 4-56

Features Enabled By Disk Group Compatibility Attribute Settings 4-57

Considerations When Setting Disk Group Compatibility 4-59

Managing Oracle ASM File Access Control for Disk Groups 4-61

About Oracle ASM File Access Control 4-61

Setting Disk Group Attributes for Oracle ASM File Access Control 4-63

Using SQL Statements to Manage Oracle ASM File Access Control 4-64

Maintaining Disk Groups 4-66

Mounting and Dismounting Disk Groups 4-66

Mounting Disk Groups Using the FORCE Option 4-67

Checking the Internal Consistency of Disk Group Metadata 4-68

Dropping Disk Groups 4-69

Renaming Disks Groups 4-70

Managing Oracle ASM Flex Disk Groups 4-72

About Oracle ASM Flex Disk Groups 4-72

About Oracle ASM File Groups 4-74

About Oracle ASM File Group Properties 4-77

About Quota Groups for Oracle ASM File Groups 4-82

About Oracle ASM Extended Disk Groups 4-83

About Point-In-Time Database Cloning With Oracle ASM Flex Disk Groups 4-85

vii

Page 8: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

5 Administering Oracle ASM Files, Directories, and Templates

What Types of Files Does Oracle ASM Support? 5-1

About Oracle ASM File Names 5-3

Single File Creation Form 5-4

Multiple File Creation Form 5-4

Fully Qualified File Name Form 5-4

Alias Oracle ASM File Name Forms 5-6

Creating a Tablespace in Oracle ASM: Using a Data File with an Alias Name 5-7

Alias Oracle ASM File Name with Template Form 5-7

Incomplete Oracle ASM File Name Form 5-8

Incomplete Oracle ASM File Name with Template Form 5-8

Creating and Referencing Oracle ASM Files in the Database 5-9

Creating Oracle ASM Files Using a Default File Location for Disk Group Specification 5-9

Using Oracle ASM File Names in SQL Statements 5-10

Moving Data Files Between Disk Groups With ALTER DATABASE 5-11

Oracle Database File Mapping for Oracle ASM Files 5-11

Enabling File Mapping With Oracle ASM Files 5-12

Using File Mapping Views With Oracle ASM Files 5-13

Using the DBMS_STORAGE_MAP Package With Oracle ASM Files 5-13

Managing Alias Names for Oracle ASM File Names 5-14

Adding an Alias Name for an Oracle ASM File Name 5-14

Renaming an Alias Name for an Oracle ASM File Name 5-15

Dropping an Alias Name for an Oracle ASM File Name 5-15

Dropping Files and Associated Aliases from a Disk Group 5-15

Managing Disk Group Directories 5-16

Creating a Directory 5-16

Renaming a Directory 5-17

Dropping a Directory 5-17

Accessing Oracle ASM Files with the XML DB Virtual Folder 5-17

Inside /sys/asm 5-18

Using DBMS_FILE Transfer Utility for Oracle ASM 5-19

Managing Disk Group Templates 5-20

Template Attributes 5-21

Adding Templates to a Disk Group 5-22

Modifying a Disk Group Template 5-23

Dropping Templates from a Disk Group 5-23

Creating Tablespaces in Oracle ASM: Specifying Attributes with Templates 5-23

6 Using Views to Display Oracle ASM Information

Views Containing Oracle ASM Information 6-1

viii

Page 9: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Viewing Oracle ASM File Access Control Information 6-5

7 Administering Oracle ASM with Oracle Enterprise Manager

Accessing the Oracle Automatic Storage Management Home Page 7-1

Configuring Oracle ASM Initialization Parameters with Oracle Enterprise Manager 7-2

Managing Oracle ASM Users with Oracle Enterprise Manager 7-3

Managing Disk Groups with Oracle Enterprise Manager 7-4

Creating Disk Groups 7-5

Adding Disks to Disk Groups 7-6

Bringing Disks Online and Offline 7-8

Dropping Disks from Disk Groups 7-9

Dropping Disk Groups 7-11

Monitoring Disk Group Usage 7-12

Mounting and Dismounting Disk Groups 7-12

Administering Advanced Disk Group Properties 7-13

Configuring Disk Group Compatibility Attributes 7-13

Configuring Disk Repair Time 7-14

Configuring Smart Scan Compatibility 7-14

Configuring File Access Control 7-14

Specifying a Power Limit For Disk Online 7-14

Replacing An Existing Disk With a New Disk 7-15

Setting and Modifying Content Type for the Disk Group 7-15

Setting and Modifying the Failure Group Repair Time 7-16

Running Rebalance on Multiple Disk Groups 7-16

Viewing Rebalance Process Related Data 7-16

Setting and Modifying the Thin Provisioned Disk Group Attribute 7-17

Running the On Demand Scrubbing Process 7-17

Determining Whether Scrubbing Process Is Running 7-17

Managing Oracle ASM File Access Control with Oracle Enterprise Manager 7-18

Managing Directories, Files, and Aliases with Oracle Enterprise Manager 7-18

Managing Disk Group Templates with Oracle Enterprise Manager 7-19

Managing Oracle ASM Filter Driver With Oracle Enterprise Manager 7-19

Discovering ASM Filter Driver Disks 7-20

Provisioning ASM Filter Driver Disks 7-20

Releasing ASM Filter Driver Disks 7-21

Monitoring Oracle ASM Performance With Oracle Enterprise Manager 7-21

Monitoring General Oracle ASM Performance 7-21

Checking Disk Group Integrity 7-22

Backing Up Oracle ASM Files with Oracle Enterprise Manager 7-22

Performing Bad Block Recovery with Oracle Enterprise Manager 7-23

ix

Page 10: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Migrating to Oracle ASM with Oracle Enterprise Manager 7-23

Monitoring Alerts and Incidents With Oracle ASM Support Workbench 7-25

Monitoring Oracle Flex ASM 7-25

8 Performing Oracle ASM Data Migration with RMAN

Overview of Oracle ASM Data Migration 8-1

Purpose of Oracle ASM Data Migration 8-2

Basic Concepts of Oracle ASM Data Migration 8-2

Basic Steps of Data Migration to Oracle ASM Using RMAN 8-3

Preparing to Migrate the Database to Oracle ASM Using RMAN 8-3

Migrating the Database to Oracle ASM Using RMAN 8-6

Migrating a Database from Oracle ASM to Alternative Storage 8-9

Moving Data Files Between Oracle ASM Disk Groups Using RMAN 8-9

9 Managing Oracle ASM With ASMCA

Getting Started With the ASMCA GUI Tool 9-1

Managing Instances and Disk Groups With ASMCA 9-2

Creating Oracle ASM Instances with ASMCA 9-2

Managing Disk Groups with ASMCA 9-3

ASMCA Command-Line Interface 9-4

Running ASMCA Command-Line 9-5

ASMCA Commands for Instances and Disk Groups 9-6

Configure an Oracle ASM Instance 9-6

Configure Parameters for a Specified Instance 9-8

Create a Disk Group 9-8

Edit Oracle ASM Disk Group Attributes 9-10

Add a Disk to a Disk Group 9-10

Create Oracle ASM File Groups 9-11

Drop Oracle ASM File Groups 9-12

Create Oracle ASM Quota Groups 9-12

Drop Oracle ASM Quota Groups 9-12

10

Managing Oracle ASM with ASMCMD

ASMCMD Audit Files Management Commands 10-1

audcleanaudittrail 10-2

audclearproperty 10-3

audcleartimestamp 10-4

audcreatejob 10-5

auddropjob 10-5

x

Page 11: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

audsetdebug 10-6

audsetjobinterval 10-7

audsetjobstatus 10-7

audsetproperty 10-8

audsettimestamp 10-9

audshowtimestamp 10-9

lsaudcleanupjobs 10-10

lsaudconfigparams 10-11

About ASMCMD 10-12

Types of ASMCMD Commands 10-12

About Oracle ASM Files, File Names, Directories, and Aliases 10-13

System-Generated File Name or Fully Qualified File Name 10-13

Directory 10-13

Alias 10-14

Absolute Path and Relative Path 10-15

Wildcard Characters 10-16

Preparing to Run ASMCMD 10-17

Running ASMCMD in Interactive Mode 10-18

Syntax for Starting ASMCMD 10-18

Running ASMCMD without Any Options 10-19

Specifying the Type of Connection 10-19

Specifying the Verbose Mode 10-20

Including the Current Directory in the ASMCMD Prompt 10-20

Displaying the ASMCMD Version Number 10-20

Running ASMCMD in Noninteractive Mode 10-20

Getting Help 10-22

ASMCMD Instance Management Commands 10-22

dsget 10-23

dsset 10-24

lsct 10-25

lsop 10-26

lspwusr 10-27

orapwusr 10-27

pwcopy 10-28

pwcreate 10-29

pwdelete 10-30

pwget 10-31

pwmove 10-31

pwset 10-32

showclustermode 10-33

showclusterstate 10-33

xi

Page 12: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

showpatches 10-34

showversion 10-34

shutdown 10-35

spbackup 10-36

spcopy 10-37

spget 10-39

spmove 10-39

spset 10-40

startup 10-40

ASMCMD Client Cluster Management Commands 10-41

chcc 10-42

lscc 10-43

mkcc 10-44

rmcc 10-45

ASMCMD Oracle ASM Filter Driver Management Commands 10-46

afd_configure 10-47

afd_deconfigure 10-48

afd_di 10-48

afd_dsget 10-49

afd_dsset 10-49

afd_filter 10-50

afd_label 10-50

afd_loglevelget 10-51

afd_loglevelset 10-52

afd_lsdsk 10-52

afd_lslbl 10-53

afd_refresh 10-53

afd_scan 10-54

afd_state 10-55

afd_unlabel 10-55

ASMCMD File Management Commands 10-56

amdu_extract 10-56

cd 10-57

cp 10-58

du 10-60

find 10-60

ls 10-61

lsof 10-63

mkalias 10-64

mkdir 10-65

pwd 10-65

xii

Page 13: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

rm 10-66

rmalias 10-67

ASMCMD Disk Group Management Commands 10-68

chdg 10-68

chkdg 10-71

dropdg 10-72

iostat 10-73

lsattr 10-75

lsdg 10-76

lsdsk 10-78

lsod 10-80

md_backup 10-81

md_restore 10-83

mkdg 10-85

mount 10-87

offline 10-87

online 10-88

rebal 10-89

remap 10-90

setsparseparent 10-91

setattr 10-92

stamp 10-92

stamplist 10-93

umount 10-94

ASMCMD File Group Management Commands 10-95

chfg 10-95

chqg 10-96

lsfg 10-97

lsqg 10-98

mkfg 10-99

mkqg 10-101

mvfg 10-101

mvfile 10-102

rmfg 10-102

rmqg 10-103

ASMCMD Template Management Commands 10-103

chtmpl 10-104

lstmpl 10-104

mktmpl 10-105

rmtmpl 10-106

ASMCMD File Access Control Commands 10-107

xiii

Page 14: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

chgrp 10-107

chmod 10-108

chown 10-109

groups 10-110

grpmod 10-111

lsgrp 10-112

lsusr 10-112

mkgrp 10-113

mkusr 10-114

passwd 10-114

rmgrp 10-115

rmusr 10-115

rpusr 10-116

Part III Advanced Topics

11

Managing Oracle Flex ASM

Overview of Oracle Flex ASM 11-1

About Setting Up Oracle Flex ASM 11-6

Administering Oracle Flex ASM 11-6

12

Administering Oracle ASM Filter Driver

About Oracle ASM Filter Driver 12-2

Determining Whether Oracle ASM Filter Driver Has Been Configured 12-3

Updating the Oracle ASM Filter Driver AFD_DISKSTRING Parameter 12-3

Updating the Oracle ASM ASM_DISKSTRING Parameter for Oracle ASM Filter DriverDisks 12-4

Setting, Clearing, and Scanning Oracle ASM Filter Driver Labels 12-5

Deconfiguring Oracle ASM Filter Driver 12-6

Deconfiguring Oracle ASM Filter Driver in an Oracle Grid Infrastructure ClusterwareEnvironment 12-6

Deconfiguring Oracle ASM Filter Driver in an Oracle Grid Infrastructure Standalone(Oracle Restart) Environment 12-8

Oracle ASM Filter Driver Commands 12-9

afdload 12-9

afddriverstate 12-10

xiv

Page 15: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

13

Creating Database Files in Oracle ASM Using SQL*Plus

Creating a Database that Uses Oracle ASM 13-1

Creating Tablespaces in Oracle ASM 13-2

Creating Redo Logs in Oracle ASM 13-2

Creating Control Files in Oracle ASM 13-3

Creating Archive Log Files in Oracle ASM 13-4

Glossary

Index

xv

Page 16: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Preface

The Oracle Automatic Storage Management Administrator's Guide describes how toadminister Oracle Automatic Storage Management (Oracle ASM) for Oracle Database.

This Preface contains the following topics:

• Audience

• Documentation Accessibility

• Related Documents

• Conventions

AudienceThe audience for this book includes system administrators, database administrators,and storage administrators. The Oracle Automatic Storage ManagementAdministrator's Guide is intended for database and storage administrators whoperform the following tasks:

• Administer and manage Oracle ASM

• Configure and administer Oracle ASM

To use this document, you should be familiar with basic Oracle Database conceptsand administrative procedures. Also, you might want to review the documentation forOracle Clusterware and Oracle Real Application Clusters (Oracle RAC). See RelatedDocuments.

Documentation AccessibilityFor information about Oracle's commitment to accessibility, visit the OracleAccessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers that have purchased support have access to electronic supportthrough My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trsif you are hearing impaired.

Related DocumentsFor more information, refer to the following Oracle resources:

• Oracle Automatic Storage Management Cluster File System Administrator's Guide

Preface

xvi

Page 17: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• Oracle Database Administrator’s Guide

• Oracle Database Concepts

• Oracle Database Reference

• Oracle Database SQL Language Reference

• Oracle Clusterware Administration and Deployment Guide

• Oracle Real Application Clusters Administration and Deployment Guide

• Platform-specific guides, including Oracle Database, Oracle Grid Infrastructure, andOracle Real Application Clusters installation guides

See Also:

• Oracle Database Licensing Information User Manual to determine whether afeature is available on your edition of Oracle Database

• Learning Database New Features for a complete description of the newfeatures in this release

• Oracle Database Upgrade Guide for a complete description of the deprecatedand desupported features in this release

ConventionsThe following text conventions are used in this document:

Convention Meaning

boldface Boldface type indicates graphical user interface elements associated with anaction, or terms defined in text or the glossary.

italic Italic type indicates book titles, emphasis, or placeholder variables for whichyou supply particular values.

monospace Monospace type indicates commands within a paragraph, URLs, code inexamples, text that appears on the screen, or text that you enter.

Preface

xvii

Page 18: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Part IIntroduction

Part I provides an overview of Oracle Automatic Storage Management (Oracle ASM), OracleASM Cluster File System (Oracle ACFS), and Oracle ASM Dynamic Volume Manager(Oracle ADVM) concepts and features in the following chapters:

• Introducing Oracle Automatic Storage Management

• Exploring Considerations for Oracle ASM Storage

Page 19: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

1Introducing Oracle Automatic StorageManagement

Oracle Automatic Storage Management (Oracle ASM), Oracle ASM Cluster File System(Oracle ACFS), and Oracle ASM Dynamic Volume Manager (Oracle ADVM) are keycomponents of storage management.

This chapter provides an overview of Oracle Automatic Storage Management (Oracle ASM),Oracle ASM Cluster File System (Oracle ACFS), and Oracle ASM Dynamic Volume Manager(Oracle ADVM) concepts and features. This chapter contains the following topics:

• Changes in Oracle Automatic Storage Management 21c

• Overview of Oracle Automatic Storage Management

• About Oracle Automatic Storage Management Cluster File System

• Understanding Oracle ASM Concepts

• Understanding Oracle ASM Disk Group Administration

For a list of the terms that are used in the Oracle Automatic Storage ManagementAdministrator's Guide and their definitions, refer to the Glossary in this guide.

See Also:

• The Oracle ASM technologies page at https://www.oracle.com/database/technologies/rac/asm.html

• The Oracle ASM technologies page at https://www.oracle.com/database/technologies/rac/acfs.html

• "Master Note for Automatic Storage Management (ASM) (Doc ID 1187723.1)"at My Oracle Support (https://support.oracle.com)

Changes in Oracle Automatic Storage Management 21cThe following are changes in Oracle Automatic Storage Management 21c.

• New Features

• Deprecated Features

• Desupported Features

1-1

Page 20: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Oracle Database Licensing Information User Manual to determinewhether a feature is available on your edition of Oracle Database

• Learning Database New Features for a complete description of the newfeatures in this release

• Oracle Database Upgrade Guide for a complete description of thedeprecated and desupported features in this release

Note:

In Oracle ASM 21c, information about Oracle ASM Cluster File System(Oracle ACFS) is documented in the Oracle Automatic Storage ManagementCluster File System Administrator's Guide.

New Features

These are the new features for Oracle Automatic Storage Management 21c.

• Oracle ASM Support for Capability to Clone From One CDB to Another

Oracle ASM provides support to clone a CDB from another CDB using OracleASM Flex disk groups.

See Also:

– About Point-In-Time Database Cloning With Oracle ASM Flex DiskGroups for information about Oracle ASM support for cloning a PDB

• Enhanced Parity Protection (Double) for Flex Disk Groups

Support for double parity protection for write-once files in an Oracle ASM Flex DiskGroup enhances previous support for simple parity protection.

For a database to create double parity files, the COMPATIBLE.ASM initializationparameter must be set to 19.5 or greater, and the database COMPATIBLE parametermust be set to 19.5 or greater.

PARITY and DOUBLE redundancy are supported only on FLEX redundancy diskgroups (not EXTENDED disk groups).

See Also:

– About Oracle ASM File Group Properties for information about theOracle ASM file group REDUNDANCY property

• Templates for Oracle ASM File Group Properties

Chapter 1Changes in Oracle Automatic Storage Management 21c

1-2

Page 21: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

You can create a file group template that enables you to customize a set of file groupproperties that can be inherited by multiple databases. File group templates combine theease of automatic file group creation with the flexibility of property customization.

See Also:

– About Oracle ASM File Group Properties for information about the OracleASM file group templates

Deprecated Features

These are the deprecated features for Oracle ASM 21c.

• Deprecation of Cluster Domain - Domain Services Cluster

Starting with Oracle Grid Infrastructure 21c, Domain Services Cluster (DSC), which ispart of the Oracle Cluster Domain architecture, is deprecated and can be desupported ina future release.

Desupported Features

These are the desupported features for Oracle ASM 21c.

• Desupport of Cluster Domain - Member Clusters

Starting with Oracle Grid Infrastructure 21c, Member Clusters, which are part of theOracle Cluster Domain architecture, are desupported.

• Desupport of Intelligent Data Placement (IDP)Intelligent Data Placement (IDP) is desupported in Oracle Database 21c. Intelligent DataPlacement helped to place data on physical storage disks to reduce latency. This featurewas deprecated in Oracle Database 12c release 2 (12.2). There is no replacement.Views and ASM disk group attributes associated with this feature are also desupported.

Overview of Oracle Automatic Storage ManagementOracle ASM is Oracle's recommended storage management solution that provides analternative to conventional volume managers, file systems, and raw devices.

Oracle ASM is a volume manager and a file system for Oracle Database files that supportssingle-instance Oracle Database and Oracle Real Application Clusters (Oracle RAC)configurations.

• A volume manager is a software component that manages the mapping of the collectionof the pieces of the disks into a volume. In the storage realm, the meaning of volume hasmany related definitions. Volumes are often thought of as the virtual entity represented asa Logical Unit Number (LUN). Volumes often are presented as an aggregation of piecesfrom several disks. In storage technology, the term LUN is often used to denote a diskpresented to a computer system by a storage array. In SCSI terminology, a Logical UnitNumber, or LUN, is a number representing a device address presented to a computersystem.

• A file system is a software component providing structured access to disks. File systemspresent objects, such as files, to application programs. Access to files is generallyspecified with standard API defining operating system calls such as Open/Close andRead/Write that the application program uses for accessing files. File systems are usually

Chapter 1Overview of Oracle Automatic Storage Management

1-3

Page 22: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

provided as a component of an operating system, but may be provided as anindependent software component.

Oracle ASM uses disk groups to store data files; an Oracle ASM disk group is acollection of disks that Oracle ASM manages as a unit. Within a disk group, OracleASM exposes a file system interface for Oracle Database files. The content of files thatare stored in a disk group is evenly distributed to eliminate hot spots and to provideuniform performance across the disks. The performance is comparable to theperformance of raw devices.

You can add or remove disks from a disk group while a database continues to accessfiles from the disk group. When you add or remove disks from a disk group, OracleASM automatically redistributes the file contents and eliminates the need for downtimewhen redistributing the content.

The Oracle ASM volume manager functionality provides flexible server-basedmirroring options. The Oracle ASM normal and high redundancy disk groups enabletwo-way and three-way mirroring respectively. You can use external redundancy toenable a Redundant Array of Independent Disks (RAID) storage subsystem to performthe mirroring protection function.

Oracle ASM also uses the Oracle Managed Files (OMF) feature to simplify databasefile management. OMF automatically creates files in designated locations. OMF alsonames files and removes them while relinquishing space when tablespaces or files aredeleted. When using OMF to create new files, new names are created for the new filesso overwriting files is avoided.

Oracle ASM reduces the administrative overhead for managing database storage byconsolidating data storage into a small number of disk groups. The smaller number ofdisk groups consolidates the storage for multiple databases and provides for improvedI/O performance.

Oracle ASM files can coexist with other storage management options such as rawdisks and third-party file systems. This capability simplifies the integration of OracleASM into pre-existing environments.

Oracle ASM has easy to use management interfaces such as SQL*Plus, the OracleASM Command Line Utility (ASMCMD) command-line interface, and Oracle ASMConfiguration Assistant (ASMCA).

See Also:

• Administering Oracle ASM Disk Groups for information aboutadministering disk groups

• Managing Oracle ASM With ASMCA for information about Oracle ASMConfiguration Assistant

• Managing Oracle ASM with ASMCMD for information about theASMCMD command-line interface

• Oracle Database Administrator’s Guide for information about OracleDatabase structure and storage

Chapter 1Overview of Oracle Automatic Storage Management

1-4

Page 23: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

About Oracle Automatic Storage Management Cluster FileSystem

Oracle Automatic Storage Management Cluster File System (Oracle ACFS) and Oracle ASMDynamic Volume Manager (Oracle ADVM) extend Oracle ASM functionality.

Oracle Automatic Storage Management Cluster File System (Oracle ACFS) is a multi-platform, scalable file system, and storage management technology that extends OracleAutomatic Storage Management (Oracle ASM) functionality to support all customer files. TheOracle ASM Dynamic Volume Manager (Oracle ADVM) provides volume managementservices and a standard disk device driver interface to clients.

See Also:

Oracle Automatic Storage Management Cluster File System Administrator's Guidefor more information about Oracle ACFS and Oracle ADVM

Understanding Oracle ASM ConceptsThe concepts for the key Oracle ASM components are introduced in this topic.

The following topics are discussed:

• About Oracle ASM Instances

• About Oracle ASM Disk Groups

• About Mirroring and Failure Groups

• About Oracle ASM Disks

• About Oracle ASM Allocation Units

• About Oracle ASM Files

See Also:

Exploring Considerations for Oracle ASM Storage for information about preparingyour storage environment.

About Oracle ASM InstancesAn Oracle ASM instance is built on the same technology as an Oracle Database instance.

An Oracle ASM instance has a System Global Area (SGA) and background processes thatare similar to those of Oracle Database. However, because Oracle ASM performs fewer tasksthan a database, an Oracle ASM SGA is much smaller than a database SGA. In addition,Oracle ASM has a minimal performance effect on a server. Oracle ASM instances mount disk

Chapter 1About Oracle Automatic Storage Management Cluster File System

1-5

Page 24: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

groups to make Oracle ASM files available to database instances; Oracle ASMinstances do not mount databases.

Oracle ASM is installed in the Oracle Grid Infrastructure home before Oracle Databaseis installed in a separate Oracle home. Oracle ASM and database instances requireshared access to the disks in a disk group. Oracle ASM instances manage themetadata of the disk group and provide file layout information to the databaseinstances.

Oracle ASM metadata is the information that Oracle ASM uses to control a disk groupand the metadata resides within the disk group. Oracle ASM metadata includes thefollowing information:

• The disks that belong to a disk group

• The amount of space that is available in a disk group

• The file names of the files in a disk group

• The location of disk group data file extents

• A redo log that records information about atomically changing metadata blocks

• Oracle ADVM volume information

Oracle ASM instances can be clustered using Oracle Clusterware; there is one OracleASM instance for each cluster node. If there are several database instances fordifferent databases on the same node, then the database instances share the samesingle Oracle ASM instance on that node.

If the Oracle ASM instance on a node in a Standard Oracle ASM cluster fails, then allof the database instances on that node also fail. However, in an Oracle Flex ASMconfiguration, Oracle 12c database instances would not fail as they would be able toaccess another Oracle ASM instance remotely on another node.

Unlike a file system driver failure, an Oracle ASM instance failure does not requirerestarting the operating system. In an Oracle RAC environment, the Oracle ASM anddatabase instances on the surviving nodes automatically recover from an Oracle ASMinstance failure on a node.

Figure 1-1 shows a single node configuration with one Oracle ASM instance andmultiple database instances. The Oracle ASM instance manages the metadata andprovides space allocation for the Oracle ASM files. When a database instance createsor opens an Oracle ASM file, it communicates those requests to the Oracle ASMinstance. In response, the Oracle ASM instance provides file extent map information tothe database instance.

In Figure 1-1, there are two disk groups: one disk group has four disks and the otherhas two disks. The database can access both disk groups. The configuration in Figure 1-1 shows multiple database instances, but only one Oracle ASM instance isneeded to serve the multiple database instances.

Chapter 1Understanding Oracle ASM Concepts

1-6

Page 25: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Figure 1-1 Oracle ASM for Single-Instance Oracle Databases

Dis

k G

rou

p B

Ora

cle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

Dis

k G

rou

p A

AS

M D

isk G

rou

ps

Ora

cle

�D

ata

ba

se

3�

Insta

nce

Sin

gle

In

sta

nce D

ata

base S

erv

er

Ora

cle

�D

ata

ba

se

2�

Insta

nce

AS

M�

Insta

nce

Ora

cle

�D

ata

ba

se

1�

Insta

nce

Figure 1-2 shows an Oracle ASM cluster in an Oracle RAC environment where Oracle ASMprovides a clustered pool of storage. There is one Oracle ASM instance for each nodeserving multiple Oracle RAC or single-instance databases in the cluster. All of the databasesare consolidated and share the same two Oracle ASM disk groups.

Figure 1-2 Oracle ASM Cluster Configuration with Oracle RAC

Dis

k G

rou

p B

Ora

cle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

Dis

k G

rou

p A

Ora

cle

�D

ata

base�

Insta

nce

AS

M C

luste

red

Po

ol o

f S

tora

ge

Ora

cle

RA

C �

Ora

cle

�D

ata

base�

Insta

nce

Ora

cle

�D

ata

base�

Insta

nce

Ora

cle

�D

ata

base�

Insta

nce

Ora

cle

�D

ata

base�

Insta

nce

AS

M�

Insta

nce

AS

M�

Insta

nce

AS

M�

Insta

nce

AS

M�

Insta

nce

AS

M�

Insta

nce

A clustered storage pool can be shared by multiple single-instance Oracle Databases asshown in Figure 1-3. In this case, multiple databases share common disk groups. A shared

Chapter 1Understanding Oracle ASM Concepts

1-7

Page 26: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Oracle ASM storage pool is achieved by using Oracle Clusterware. However, in suchenvironments an Oracle RAC license is not required.

To share a disk group among multiple nodes, you must install Oracle Clusterware onall of the nodes, regardless of whether you install Oracle RAC on the nodes. OracleASM instances that are on separate nodes do not need to be part of an Oracle ASMcluster. However, if the Oracle ASM instances are not part of an Oracle ASM cluster,they cannot communicate with each other. Multiple nodes that are not part of anOracle ASM cluster cannot share a disk group.

Figure 1-3 Oracle ASM Cluster with Single-Instance Oracle Databases

Dis

k G

rou

p B

Ora

cle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

O

racle

R

eco

very

C

ata

log

Dis

k G

rou

p A

Ora

cle

�D

ata

base�

Insta

nce

AS

M C

luste

red

Po

ol o

f S

tora

ge

Sin

gle

In

sta

nce D

ata

base S

erv

ers

Ora

cle

�D

ata

base�

Insta

nce

AS

M�

Insta

nce

AS

M�

Insta

nce

Ora

cle

�D

ata

base�

Insta

nce

AS

M�

Insta

nce

See Also:

• Administering Oracle ASM Instances for information about managing anOracle ASM instance.

• Managing Oracle Flex ASM for information about Oracle Flex ASMconfigurations.

About Oracle ASM Disk GroupsA disk group consists of multiple disks and is the fundamental object that Oracle ASMmanages.

Each disk group contains the metadata that is required for the management of spacein the disk group. Disk group components include disks, files, and allocation units.

Files are allocated from disk groups. Any Oracle ASM file is completely containedwithin a single disk group. However, a disk group might contain files belonging toseveral databases and a single database can use files from multiple disk groups. For

Chapter 1Understanding Oracle ASM Concepts

1-8

Page 27: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

most installations you need only a small number of disk groups, usually two, and rarely morethan three.

See Also:

Administering Oracle ASM Disk Groups for more information about managing diskgroups

About Mirroring and Failure GroupsMirroring protects data integrity by storing copies of data on multiple disks.

When you create a disk group, you specify an Oracle ASM disk group type based on one ofthe following three redundancy levels:

• Normal for 2-way mirroring

• High for 3-way mirroring

• External to not use Oracle ASM mirroring, such as when you configure hardware RAIDfor redundancy

The redundancy level controls how many disk failures are tolerated without dismounting thedisk group or losing data. The disk group type determines the mirroring levels with whichOracle creates files in a disk group.

Oracle ASM mirroring is more flexible than traditional RAID mirroring. For a disk groupspecified as NORMAL redundancy, you can specify the redundancy level for each file. Forexample, two files can share the same disk group with one file being mirrored while the otheris not.

When Oracle ASM allocates an extent for a mirrored file, Oracle ASM allocates a primarycopy and a mirror copy. Oracle ASM chooses the disk on which to store the mirror copy in adifferent failure group than the primary copy. Failure groups are used to place mirrored copiesof data so that each copy is on a disk in a different failure group. The simultaneous failure ofall disks in a failure group does not result in data loss.

You define the failure groups for a disk group when you create an Oracle ASM disk group.After a disk group is created, you cannot alter the redundancy level of the disk group. If youomit the failure group specification, then Oracle ASM automatically places each disk into itsown failure group, except for disk groups containing disks on Oracle Exadata cells. Normalredundancy disk groups require at least two failure groups. High redundancy disk groupsrequire at least three failure groups. Disk groups with external redundancy do not use failuregroups.

See Also:

• Managing Disk Group Templates for information about disk group types andtemplates

• Mirroring, Redundancy, and Failure Group Options for more information aboutmirroring and failure groups

Chapter 1Understanding Oracle ASM Concepts

1-9

Page 28: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

About Oracle ASM DisksOracle ASM disks are the storage devices that are provisioned to Oracle ASM diskgroups.

Examples of Oracle ASM disks include:

• A disk or partition from a storage array

• An entire disk or the partitions of a disk

• Logical volumes

• Network-attached files (NFS)

When you add a disk to a disk group, you can assign an Oracle ASM disk name orOracle ASM assigns the Oracle ASM disk name automatically. This name is differentfrom the path name used by the operating system. In a cluster, a disk may beassigned different operating system device names on different nodes, but the disk hasthe same Oracle ASM disk name on all of the nodes. In a cluster, an Oracle ASM diskmust be accessible from all of the instances that share the disk group.

Oracle ASM spreads the files proportionally across all of the disks in the disk group.This allocation pattern maintains every disk at the same capacity level and ensuresthat all of the disks in a disk group have the same I/O load. Because Oracle ASM loadbalances among all of the disks in a disk group, different Oracle ASM disks should notshare the same physical drive.

About Oracle ASM Allocation UnitsEvery Oracle ASM disk is divided into allocation units (AU).

An allocation unit is the fundamental unit of allocation within a disk group. A file extentconsists of one or more allocation units. An Oracle ASM file consists of one or morefile extents.

When you create a disk group, you can set the Oracle ASM allocation unit size withthe AU_SIZE disk group attribute. The values can be 1, 2, 4, 8, 16, 32, or 64 MB,depending on the specific disk group compatibility level. Larger AU sizes typicallyprovide performance advantages for data warehouse applications that use largesequential reads.

See Also:

• Example 4-1 for an example that shows how the AU_SIZE is specifiedwith the CREATE DISKGROUP SQL statement

• Features Enabled By Disk Group Compatibility Attribute Settings forinformation about allocation unit sizes and disk group compatibilityattributes

• Articles at My Oracle Support (https://support.oracle.com) foradditional information about allocation units and Oracle ASM

Chapter 1Understanding Oracle ASM Concepts

1-10

Page 29: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

About Oracle ASM FilesFiles that are stored in Oracle ASM disk groups are called Oracle ASM files.

Each Oracle ASM file is contained within a single Oracle ASM disk group. Oracle Databasecommunicates with Oracle ASM in terms of files. This is similar to the way Oracle Databaseuses files on any file system. You can store the various file types in Oracle ASM disk groups,including:

• Control files

• Data files, temporary data files, and data file copies

• SPFILEs

• Online redo logs, archive logs, and Flashback logs

• RMAN backups

• Disaster recovery configurations

• Change tracking bitmaps

• Data Pump dumpsets

Oracle ASM automatically generates Oracle ASM file names as part of file creation andtablespace creation. Oracle ASM file names begin with a plus sign (+) followed by a diskgroup name. You can specify user-friendly aliases for Oracle ASM files and create ahierarchical directory structure for the aliases.

The following topics describe Oracle ASM file components:

• Understanding Oracle ASM Extents

• Understanding Oracle ASM Striping

• About Oracle ASM File Templates

Understanding Oracle ASM ExtentsThe contents of Oracle ASM files are stored in a disk group as a set, or collection, of extentsthat are stored on individual disks within disk groups.

Each extent resides on an individual disk. An extent, also called data extent, is the rawstorage used to hold the contents of a file. Extents consist of one or more allocation units(AU). To accommodate increasingly larger files, Oracle ASM uses variable size extents.

Variable size extents enable support for larger Oracle ASM data files, reduce SGA memoryrequirements for very large databases, and improve performance for file create and openoperations. The initial extent size equals the disk group allocation unit size and it increasesby a factor of 4 or 16 at predefined thresholds. The various extent sizes are described in thistopic.

For disk groups with AU size less than 4 MB:

• Extent size always equals the disk group AU size for the first 20000 extent sets (0 -19999).

• Extent size equals 4*AU size for the next 20000 extent sets (20000 - 39999).

• Extent size equals 16*AU size for the next 20000 and higher extent sets (40000+).

Chapter 1Understanding Oracle ASM Concepts

1-11

Page 30: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

For disk groups with AU size greater than or equal to 4 MB and the disk group RDBMScompatibility greater than or equal to 11.2.0.4, the counts for extents of sizes (thedisk group AU size, 4*AU size, or 16*AU size) are calculated using the applicationblock size to support maximum file size.

The extent sizing feature is automatic for newly created and resized data files whenspecific disk group compatibility attributes are set to 11.1 or higher. For informationabout compatibility attributes, see Disk Group Compatibility.

Figure 1-4 shows the Oracle ASM file extent relationship with allocation units. The firsteight extents (0 to 7) are distributed on four Oracle ASM disks and are equal to the AUsize. After the first 20000 extent sets, the extent size becomes 4*AU for the next20000 extent sets (20000 - 39999). This is shown as bold rectangles labeled with theextent set numbers 20000 to 20007, and so on. The next increment for an Oracle ASMextent is 16*AU (not shown in Figure 1-4).

Figure 1-4 Oracle ASM File Allocation in a Disk Group

Allo

cati

on

Un

it (

AU

)V

ari

ab

le S

ize A

SM

File E

xte

nts

0 4 . . . . . . 20000

20004

1 5 . . . . . . 20001

20005

2 6 . . . . . . 20002

20006

3 7 . . . . . . 20003

20007

Understanding Oracle ASM StripingOracle ASM striping has two primary purposes: balance loads across all of the disks ina disk group and reduce I/O latency.

Coarse-grained striping provides load balancing for disk groups while fine-grainedstriping reduces latency for certain file types by spreading the load more widely.

To stripe data, Oracle ASM separates files into stripes and spreads data evenly acrossall of the disks in a disk group. The fine-grained stripe size always equals 128 KB inany configuration; this provides lower I/O latency for small I/O operations. The coarse-grained stripe size is always equal to the AU size (not the data extent size).

Figure 1-5 and Figure 1-6 are illustrations of Oracle ASM file striping. In bothillustrations, the allocation unit size has been set to 1 M (AU_SIZE = 1M) for the diskgroup which consists of 8 disks. The instance is Oracle ASM 11g Release 2 (11.2) andthe disk group compatibility attributes for ASM and RDBMS have been set to 11.2, so

Chapter 1Understanding Oracle ASM Concepts

1-12

Page 31: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

variable extents are shown in the graphic after the first 20,000 extents. For the first 20,000extents, the extent size is 1 M and equals one allocation unit (AU). For the next 20,000extents, the extent size is 4 M and equals 4 AUs.

To identify the stripe chunks of the file, they have been labeled A..X (24 letters) using differentfonts for successive series of A..X until all the chunks have been identified.

In Figure 1-5, the file is striped in 128 K chunks (labeled A..X) with each 128 K chunk storedin an extent, starting at the first extent in disk 1, then the first extent in disk 2, and thencontinuing in a round-robin pattern through all the disks until the entire file has been striped.As shown in this example, the striping chunks first fill up the first extent of each disk, then thesecond extent of each disk, and so on until the entire file has been striped.

Figure 1-5 Oracle ASM Fine-Grained Striping

21

Allocation Unit (AU)

C D E F G H I J K L M N O P Q R S T U V W X A B C D E . . . A B C D E . . .

. . .

. . .

. . .

. . .

. . .

3 4 8

.

.

.

.

.

.

...

...

...

A B

H P XD L TDC K S CB J R BA I Q A

Variable Size ASM File Extents

In Figure 1-6, the file is striped in 1 M chunks (labeled A..X) with each 1 M chunk storeduniquely in an extent, starting at the first extent in disk 1, then the first extent in disk 2, andthen continuing in a round-robin pattern through all the disks until the entire file has beenstriped. For the first 20,000 extents where the AU equals the extent size (1 M), the stripeequals the extent size and allocation unit size.For the variable extents, where an extent iscomposed of multiple allocation units, the file stripe is located in an AU of the extent. Thestriping chunks are placed in the allocation units of the first extents of all the disks before thestriping continues to the next extent.

Chapter 1Understanding Oracle ASM Concepts

1-13

Page 32: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Figure 1-6 Oracle ASM Coarse-Grained Striping

.

.

.

B

RJ

2

J

1

.

.

.

AI

QI

Allocation Unit (AU) Variable Size ASM File Extents

C D E F G H I J K L M N O P Q R S T U V W X A B C D E . . . A B C D E . . .

. . .

. . .

. . .

. . .

. . .

3 4 8

C

.

.

.

C

S

K

K

.

.

.

D

L

H

.

.

.

H

XP

. . .. . .. . .. . . . . .

D

TL

A

A B

B

About Oracle ASM File TemplatesTemplates are collections of attribute values that are used to specify disk regions, filemirroring, and striping attributes for an Oracle ASM file when it is created.

When creating a file, you can include a template name and assign desired attributesbased on an individual file rather than the file type.

A default template is provided for every Oracle file type, but you can customizetemplates to meet unique requirements. Each disk group has a default templateassociated with each file type.

See Also:

Managing Disk Group Templates for more information about Oracle ASMtemplates

Understanding Oracle ASM Disk Group AdministrationOracle ASM disk group administration is introduced in this topic.

The following topics are discussed:

• About Discovering Disks

• About Mounting and Dismounting Disk Groups

• About Adding and Dropping Disks

• About Online Storage Reconfigurations and Dynamic Rebalancing

Chapter 1Understanding Oracle ASM Disk Group Administration

1-14

Page 33: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

About Discovering DisksThe disk discovery process locates the operating system names for disks that Oracle ASMcan access.

Disk discovery finds all of the disks that comprise a disk group to be mounted. The set ofdiscovered disks also includes disks that could be added to a disk group.

An Oracle ASM instance requires an ASM_DISKSTRING initialization parameter value to specifyits discovery strings. Only path names that the Oracle ASM instance has permission to openare discovered. The exact syntax of a discovery string depends various factors, such as theplatform and whether Oracle Exadata disks are used. The path names that an operatingsystem accepts are always usable as discovery strings.

See Also:

• ASM_DISKSTRING for information about the ASM_DISKSTRING initializationparameter

• Oracle ASM Disk Discovery for information about disk discovery

• Administering Oracle ASM Filter Driverfor information about Oracle ASM FilterDriver

About Mounting and Dismounting Disk GroupsA disk group must be mounted by a local Oracle ASM instance before database instancescan access the files in the disk group.

Mounting the disk group requires discovering all of the disks and locating the files in the diskgroup that is being mounted.

You can explicitly dismount a disk group. Oracle reports an error if you attempt to dismount adisk group without the force option when any of the disk group files are open. It is possible tohave disks fail in excess of the Oracle ASM redundancy setting. If this happens, then the diskgroup is forcibly dismounted. If the disk group is forcibly dismounted, a database cannotaccess files in the disk group.

See Also:

Mounting and Dismounting Disk Groups for more information about disk groups

About Adding and Dropping DisksYou can add a disk to an existing disk group to add space and to improve throughput.

The specified discovery string identifies the disk or disks that you could add. The disks thatyou add must be discovered by every Oracle ASM instance using its ASM_DISKSTRINGinitialization parameter. After you add a disk, Oracle ASM rebalancing operations move data

Chapter 1Understanding Oracle ASM Disk Group Administration

1-15

Page 34: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

onto the new disk. To minimize the rebalancing I/O, it is more efficient to add multipledisks at the same time.

You can drop a disk from a disk group if it fails or to re-purpose capacity. Use theOracle ASM disk name to drop a disk, not the discovery string device name. If an erroroccurs while writing to a disk, then Oracle ASM drops the disk automatically.

See Also:

Altering Disk Groups for more information about altering disk groupmembership

About Online Storage Reconfigurations and Dynamic RebalancingRebalancing a disk group moves data between disks to ensure that every file is evenlyspread across all of the disks in a disk group.

When all of the files are evenly dispersed, all of the disks are evenly filled to the samepercentage; this ensures load balancing. Rebalancing does not relocate data based onI/O statistics nor is rebalancing started based on I/O statistics. Oracle ASMrebalancing operations are controlled by the size of the disks in a disk group.

Oracle ASM automatically initiates a rebalance after storage configuration changes,such as when you add, drop, or resize disks. The power setting parameter determinesthe speed with which rebalancing operations occur.

You can manually start a rebalance to change the power setting of a runningrebalance. A rebalance is automatically restarted if the instance on which therebalancing is running stops. Databases can remain operational during rebalancingoperations.

You can minimize the impact on database performance with the setting of theASM_POWER_LIMIT initialization parameter.

See Also:

• ASM_POWER_LIMIT for more information about the power limit setting

• Manually Rebalancing Disk Groups for more information about diskrebalancing

Chapter 1Understanding Oracle ASM Disk Group Administration

1-16

Page 35: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

2Exploring Considerations for Oracle ASMStorage

Several issues should be considered about the storage subsystem before you configureOracle Automatic Storage Management (Oracle ASM).

When preparing your storage to use Oracle ASM, first determine the storage option for yoursystem and then prepare the disk storage for your specific operating system environment.

When configuring your system's storage, you must consider the initial capacity of the systemand your plans for future growth. Oracle ASM simplifies the task of accommodating growth.However, your growth plans can affect choices, such as the size of the Oracle ASM disks.You must also consider that I/O performance depends on the interconnect between thestorage and host, not just the storage disks. As you scale up the number of nodes in acluster, you must also scale up the storage subsystem.

This chapter contains the following topics:

• Storage Resources for Disk Groups

• Oracle ASM and Multipathing

• Recommendations for Storage Preparation

• Storage Device Path and Permission Persistence

Storage Resources for Disk GroupsThere are various storage resources that can be used to create Oracle ASM disk groups.

You can create an Oracle ASM disk group using one of the following storage resources:

• Disk Partition

A disk partition can be the entire disk drive or a section of a disk drive. However, theOracle ASM disk cannot be in a partition that includes the partition table because thepartition table would be overwritten.

• Logical Unit Number (LUN)

A LUN is a disk presented to a computer system by a storage array. Oracle recommendsthat you use hardware RAID functionality to create LUNs. Storage hardware RAID 0+1 orRAID5, and other RAID configurations, can be provided to Oracle ASM as Oracle ASMdisks.

• Logical Volume

A logical volume is supported in less complicated configurations where a logical volumeis mapped to a LUN, or a logical volume uses disks or raw partitions. Logical volumeconfigurations are not recommended by Oracle because they create a duplication offunctionality. Oracle also does not recommended using logical volume managers formirroring because Oracle ASM provides mirroring.

• Network File System (NFS)

2-1

Page 36: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

An Oracle ASM disk group can be created from NFS files, including Oracle DirectNFS (dNFS). The NFS files that are provisioned to a disk group may be frommultiple NFS servers to provide better load balancing and flexible capacityplanning.

You can use NFS, with or without Direct NFS, to store data files. However, NFS isnot supported for Oracle Clusterware files. To install Oracle Real ApplicationClusters (Oracle RAC) on Windows using NFS, you must also have access to ashared storage method other than NFS for Oracle Clusterware files.

NFS-based quorum disks (quorum failure groups) should not use Direct NFS(dNFS) because dNFS does not support soft mounts. Instead, use a soft mount ofa NFS mount point for quorum disks. When using a soft mount, Oracle ASMhandles an I/O failure gracefully, and sets only the associated quorum disk offline.

With hard mounts, the Oracle ASM or the database instance may hang if the NFSserver becomes unavailable. Note that these hang situations can occur whether ornot Direct NFS is used and whether or not Oracle ASM is used for mirroring.

See Also:

Oracle Grid Infrastructure Installation and Upgrade Guide for youroperating system for information about Oracle Direct NFS and storagerequirements for Oracle ASM

Note:

• Oracle ASM Dynamic Volume Manager (Oracle ADVM) volumes andOracle Automatic Storage Management Cluster File System (OracleACFS) file systems are currently not supported on disk groups that havebeen created from NFS or Common Internet File System (CIFS) files.However, Oracle ACFS file systems may be exported as NFS or CIFSfile systems to network clients in some cases. Samba/CIFS clients onWindows cannot use ACLs when interfacing with Oracle ACFS Linux,Solaris, or AIX servers.

• Mounting loopback file systems over Oracle ACFS files is not supported.

• Block or raw devices are not supported by Oracle Universal Installer(OUI) or Database Configuration Assistant (DBCA).

The procedures for preparing storage resources for Oracle ASM are:

• Identify or create the storage devices for Oracle ASM by identifying all of thestorage resource device names that you can use to create an Oracle ASM diskgroup. For example, on Linux systems device names are typically presented fromthe /dev directory with the /dev/device_name_identifier name syntax.

• Change the ownership and the permissions on storage device resources.

For example, the following steps are required on Linux systems:

– Change the user and group ownership of devices, such as grid:asmadmin

Chapter 2Storage Resources for Disk Groups

2-2

Page 37: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

For information about Oracle ASM privileges, see About Privileges for Oracle ASM.

– Change the device permissions to read/write

Note:

To ensure that ownership and permission settings are persistent, you can useudev to ensure that the disks do not revert to root ownership when the systemsrestart.

After you have configured Oracle ASM, ensure that disk discovery has been configuredcorrectly by setting the ASM_DISKSTRING initialization parameter. For information about theASM_DISKSTRING parameter, see ASM_DISKSTRING.

Note:

Setting the ownership to oracle:dba is one example that corresponds to the defaultsettings. A nondefault installation may require different settings. In general, theowner of the disk devices should be the same as the owner of the Oracle binarysoftware. The group ownership should be OSDBA of the Oracle ASM instance,which is defined at installation. For information about Oracle ASM privileges, see About Privileges for Oracle ASM.

For detailed information about preparing disks for an Oracle ASM installation, refer to yourplatform-specific installation guide for Oracle Database, Oracle Clusterware, and Oracle RealApplication Clusters (Oracle RAC).

See Also:

Oracle Exadata documentation for information about preparing Oracle Exadatastorage

Oracle ASM and MultipathingMultipathing solutions provide failover by using redundant physical path components.

These redundant physical path components include adapters, cables, and switches thatreside between the server and the storage subsystem. If one or more of these componentsfails, then applications can still access their data, eliminating a single point of failure with theStorage Area Network (SAN), Host Bus Adapter, interface cable, or host port on a multiportedstorage array.

Multipathing is a software technology implemented at the operating system device driverlevel. Multipathing creates a pseudo device to facilitate the sharing and balancing of I/Ooperations across all of the available I/O paths. Multipathing also improves systemperformance by distributing the I/O load across all available paths, providing a higher level ofdata availability through automatic failover and failback.

Chapter 2Oracle ASM and Multipathing

2-3

Page 38: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Although Oracle ASM is not designed with multipathing functionality, Oracle ASM doesoperate with multipathing technologies. Multipathing technologies are available frommany sources. Storage vendors offer multipathing products to support their specificstorage products, while software vendors usually develop multipathing products tosupport several server platforms and storage products.

See Also:

Your storage or software vendor multipathing documentation for moreinformation about multipathing options for specific platforms and storageproducts

With Oracle ASM, you can ensure the discovery of a multipath disk by setting thevalue of the ASM_DISKSTRING initialization parameter to a pattern that matches thepseudo devices that represents the multipath disk. When I/O is sent to the pseudodevice, the multipath driver intercepts it and provides load balancing to the underlyingsubpaths.

If Oracle ASM discovers multiple paths to the same disk device, Oracle ASM thenraises an error. Because a single disk can appear multiple times in a multipathconfiguration, you must configure Oracle ASM to discover only the multipath disk.

See Also:

• Oracle ASM Disk Discovery for information about disk discovery

• My Oracle Support (https://support.oracle.com) for articles withinformation about Oracle ASM and Multipathing

• Your platform-specific installation guide for information about configuringmultipathing for your system

Recommendations for Storage PreparationRecommendations for storage preparation with Oracle ASM are discussed in thistopic.

The following are guidelines for preparing storage for use with Oracle ASM:

• Configure a separate disk group for the following:

– Oracle Cluster Registry (OCR) and voting files

– Grid Infrastructure Management Repository (GIMR) files

– Database data files

– Fast recovery area

• The number of LUNs (Oracle ASM disks) for each disk group should be at leastequal to four times the number of active I/O paths. For example, if a disk grouphas two active I/O paths, then minimum of eight LUNs should be used. The LUNsshould be of equal size and performance for each disk group.

Chapter 2Recommendations for Storage Preparation

2-4

Page 39: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

An I/O path is a distinct channel or connection between storage presenting LUNs and theserver. An active I/O path is an I/O path in which the I/O load on a LUN is multiplexedthrough multipathing software.

• Ensure that all Oracle ASM disks in a disk group have similar storage performance andavailability characteristics. In storage configurations with mixed speed drives, such asflash memory and hard disk drives (HDD), I/O performance is constrained by the slowestspeed drive.

• Oracle ASM data distribution policy is capacity-based. Ensure that Oracle ASM disks in adisk group have the same capacity to maintain balance.

• Configure a minimum of three failure groups for normal redundancy disk groups and fivefailure groups for high redundancy disk groups to maintain the necessary number ofcopies of the Partner Status Table (PST) to ensure robustness with respect to storagehardware failures.

• External redundancy disk groups can be used when external hardware, such as astorage array, provides redundancy. High-end storage arrays generally provide hardwareRAID protection.

Use Oracle ASM mirroring redundancy when not using hardware RAID, or when youneed host-based volume management functionality, such as mirroring across storagesystems. You can use Oracle ASM mirroring in configurations when mirroring betweengeographically-separated sites (extended clusters).

• Minimize I/O contention between Oracle ASM disks and other applications by dedicatingdisks in Oracle ASM disk groups.

• Choose a hardware RAID stripe size that is a power of 2 and less than or equal to thesize of the Oracle ASM allocation unit.

• Use the Oracle ASM Filter Driver feature to provide consistent device naming andpermission persistency.

See Also:

• Creating Disk Groups for a New Oracle Installation for information aboutconfiguring disk groups for a new installation

• The Oracle Cloud Storage page on the Oracle Technology Network website at http://www.oracle.com/technetwork/database/cloud-storage/index.htmlfor more information about Oracle ASM

• Oracle Database Backup and Recovery User’s Guide for information aboutconfiguring the fast recovery area

• Oracle Database Administrator’s Guide for information about specifying a fastrecovery area

• Oracle ASM Failure Groups for information about failure groups

• Administering Oracle ASM Filter Driver for Information about Oracle ASM FilterDriver

Chapter 2Recommendations for Storage Preparation

2-5

Page 40: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Storage Device Path and Permission PersistenceBefore installation, or before configuring new storage devices to use with Oracle ASM,administrators must configure storage device names and ownership to ensure thatstorage paths and ownership persist after system restarts.

Use Oracle ASM Filter Driver to maintain permissions and manage device paths. OnOracle Solaris, you can also use the Solaris I/O multipathing features to maintainpermissions and device paths.

See Also:

Oracle Grid Infrastructure Installation and Upgrade Guide for your operatingsystem for more information about configuring storage devices for path andpermission persistence.

Chapter 2Storage Device Path and Permission Persistence

2-6

Page 41: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Part IIOracle ASM Instances and Disk Groups

Part II discusses the administration of Oracle ASM instances and disk groups in the followingchapters:

• Administering Oracle ASM Instances

• Administering Oracle ASM Disk Groups

• Administering Oracle ASM Files, Directories, and Templates

• Using Views to Display Oracle ASM Information

• Administering Oracle ASM with Oracle Enterprise Manager

• Performing Oracle ASM Data Migration with RMAN

• Managing Oracle ASM With ASMCA

• Managing Oracle ASM with ASMCMD

Page 42: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

3Administering Oracle ASM Instances

Administering Automatic Storage Management (Oracle ASM) instances is similar toadministering Oracle Databases.

This chapter describes how to administer Automatic Storage Management (Oracle ASM)instances, configure Oracle ASM instance parameters, and set Oracle Database parametersfor use with Oracle ASM. The chapter also describes Oracle ASM upgrading, patching, andauthentication for Oracle ASM instance access. You can also use procedures in this chapterto migrate a database to use Oracle ASM.

Administering an Oracle ASM instance is similar to administering an Oracle Databaseinstance, but the process requires fewer procedures. You can use Oracle ASM CommandLine Utility (ASMCMD) command-line interface, Oracle ASM Configuration Assistant(ASMCA), and SQL*Plus to perform Oracle ASM instance administration tasks.

This chapter contains the following topics:

• Operating with Different Releases of Oracle ASM and Database InstancesSimultaneously

• Initialization Parameters for Oracle ASM Instances

• Administration of Oracle ASM Instances

• Upgrading and Patching Oracle ASM

• Authentication for Accessing Oracle ASM Instances

• Migration of a Database to Use Oracle ASM

• Administering Oracle ASM audit trail

See Also:

• About Oracle ASM Instances for a description of an Oracle ASM instance

• Administering Oracle ASM Filter Driver for information about Oracle ASM FilterDriver

Operating with Different Releases of Oracle ASM and DatabaseInstances Simultaneously

Oracle Automatic Storage Management (Oracle ASM) 18c supports Oracle Database 18c orolder software versions, including Oracle Database 10g Release 1 (10.1).

3-1

Page 43: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

• An Oracle ASM instance must be at Oracle ASM 18c to support OracleDatabase 18c.

• Refer to Oracle Exadata documentation for information about the OracleDatabase versions that Oracle ASM supports when Oracle Exadatastorage is present.

• There are additional compatibility considerations when using disk groupswith different releases of Oracle ASM and database instances.

When using different software versions, the database instance supports Oracle ASMfunctionality of the earliest release in use. For example, an Oracle Database 10gRelease 1 (10.1) database instance operating with an Oracle ASM 18c instance onlysupports Oracle ASM 10g Release 1 (10.1) features.

The V$ASM_CLIENT view contains the SOFTWARE_VERSION and COMPATIBLE_VERSIONcolumns with information about the software version number and instancecompatibility level.

• The SOFTWARE_VERSION column of V$ASM_CLIENT contains the software versionnumber of the database or Oracle ASM instance for the selected disk groupconnection.

• The COMPATIBLE_VERSION column contains the setting of the COMPATIBLEparameter of the database or Oracle ASM instance for the selected disk groupconnection.

You can query the V$ASM_CLIENT view on both Oracle ASM and database instances.

See Also:

• Disk Group Compatibility for information about disk group compatibilityattributes settings

• Example 6-5 for an example showing a query on the V$ASM_CLIENT view

• Views Containing Oracle ASM Information for more information about theV$ASM_CLIENT and V$ASM_* views

Initialization Parameters for Oracle ASM InstancesSettings for Oracle ASM instance initialization parameters are discussed in this topic.

To install and initially configure an Oracle ASM instance, use Oracle Universal Installer(OUI) and Oracle ASM Configuration Assistant (ASMCA).

After an Oracle ASM instance has been installed on a single-instance OracleDatabase or in an Oracle Real Application Clusters (Oracle RAC) environment, thefinal Oracle ASM configuration can be performed. Only a few Oracle ASM-specificinstance initialization parameters must be configured. The default values are usuallysufficient.

Chapter 3Initialization Parameters for Oracle ASM Instances

3-2

Page 44: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The following topics are discussed:

• About Initialization Parameter Files for an Oracle ASM Instance

• About Backing Up, Copying, and Moving an Oracle ASM Initialization Parameter File

• About Oracle ASM Initialization Parameter Settings

• About Automatic Memory Management for Oracle ASM

• Recommended Settings for Oracle ASM Initialization Parameters

• About Setting Database Initialization Parameters for Use with Oracle ASM

See Also:

• Oracle Database Reference for information about initialization parameters

• Oracle Database Administrator’s Guide for information about initializationparameter files

• Oracle Grid Infrastructure Installation and Upgrade Guide for information aboutinstalling and configuring Oracle ASM

About Initialization Parameter Files for an Oracle ASM InstanceWhen installing Oracle ASM in an Oracle Restart (standalone) configuration, OracleUniversal Installer (OUI) creates a separate server parameter file (SPFILE) and password filefor the Oracle ASM instance. The ASM SPFILE is stored in a disk group during installation.

When installing Oracle ASM in a clustered Oracle ASM environment, OUI creates a single,shared SPFILE for Oracle ASM in a disk group.

When upgrading an Oracle ASM instance, if the ASM SPFILE was originally in a shared filesystem, then the upgraded Oracle ASM instance retains the SPFILE in the same location. Ifthe original Oracle ASM instance used a PFILE, then after an upgrade the instance continuesto use a PFILE.

You can use an SPFILE or a text-based initialization parameter file (PFILE) as the OracleASM instance parameter file. If you use an SPFILE in a clustered Oracle ASM environment,then you must place the SPFILE in a disk group or on a cluster file system. Oraclerecommends that the Oracle ASM SPFILE is placed in a disk group. You cannot use a newalias created on an existing Oracle ASM SPFILE to start the Oracle ASM instance

If you do not use a shared Oracle Grid Infrastructure home, then the Oracle ASM instancecan use a PFILE. The same rules for file name, default location, and search order that applyto database initialization parameter files also apply to Oracle ASM initialization parameterfiles.

When an Oracle ASM instance searches for an initialization parameter file, the search orderis:

1. The location of the initialization parameter file specified in the Grid Plug and Play (GPnP)profile

2. If the location has not been set in the GPnP profile, then the search order changes to:

a. SPFILE in the Oracle ASM instance home

Chapter 3Initialization Parameters for Oracle ASM Instances

3-3

Page 45: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

For example, the SPFILE for Oracle ASM has the following default path in theOracle Grid Infrastructure home in a Linux environment:

$ORACLE_HOME/dbs/spfile+ASM.ora

b. PFILE in the Oracle ASM instance home

Note:

A PFILE or SPFILE is required if your configuration uses nondefaultinitialization parameters for the Oracle ASM instance.

You can administer Oracle ASM initialization parameter files with SQL*Plus, ASMCA,and ASMCMD commands.

See Also:

• Managing Oracle ASM With ASMCA for information about the ASMCAGUI and command-line interfaces

• ASMCMD Instance Management Commands for information aboutASMCMD commands for managing an Oracle ASM SPFILE; such asspbackup, spcopy, and spmove

• Oracle Database Administrator’s Guide for more information aboutcreating and maintaining initialization parameter files

• Oracle Database SQL Language Reference for information aboutcreating an SPFILE with the CREATE SPFILE SQL statement

About Backing Up, Copying, and Moving an Oracle ASM InitializationParameter File

You can back up, copy, or move an Oracle ASM SPFILE with the ASMCMD spbackup,spcopy, or spmove commands.

In addition, you can use the SQL CREATE SPFILE to create an Oracle ASM SPFILEwhen connected to the Oracle ASM instance.

You can also copy and move an Oracle ASM PFILE with the commands available onthe specific platform, such as cp for Linux.

After copying or moving an SPFILE or PFILE, you must restart the instance with theSPFILE or PFILE in the new location to use that SPFILE or PFILE.

The following topics are discussed:

• Creating, Copying, and Moving an SPFILE Into a Disk Group

• Making a Back Up Copy of an Oracle ASM SPFILE in a Disk Group

Chapter 3Initialization Parameters for Oracle ASM Instances

3-4

Page 46: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• spbackup, spcopy, and spmove for information about ASMCMD commands formanaging an SPFILE

• Oracle Database Administrator's Guide for more information about creating andmaintaining initialization parameter files

• Oracle Database SQL Language Reference for information about creating anSPFILE with the CREATE SPFILE SQL statement

• Oracle Real Application Clusters Installation Guide for information about GridPlug and Play (GPnP)

Creating, Copying, and Moving an SPFILE Into a Disk GroupIf the COMPATIBLE.ASM disk group attribute is set to 11.2 or greater for a disk group, you cancreate, copy, or move an Oracle ASM SPFILE into the disk group.

For example, after upgrading an instance from Oracle ASM 11g Release 1 (11.1) to OracleASM 11g Release 2 (11.2), you could place the Oracle ASM SPFILE in a disk group that hasCOMPATIBLE.ASM set to 11.2. For information about disk group compatibility attributes, see Disk Group Compatibility.

In the following steps, assume an Oracle ASM 11g Release 2 (11.2) instance is using aPFILE stored in $ORACLE_HOME/dbs/asmpfile.ora. You can use the SQL CREATE SPFILEstatement to create an SPFILE from a PFILE stored in a local or shared file system. If aPFILE does not exist, then it could be created with the SQL CREATE PFILE statement.

To create an SPFILE in a disk group, perform the following steps:

1. Connect to the Oracle ASM instance.

For example:

$ sqlplus / as sysasm

2. Create an SPFILE in a disk group that has COMPATIBLE.ASM set to 11.2 with the SQLCREATE SPFILE statement.

For example, create an Oracle ASM SPFILE from the existing PFILE.

SQL> CREATE SPFILE = '+DATA/asmspfile.ora' FROM PFILE = '$ORACLE_HOME/dbs/asmpfile.ora';

The CREATE SPFILE statement also updates the Grid Plug and Play (GPnP) profile. Youcan check the location of the Oracle ASM SPFILE in the GPnP profile with the ASMCMDspget command. See spget.

Note:

If you include the AS COPY option, then the CREATE SPFILE FROM PFILE statementdoes not update the clusterwide SPFILE location.

Chapter 3Initialization Parameters for Oracle ASM Instances

3-5

Page 47: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

3. Restart the Oracle ASM instance so that the instance reads the SPFILE in the newlocation.

For information on shutting down and starting up an Oracle ASM instance, see About Starting Up an Oracle ASM Instance and About Shutting Down an OracleASM Instance.

Making a Back Up Copy of an Oracle ASM SPFILE in a Disk GroupThis section describes the steps to make a back up copy of an Oracle ASM SPFILE inanother disk group using the ASMCMD commands. If necessary, then the backupcopy can be used to restore the Oracle ASM SPFILE.

The source and target disk groups must have the disk group attribute COMPATIBLE.ASMset to 11.2 or higher.

To make a copy of the Oracle ASM SPFILE in another disk group with the spcopycommand perform the following steps:

1. Locate the Oracle ASM SPFILE using the ASMCMD spget command.

For example:

ASMCMD [+] > spget+DATA/ASM/ASMPARAMETERFILE/registry.253.849343867

2. Copy the Oracle ASM SPFILE to another disk group with spcopy command.

For example:

ASMCMD [+] > spcopy +DATA/ASM/ASMPARAMETERFILE/registry.253.849343867 +FRA/spfileCopyASM.ora

Running spcopy without the -u option does not update the location of the OracleASM SPFILE. You can use spset to set the location of the Oracle ASM SPFILE inthe Grid Plug and Play (GPnP) profile.

3. List all the copies of the Oracle ASM SPFILE file contained in the FRA disk groupusing the ASMCMD ls command.

For example:

ASMCMD [+] > ls -l --absolutepath FRA/ASM/ASMPARAMETERFILEType Redund Striped Time Sys NameASMPARAMETERFILE MIRROR COARSE JUN 06 13:00:00 Y +FRA/spfileCopyASM.ora => REGISTRY.253.849533009

4. Verify the current location of the Oracle ASM SPFILE file with the spget command.

For example:

ASMCMD [+] > spget+DATA/ASM/ASMPARAMETERFILE/registry.253.849343867

In the event that the current Oracle ASM SPFILE file in a disk group has beencorrupted or that disk group is not accessible, you can use spset or spcopy with the -uoption to restore the Oracle ASM SPFILE file using the backup copy that you havepreviously created.

For example:

ASMCMD [+] > spcopy -u +FRA/spfileCopyASM.ora +DATA2/ASM/spfileASM.ora

Chapter 3Initialization Parameters for Oracle ASM Instances

3-6

Page 48: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

About Oracle ASM Initialization Parameter SettingsThere are several initialization parameters that you must set for an Oracle ASM instance. Youcan set these parameters with Oracle ASM Configuration Assistant (ASMCA). You can alsoset some parameters after database creation using SQL ALTER SYSTEM or ALTER SESSIONstatements.

The Oracle ASM parameters use suitable defaults for most environments. You cannot useparameters with names that are prefixed with ASM_* in database instance parameter files.

About Automatic Memory Management for Oracle ASMAutomatic memory management automatically manages the memory-related parameters forboth Oracle ASM and database instances with the MEMORY_TARGET parameter. Automaticmemory management is enabled by default on an Oracle ASM instance, even when theMEMORY_TARGET parameter is not explicitly set. The default value used for MEMORY_TARGET isacceptable for most environments. This is the only parameter that you must set for completeOracle ASM memory management. Oracle strongly recommends that you use automaticmemory management for Oracle ASM.

An Oracle ASM instance can automatically increase the values set for MEMORY_TARGET andMEMORY_MAX_TARGET if an ORA-04031 error is raised and automatic memory management isenabled. If MEMORY_MAX_TARGET has been explicitly set to a value, then every time ORA-04031is raised, the MEMORY_TARGET value is increased by 10% of the existing MEMORY_TARGET valueor 128 MB, whichever is greater, but not greater than the customer specifiedMEMORY_MAX_TARGET value. If MEMORY_MAX_TARGET is not explicitly set, then bothMEMORY_TARGET and MEMORY_MAX_TARGET are increased by 10% of the existing MEMORY_TARGETvalue or 128 MB, whichever is greater, for a maximum of five increases. The Oracle ASMinstance must be rebooted to use the new MEMORY_TARGET and MEMORY_MAX_TARGET settings.

If you do not set a value for MEMORY_TARGET, but you do set values for other memory relatedparameters, Oracle internally calculates the optimum value for MEMORY_TARGET based onthose memory parameter values. You can also increase MEMORY_TARGET dynamically, up tothe value of the MEMORY_MAX_TARGET parameter, just as you can do for the database instance.

Although it is not recommended, you can disable automatic memory management by eithersetting the value for MEMORY_TARGET to 0 in the Oracle ASM parameter file or by running anALTER SYSTEM SET MEMORY_TARGET=0 statement. When you disable automatic memorymanagement, Oracle reverts to automatic shared memory management and automatic PGAmemory management. To revert to Oracle Database 10g Release 2 (10.2) functionality tomanually manage Oracle ASM SGA memory, also run the ALTER SYSTEM SET SGA_TARGET=0statement. Unless specified, the behaviors of the automatic memory managementparameters in Oracle ASM instances behave the same as in Oracle Database instances.

Chapter 3Initialization Parameters for Oracle ASM Instances

3-7

Page 49: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

• For a Linux environment, automatic memory management cannot workif /dev/shm is not available or is undersized. For more information, see Oracle Database Administrator's Reference for Linux and UNIX-BasedOperating Systems. For information about platforms that supportautomatic memory management, see Oracle Database Administrator'sGuide.

• The minimum MEMORY_TARGET for Oracle ASM is 1 GB. If you setMEMORY_TARGET lower, then Oracle increases the value forMEMORY_TARGET to 1 GB automatically.

• For the recommended settings of memory initialization parameters in anOracle Exadata environment, refer to the Oracle Exadatadocumentation.

See Also:

• Oracle Database Administrator's Guide for more information about thefunctionality of automatic memory management for database instances,which varies from Oracle ASM

• Oracle Database Concepts for an overview of memory managementmethods

Recommended Settings for Oracle ASM Initialization ParametersThis section contains information about the following initialization parameters forOracle ASM:

• ASM_DISKGROUPS

• ASM_DISKSTRING

• ASM_IO_PROCESSES

• ASM_POWER_LIMIT

• ASM_PREFERRED_READ_FAILURE_GROUPS

• DB_CACHE_SIZE

• DIAGNOSTIC_DEST

• INSTANCE_TYPE

• LARGE_POOL_SIZE

• PROCESSES

• REMOTE_LOGIN_PASSWORDFILE

• SHARED_POOL_SIZE

Chapter 3Initialization Parameters for Oracle ASM Instances

3-8

Page 50: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Oracle Database Reference for more information about initialization parameters

• Oracle Database Administrator's Guide for more information about creating andmaintaining an initialization parameter file

ASM_DISKGROUPSThe ASM_DISKGROUPS initialization parameter specifies a list of disk group names that anOracle ASM instance mounts at startup when the SQL ALTER DISKGROUP ALL MOUNT statementis issued.

The Oracle ASM instance startup process executes ALTER DISKGROUP ALL MOUNT unless theNOMOUNT startup option is specified.

The default value of the ASM_DISKGROUPS parameter is a NULL string.

The ASM_DISKGROUPS parameter is dynamic. If you are using a server parameter file(SPFILE), then you do not have to manually alter the value of ASM_DISKGROUPS in mostsituations. Oracle ASM automatically adds a disk group to the parameter when the disk groupis successfully created or mounted. Oracle ASM also automatically removes a disk groupfrom the parameter when the disk group is dropped. However, the SPFILE is not updated ona manual dismount.

Note:

In Oracle Flex ASM configurations, disk groups are not removed from the SPFILEon dismount. Disk groups must always be auto-mounted so that remote instancescan access them. A remote instance is an Oracle Database, Oracle IOServer, orOracle ASM proxy instance located on a different node than the Oracle ASMinstance.

The following is an example of setting the ASM_DISKGROUPS parameter dynamically:

SQL> ALTER SYSTEM SET ASM_DISKGROUPS = DATA, FRA;

When using a text initialization parameter file (PFILE), you may edit the initializationparameter file to add the name of any disk group so that it is mounted automatically atinstance startup. You must remove the name of any disk group that you no longer wantautomatically mounted.

The following is an example of the ASM_DISKGROUPS parameter in the initialization file:

ASM_DISKGROUPS = DATA, FRA

Chapter 3Initialization Parameters for Oracle ASM Instances

3-9

Page 51: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

Issuing the ALTER DISKGROUP...ALL MOUNT or ALTER DISKGROUP...ALLDISMOUNT commands does not affect the value of ASM_DISKGROUPS.

For Oracle Database 12c Release 1 or later, Oracle ASM configurations support up to511 disk groups. Oracle ASM configurations with Oracle Database releases before 12cRelease 1 can only support up to 63 disk groups.

See Also:

• About Mounting Disk Groups at Startup for information about disk groupsthat are mounted at startup time

• Mounting and Dismounting Disk Groups for additional information aboutmounting Oracle ASM disk groups

• Managing Oracle Flex ASM for information about Oracle Flex ASM

• Oracle Database Reference for more information about theASM_DISKGROUPS initialization parameter

ASM_DISKSTRINGThe ASM_DISKSTRING initialization parameter specifies a comma-delimited list of stringsthat limits the set of disks that an Oracle ASM instance discovers.

The discovery strings can include wildcard characters. Only disks that match one ofthe strings are discovered. The same disk cannot be discovered twice.

The discovery string format depends on the Oracle ASM library and the operatingsystem that are in use. Pattern matching is supported. Refer to your operating system-specific installation guide for information about the default pattern matching.

For example on a Linux server, to limit the discovery process to only include disks thatare in the /dev/rdsk/mydisks directory for an Oracle ASM instance that does not useOracle ASM Filter Driver (Oracle ASMFD) or ASMLIB, set the ASM_DISKSTRINGinitialization parameter to:

/dev/rdsk/mydisks/*

The asterisk is required.

To limit the discovery process to only include disks that have a name that ends indisk3 or disk4, you could set ASM_DISKSTRING as follows on a Linux system:

ASM_DISKSTRING = '/dev/rdsk/*disk3', '/dev/rdsk/*disk4'

The ? character, when used as the first character of a path, expands to the Oraclehome directory. Depending on the operating system, when you use the ? characterelsewhere in the path, it is a wildcard for one character.

Chapter 3Initialization Parameters for Oracle ASM Instances

3-10

Page 52: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The default value of the ASM_DISKSTRING parameter is a NULL string. A NULL value causesOracle ASM to search a default path for all disks in the system to which the Oracle ASMinstance has read and write access. The default search path is platform-specific. Refer toyour operating system-specific installation guide for more information about the defaultsearch path.

Oracle ASM cannot use a disk unless all of the Oracle ASM instances in the cluster candiscover the disk through one of their own discovery strings. The names do not have to bethe same on every node, but all disks must be discoverable by all of the nodes in the cluster.This may require dynamically changing the initialization parameter to enable adding newstorage.

Note that the ASM_DISKSTRING initialization parameter value may also include strings thatinclude prefixes. For example:

• afd: - Oracle ASM filter driver

• o: - Oracle Exadata

• orcl: - Oracle ASMLIB

See Also:

• Oracle ASM Disk Discovery for more information about discovering disks

• Oracle Grid Infrastructure Installation and Upgrade Guide for information aboutconfiguring storage with NVMe devices, Oracle ASM Filter Driver, and OracleASMLIB

• Administering Oracle ASM Filter Driver for information about Oracle ASM FilterDriver

• Oracle Exadata documentation for information about the Oracle ASM discoverystring format for Oracle Exadata

• Oracle Database Reference for more information about the ASM_DISKSTRINGinitialization parameter

ASM_IO_PROCESSESThe ASM_IO_PROCESSES initialization parameter specifies the number of IO worker processesto be started in an Oracle IOServer (IOS) server instance.

This parameter is only applicable for an Oracle IOServer instance, which runs in an OracleGrid Infrastructure home.

IOServer instances are started automatically in the Oracle Grid Infrastructure configurationwhen generating the credential file for a client cluster. You can configure the number ofIOServer instances running in the client cluster.

The default value should work in most cases. However, under heavy IO loads a higher valuethan the default may be appropriate.

Chapter 3Initialization Parameters for Oracle ASM Instances

3-11

Page 53: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Overview of Oracle Flex ASM for information about Oracle IOServer andOracle Flex ASM

• Oracle Database Reference for more information about theASM_IO_PROCESSES initialization parameter

ASM_POWER_LIMITThe ASM_POWER_LIMIT initialization parameter specifies the default power for diskrebalancing in a disk group.

The range of values is 0 to 1024. The default value is 1. A value of 0 disablesrebalancing. Higher numeric values enable the rebalancing operation to completemore quickly, but might result in higher I/O overhead and more rebalancing processes.

• For disk groups that have the disk group ASM compatibility set to 11.2.0.2 orhigher (for example, COMPATIBLE.ASM = 11.2.0.2), the operational range of valuesis 0 to 1024 for the rebalance power.

• For disk groups that have the disk group ASM compatibility set to less than11.2.0.2, the operational range of values is 0 to 11 inclusive. If the value forASM_POWER_LIMIT is larger than 11, a value of 11 is used for these disk groups.

You can also specify the power of the rebalancing operation in a disk group with thePOWER clause of the SQL ALTER DISKGROUP .. REBALANCE statement. The range ofallowable values for the POWER clause is the same for the ASM_POWER_LIMITinitialization parameter. If the value of the POWER clause is specified larger than 11 for adisk group with ASM compatibility set to less than 11.2.0.2, then a warning isdisplayed and a POWER value equal to 11 is used for rebalancing.

The specification of the power of the rebalancing operation in a disk group only affectsrebalance operations, not new allocations to a disk group.

Note:

• Oracle recommends that you do not set the ASM_POWER_LIMITinitialization parameter to 0.

• You cannot set the ASM_POWER_LIMIT initialization parameter to 0 in anOracle Exadata or Oracle Data Appliance environment.

Chapter 3Initialization Parameters for Oracle ASM Instances

3-12

Page 54: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Manually Rebalancing Disk Groups and Tuning Rebalance Operations forinformation about the ASM_POWER_LIMIT initialization parameter, and the POWERclause

• Disk Group Compatibility for information about disk group compatibility

• Oracle Database Reference for more information about the ASM_POWER_LIMITinitialization parameter

• Oracle Database SQL Language Reference for more information about thePOWER clause of the SQL ALTER DISKGROUP REBALANCE statement

ASM_PREFERRED_READ_FAILURE_GROUPSThe ASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter value is a comma-delimited list of strings that specifies the failure groups that should be preferentially read bythe given instance.

Note:

The ASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter has beendeprecated in Oracle ASM 12c Release 2 (12.2) and may be desupported in afuture release.

The ASM_PREFERRED_READ_FAILURE_GROUPS parameter setting is instance specific. The defaultvalue is NULL. This parameter is generally used for clustered Oracle ASM instances and itsvalue can be different on different nodes.

For example:

diskgroup_name1.failure_group_name1, ...

Chapter 3Initialization Parameters for Oracle ASM Instances

3-13

Page 55: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

In an Oracle extended cluster, which contains nodes that span multiplephysically separated sites, the PREFERRED_READ.ENABLED disk group attributecontrols whether preferred read functionality is enabled for a disk group. Ifpreferred read functionality is enabled, then this functionality enables aninstance to determine and read from disks at the same site as itself, whichcan improve performance. Whether or not PREFERRED_READ.ENABLED hasbeen enabled, preferred read can be set at the failure group level on anOracle ASM instance or a client instance in a cluster with theASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter, which isavailable for backward compatibility.

The failure group values set by ASM_PREFERRED_READ_FAILURE_GROUPS takeprecedence over the PREFERRED_READ.ENABLED site values. The values ofASM_PREFERRED_READ_FAILURE_GROUPS on the client instances takeprecedence over the values on the Oracle ASM instances.

See Also:

• Preferred Read Failure Groups for more information about preferredread failure groups

• PREFERRED_READ.ENABLED for information about thePREFERRED_READ.ENABLED disk group attribute

• Oracle Real Application Clusters Administration and Deployment Guidefor more information about configuring preferred disks in extendedclusters

• Oracle Database Reference for more information about theASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter

DB_CACHE_SIZEThe setting for the DB_CACHE_SIZE parameter determines the size of the buffer cache.

You do not have to set a value for the DB_CACHE_SIZE initialization parameter if you useautomatic memory management.

This buffer cache stores metadata blocks. The default value for this parameter issuitable for most environments.

Chapter 3Initialization Parameters for Oracle ASM Instances

3-14

Page 56: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Oracle Database Administrator’s Guide for more information about setting theDB_CACHE_SIZE initialization parameter

• Oracle Database Performance Tuning Guide for more information aboutmemory configuration

• Oracle Database Reference for more information about the DB_CACHE_SIZEparameter

DIAGNOSTIC_DESTThe DIAGNOSTIC_DEST initialization parameter specifies the directory where diagnostics for aninstance are located.

The default value for an Oracle ASM instance is the $ORACLE_BASE directory for the OracleGrid Infrastructure installation.

Example 3-1 shows an example of the diagnostic directory for an Oracle ASM instance.

Example 3-1 Sample diagnostic directory for an Oracle ASM instance

$ ls $ORACLE_BASE/diag/asm/+asm/+ASMalert cdump hm incident incpkg ir lck metadata stage sweep trace

See Also:

• Oracle Database Administrator’s Guide for more information about theDIAGNOSTIC_DEST initialization parameter and the fault diagnosabilityinfrastructure.

• Oracle Database Reference for more information about the DIAGNOSTIC_DESTparameter

INSTANCE_TYPEThe INSTANCE_TYPE initialization parameter specifies whether the instance is a databaseinstance, an Oracle Automatic Storage Management (Oracle ASM) instance, or an OracleASM Proxy instance.

The following is an example of the INSTANCE_TYPE parameter in the initialization file:

INSTANCE_TYPE = ASM

In addition to values asm and rdbms, INSTANCE_TYPE can be set to asmproxy in an Oracle FlexASM configuration.

Chapter 3Initialization Parameters for Oracle ASM Instances

3-15

Page 57: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Managing Oracle Flex ASM for information about Oracle Flex ASM

• Oracle Database Reference for more information about theINSTANCE_TYPE parameter

LARGE_POOL_SIZEThe setting for the LARGE_POOL_SIZE parameter is used for large allocations.

You do not have to set a value for the LARGE_POOL_SIZE initialization parameter if youuse automatic memory management.

The default value for this parameter is suitable for most environments.

See Also:

• Oracle Database Administrator’s Guide for more information aboutsetting the LARGE_POOL_SIZE initialization parameter

• Oracle Database Performance Tuning Guide for more information aboutmemory configuration

• Oracle Database Reference for more information about theLARGE_POOL_SIZE parameter

PROCESSESThe PROCESSES initialization parameter affects Oracle ASM, but the default value isusually suitable.

However, if multiple database instances are connected to an Oracle ASM instance,then you can use the following formulas, where n is the number of database instancesconnecting to the Oracle ASM instance.

In a non-Exadata environment, the recommended settings are:

• For n < 10, PROCESSES = 50*n + 50

• For n >= 10, PROCESSES = 10*n + 450

In an Oracle Exadata environment, the recommended setting is PROCESSES = MAX(450+ 10*n, 1024).

Chapter 3Initialization Parameters for Oracle ASM Instances

3-16

Page 58: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Oracle Database Administrator’s Guide for more information about setting thePROCESSES initialization parameter

• Oracle Database Reference for more information about the PROCESSESparameter

REMOTE_LOGIN_PASSWORDFILEThe REMOTE_LOGIN_PASSWORDFILE initialization parameter specifies whether the Oracle ASMinstance checks for a password file.

This parameter operates the same for Oracle ASM and database instances.

See Also:

• Oracle Database Administrator’s Guide for more information about setting theREMOTE_LOGIN_PASSWORDFILE initialization parameter

• Oracle Database Reference for more information about theREMOTE_LOGIN_PASSWORDFILE parameter

SHARED_POOL_SIZEThe setting for the SHARED_POOL_SIZE parameter determines the amount of memory requiredto manage the instance.

You do not have to set a value for the SHARED_POOL_SIZE initialization parameter if you useautomatic memory management. The setting for this parameter is also used to determine theamount of space that is allocated for extent storage. The default value for this parameter issuitable for most environments.

See Also:

• Oracle Database Administrator’s Guide for more information about setting theSHARED_POOL_SIZE initialization parameter

• Oracle Database Performance Tuning Guide for more information aboutmemory configuration

• Oracle Database Reference for more information about the SHARED_POOL_SIZEparameter

Chapter 3Initialization Parameters for Oracle ASM Instances

3-17

Page 59: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

About Setting Database Initialization Parameters for Use with OracleASM

When you do not use automatic memory management in a database instance, theSGA parameter settings for a database instance may require minor modifications tosupport Oracle ASM. When you use automatic memory management, the sizing datadiscussed in this section can be treated as informational only or as supplementalinformation to help determine the appropriate values that you should use for the SGA.Oracle highly recommends using automatic memory management.

The following are configuration guidelines for SGA sizing on the database instance:

• PROCESSES initialization parameter—Add 16 to the current value

• LARGE_POOL_SIZE initialization parameter—Add an additional 600K to the currentvalue

• SHARED_POOL_SIZE initialization parameter—Aggregate the values from thefollowing queries to obtain the current database storage size that is either onOracle ASM or stored in Oracle ASM. Next, determine the redundancy type andcalculate the SHARED_POOL_SIZE using the aggregated value as input.

SELECT SUM(bytes)/(1024*1024*1024) FROM V$DATAFILE;SELECT SUM(bytes)/(1024*1024*1024) FROM V$LOGFILE a, V$LOG b WHERE a.group#=b.group#;SELECT SUM(bytes)/(1024*1024*1024) FROM V$TEMPFILE WHERE status='ONLINE';

– For disk groups using external redundancy, every 100 GB of space needs 1MB of extra shared pool plus 2 MB

– For disk groups using normal redundancy, every 50 GB of space needs 1 MBof extra shared pool plus 4 MB

– For disk groups using high redundancy, every 33 GB of space needs 1 MB ofextra shared pool plus 6 MB

See Also:

• Oracle Database Administrator’s Guide for information about managingmemory allocation in an Oracle Database instance

• Oracle Database Performance Tuning Guide for more information aboutmemory configuration and use

Administration of Oracle ASM InstancesOracle ASM is typically installed in an Oracle Grid Infrastructure home separate fromthe Oracle Database home. Only one Oracle ASM instance is supported on a server ina standard configuration; however, Oracle Flex ASM provides additional configurationoptions.

Chapter 3Administration of Oracle ASM Instances

3-18

Page 60: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

When managing an Oracle ASM instance, the administration activity should be performed inthe Oracle Grid Infrastructure home.

This section describes how to administer Oracle ASM instances under the following topics:

• Using Oracle Grid Infrastructure for a Standalone Server

• About Starting Up an Oracle ASM Instance

• About Shutting Down an Oracle ASM Instance

• About Administering Oracle ASM Instances with Server Control Utility

• About Out of Place Upgrades

• About Configuring Oracle Grid Infrastructure with the Configuration Wizard

• About Active Session History Sampling for Oracle ASM

• About Oracle Home User on Windows

See Also:

• Managing Oracle Flex ASM for information about Oracle Flex ASM

• Creating Database Files in Oracle ASM Using SQL*Plus for information aboutOracle ASM and creating database files

Using Oracle Grid Infrastructure for a Standalone ServerOracle Grid Infrastructure for a standalone server (Oracle Restart) improves the availability ofyour Oracle Database.

When you install the Oracle Grid Infrastructure for a standalone server, it includes bothOracle ASM and Oracle Restart. Oracle Grid Infrastructure for a standalone server (OracleRestart) runs out of the Oracle Grid Infrastructure home, which you install separately fromOracle Database homes.

Oracle Restart provides managed startup and restart of a single-instance (non-clustered)Oracle Database, Oracle ASM instance, service, listener, and any other process running onthe server. If an interruption of a service occurs after a hardware or software failure, OracleRestart automatically takes the necessary steps to restart the component.

With Server Control Utility (SRVCTL) you can add a component, such as an Oracle ASMinstance, to Oracle Restart. You then enable Oracle Restart protection for the Oracle ASMinstance. With SRVCTL, you also remove or disable Oracle Restart protection.

Chapter 3Administration of Oracle ASM Instances

3-19

Page 61: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Oracle Database Administrator’s Guide for information about configuringand administering Oracle Restart

• Oracle Real Application Clusters Administration and Deployment Guidefor information about automatically restarting single-instance databasesresiding on an Oracle RAC node

• Oracle Grid Infrastructure Installation and Upgrade Guide for informationabout installation of Oracle Grid Infrastructure

About Starting Up an Oracle ASM InstanceThis section describes how to start Oracle ASM instances under the following topics:

• Connecting To and Starting Up an Oracle ASM Instance

• Starting Up an Oracle ASM instance with an Incorrect SPFILE Path

• About Mounting Disk Groups at Startup

• About Restricted Mode

Connecting To and Starting Up an Oracle ASM InstanceYou start an Oracle ASM instance similarly to the way in which you start an OracleDatabase instance with some minor differences.

When starting an Oracle ASM instance with SQL*Plus, note the following:

• To connect to a local Oracle ASM instance with SQL*Plus, set the ORACLE_SIDenvironment variable to the Oracle ASM system identifier (SID).

The default Oracle ASM SID for a single-instance database is +ASM, and thedefault SID for Oracle ASM for an Oracle RAC node is +ASMnode_number wherenode_number is the number of the node. The ORACLE_HOME environment variablemust be set to the Grid Infrastructure home where Oracle ASM was installed.

Note:

Oracle recommends that you do not change the default Oracle ASM SIDname.

• The initialization parameter file must contain the following entry:

INSTANCE_TYPE = ASM

This parameter indicates that an Oracle ASM instance, not a database instance, isstarting.

• When you run the STARTUP command, rather than trying to mount and open adatabase, this command attempts to mount Oracle ASM disk groups.

Chapter 3Administration of Oracle ASM Instances

3-20

Page 62: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

After the Oracle ASM instance has started, you can mount disk groups with the ALTERDISKGROUP...MOUNT command.

• The associated Oracle Database instance does not have to be running when you startthe associated Oracle ASM instance.

The following list describes how Oracle ASM interprets SQL*Plus STARTUP commandparameters.

• FORCE Parameter

Issues a SHUTDOWN ABORT to the Oracle ASM instance before restarting it.

If an Oracle Automatic Storage Management Cluster File System (Oracle ACFS) filesystem is currently mounted on Oracle ADVM volumes, the file system should first bedismounted. Otherwise, applications encounter I/O errors and Oracle ACFS user dataand metadata may not be written to storage before the Oracle ASM storage is fenced.

• MOUNT or OPEN Parameter

Mounts the disk groups specified in the ASM_DISKGROUPS initialization parameter. This isthe default if no command parameter is specified.

• NOMOUNT Parameter

Starts up the Oracle ASM instance without mounting any disk groups.

• RESTRICT Parameter

Starts up an instance in restricted mode that enables access only to users with both theCREATE SESSION and RESTRICTED SESSION system privileges. You can use the RESTRICTclause in combination with the MOUNT, NOMOUNT, and OPEN clauses.

In restricted mode, database instances cannot use the disk groups. In other words,databases cannot open files that are in that disk group. Also, the disk group cannot bemounted by any other instance in the cluster. Mounting the disk group in restricted modeenables only one Oracle ASM instance to mount the disk group. This mode is useful tomount the disk group for repairing configuration issues.

The following is a sample SQL*Plus session for starting an Oracle ASM instance.

SQLPLUS /NOLOGSQL> CONNECT SYS AS SYSASMEnter password: sys_passwordConnected to an idle instance.

SQL> STARTUPASM instance started

Total System Global Area 71303168 bytesFixed Size 1069292 bytesVariable Size 45068052 bytesASM Cache 25165824 bytesASM disk groups mounted

Chapter 3Administration of Oracle ASM Instances

3-21

Page 63: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Authentication for Accessing Oracle ASM Instances for more informationabout user authentication

• startup for information about starting an Oracle ASM instance withASMCMD startup command

• About Restricted Mode for information about restricted mode

• About Mounting Disk Groups at Startup for information about disk groupsthat are mounted at startup time

• Mounting and Dismounting Disk Groups for information about mountingdisk groups

• Oracle Automatic Storage Management Cluster File SystemAdministrator's Guide for information about dismounting an Oracle ACFSfile system

• Oracle Database Administrator’s Guide for more information about usingenvironment variables to select instances

• Oracle Database Administrator’s Guide for more information aboutstarting up and shutting down Oracle instances

• Oracle Real Application Clusters Administration and Deployment Guidefor information about starting an Oracle ASM instance with SRVCTL inOracle RAC

• Oracle Clusterware Administration and Deployment Guide forinformation about Oracle Clusterware Cluster subcomponent processesand background processes

• Oracle Database Concepts for information about Oracle Databasebackground processes

• Oracle Database Reference for a description of the Oracle backgroundprocesses

Starting Up an Oracle ASM instance with an Incorrect SPFILE PathIf the SPFILE path in the GPnP profile is incorrect, you can start the Oracle ASMinstance as follows:

1. Create a PFILE with one line in it that identifies the path to the SPFILE.

For example:

Create the /oracle/dbs/spfileasm_init.ora file that contains:

SPFILE='+DATA/asm/asmparameterfile/asmspfile.ora'

2. Start up the instance using the initialization parameter file.

For example:

SQL> STARTUP PFILE=/oracle/dbs/spfileasm_init.ora

3. After the instance is running, use the ASMCMD spset command to update theSPFILE path in the GPnP profile. See spset.

Chapter 3Administration of Oracle ASM Instances

3-22

Page 64: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

For example:

ASMCMD> spset +DATA/asm/asmparameterfile/asmspfile.ora

See Also:

Oracle Database Administrator's Guide for more information about using STARTUPwith a nondefault server parameter file

About Mounting Disk Groups at StartupAt startup, the Oracle ASM instance attempts to mount the following disk groups:

• Disk groups specified in the ASM_DISKGROUPS initialization parameter

• Disk group used by Cluster Synchronization Services (CSS) for voting files

• Disk groups used by Oracle Clusterware for Oracle Cluster Registry (OCR)

• Disk group used by the Oracle ASM instance to store the ASM server parameter file(SPFILE)

If no disk groups are found in the previous list, then the Oracle ASM instance does not mountany disk groups at startup. After the Oracle ASM instance has started, you can mount diskgroups with the ALTER DISKGROUP...MOUNT command. For more information, see Mountingand Dismounting Disk Groups.

About Restricted ModeYou can use the STARTUP RESTRICT command to control access to an Oracle ASM instancewhile you perform maintenance. When an Oracle ASM instance is active in this mode, all ofthe disk groups that are defined in the ASM_DISKGROUPS parameter are mounted inRESTRICTED mode. This prevents databases from connecting to the Oracle ASM instance. Inaddition, the restricted clause of the ALTER SYSTEM statement is disabled for the Oracle ASMinstance. The ALTER DISKGROUP diskgroup MOUNT statement is extended to enable OracleASM to mount a disk group in restricted mode.

When you mount a disk group in RESTRICTED mode, the disk group can only be mounted byone instance. Clients of Oracle ASM on that node cannot access that disk group while thedisk group is mounted in RESTRICTED mode. The RESTRICTED mode enables you to performmaintenance tasks on a disk group in the Oracle ASM instance without interference fromclients.

Rebalance operations that occur while a disk group is in RESTRICTED mode eliminate the lockand unlock extent map messaging that occurs between Oracle ASM instances in an OracleRAC environment. This improves the overall rebalance throughput. At the end of amaintenance period, you must explicitly dismount the disk group and remount it in normalmode.

About Shutting Down an Oracle ASM InstanceYou can initiate the Oracle ASM shutdown process by running the SHUTDOWN command inSQL*Plus.

Chapter 3Administration of Oracle ASM Instances

3-23

Page 65: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Before you run this command, ensure that the ORACLE_SID environment variable is setto the Oracle ASM SID so that you can connect to the local Oracle ASM instance. Thedefault Oracle ASM SID for a single-instance database is +ASM, and the default SID forOracle ASM for an Oracle RAC node is +ASMnode_number where node_number is thenumber of the node. The ORACLE_HOME environment variable must be set to the GridInfrastructure home where Oracle ASM was installed.

If you are not using Oracle Flex ASM, Oracle strongly recommends that you shut downall database instances that use the Oracle ASM instance and dismount all file systemsmounted on Oracle ASM Dynamic Volume Manager (Oracle ADVM) volumes beforeattempting to shut down the Oracle ASM instance. If you are using Oracle Flex ASM,Oracle Flex ASM clients move to other running Oracle ASM instances if an OracleASM instance is shut down.

If Oracle Cluster Registry (OCR) or voting files are stored in a disk group, the diskgroup can only be dismounted by shutting down the Oracle ASM instance as part ofshutting down the clusterware on a node. To shut down the clusterware, run crsctlstop crs.

To shut down an Oracle ASM instance, perform the following steps:

SQLPLUS /NOLOGSQL> CONNECT SYS AS SYSASMEnter password: sys_passwordConnected.SQL> SHUTDOWN NORMAL

The following list describes the SHUTDOWN modes and the behavior of the Oracle ASMinstance in each mode.

• NORMAL Clause

Oracle ASM waits for any in-progress SQL to complete before performing anorderly dismount of all of the disk groups and shutting down the Oracle ASMinstance. Before the instance is shut down, Oracle ASM waits for all of thecurrently connected users to disconnect from the instance. If any databaseinstances are connected to the Oracle ASM instance, then the SHUTDOWN commandreturns an error and leaves the Oracle ASM instance running. NORMAL is the defaultshutdown mode.

• IMMEDIATE or TRANSACTIONAL Clause

Oracle ASM waits for any in-progress SQL to complete before performing anorderly dismount of all of the disk groups and shutting down the Oracle ASMinstance. Oracle ASM does not wait for users currently connected to the instanceto disconnect. If any database instances are connected to the Oracle ASMinstance, then the SHUTDOWN command returns an error and leaves the Oracle ASMinstance running. Because the Oracle ASM instance does not contain anytransactions, the TRANSACTIONAL mode behaves the same as IMMEDIATE mode.

• ABORT Clause

The Oracle ASM instance immediately shuts down without the orderly dismount ofdisk groups. This causes recovery to occur upon the next Oracle ASM startup.

If any database instance is connected to the Oracle ASM instance, then thedatabase instance stops.

If any Oracle Automatic Storage Management Cluster File System (Oracle ACFS)file systems are currently mounted on Oracle ADVM volumes, those file systems

Chapter 3Administration of Oracle ASM Instances

3-24

Page 66: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

should first be dismounted. Otherwise, applications encounter I/O errors and OracleACFS user data and metadata may not be written to storage before the Oracle ASMstorage is fenced.

See Also:

• Authentication for Accessing Oracle ASM Instances for more information aboutuser authentication

• Authentication for Accessing Oracle ASM Instances for more information aboutuser authentication on Oracle ASM instance

• Oracle Automatic Storage Management Cluster File System Administrator'sGuide for information about dismounting an Oracle ACFS file system

• Oracle Database Administrator’s Guide for more information about usingenvironment variables to select instances

• Oracle Database Administrator’s Guide for more information about starting upand shutting down Oracle instances

• Oracle Clusterware Administration and Deployment Guide for information aboutmanaging voting files, Oracle Cluster Registry (OCR), and Oracle LocalRegistry (OLR)

About Administering Oracle ASM Instances with Server Control UtilityIn addition to the Oracle ASM administration procedures that this section describes, you canuse Server Control Utility (SRVCTL) in clustered Oracle ASM environments to perform thefollowing Oracle ASM administration tasks:

• Add and remove the Oracle ASM Oracle Clusterware (CRS) resource in Oracle ClusterRegistry (OCR)

• Enable, disable, start, and stop Oracle ASM instances

• Display the Oracle ASM instance configuration and status

• Add, modify, and remove Oracle ASM network resources

• Add, modify, remove, enable, disable, start, and stop Oracle ASM listener resources

See Also:

Oracle Clusterware Administration and Deployment Guide and Oracle RealApplication Clusters Administration and Deployment Guide for information aboutSRVCTL commands

About Out of Place UpgradesWith an out-of-place upgrade, the installer installs the newer version of Oracle GridInfrastructure in a separate Oracle Grid Infrastructure home.

Chapter 3Administration of Oracle ASM Instances

3-25

Page 67: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

An in-place upgrade of Oracle Grid Infrastructure 11g Release 2 (11.2) is notsupported. For example, an upgrade of Oracle Grid Infrastructure 11g Release 2(11.2.0.1) to Oracle Grid Infrastructure 11g Release 2 (11.2.0.2) must be an out ofplace upgrade.

See Also:

Oracle Grid Infrastructure Installation and Upgrade Guide for informationabout installing Oracle Grid Infrastructure, out of place upgrades, andperforming rolling upgrades of Oracle Grid Infrastructure and Oracle ASM

About Configuring Oracle Grid Infrastructure with the ConfigurationWizard

The Oracle Grid Infrastructure configuration wizard can update the configuration of anOracle Grid Infrastructure environment after the software has been installed. Theconfiguration wizard accepts your input, validates the input, and populates theconfiguration data into the CRSCONFIG_PARAMS file. If additional scripts must be run, theconfiguration wizard directs you to run those scripts.

See Also:

Oracle Clusterware Administration and Deployment Guide for informationabout the Oracle Grid Infrastructure configuration wizard.

About Active Session History Sampling for Oracle ASMActive Session History sampling is now available on Oracle ASM instances. Thisactivity is exposed in the dynamic V$ACTIVE_SESSION_HISTORY view. Active SessionHistory sampling requires a diagnostic pack license for the Oracle ASM instance.

See Also:

• Oracle Database Performance Tuning Guide for more information aboutgathering performance statistics

• Oracle Database Reference for a description of theV$ACTIVE_SESSION_HISTORY view

About Oracle Home User on WindowsOracle Database supports the use of an Oracle home user, which can be specified atinstallation time. The Oracle home user is associated with an Oracle home and itcannot be changed after installation. Different Oracle homes on a system can sharethe same Oracle home user or use different Oracle home user names.

Chapter 3Administration of Oracle ASM Instances

3-26

Page 68: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

In previous releases on Windows operating systems, Oracle services were required to run asLocal System privileges, which are fully privileged. This feature enables the database,listener, and job scheduler services to run with low and non-administrative user privileges toallow tighter control of security. The Oracle home user can be a built-in account or a Windowsuser account. A Windows user account should be a low privileged (non-Administrator)account to ensure that the Oracle home user has a limited set of privileges, ensuring thatOracle Database services have only those privileges required to run Oracle products. TheWindows user account can be a Local User, a Domain User, or a Managed Services Accountin general. However, Oracle RAC, Oracle Restart, and Oracle Grid Infrastructure installationsrequire the use of the Domain User as the Oracle home user because a clusterwide identityis necessary.

See Also:

Oracle Database Platform Guide for Microsoft Windows for information aboutrunning Oracle services on Windows platforms and different types of Windows useraccounts

Upgrading and Patching Oracle ASMThis section contains the following topics:

• About Oracle ASM Rolling Upgrade

• About Oracle ASM Rolling Patches

Note:

• For Oracle RAC environments, the Oracle Clusterware version number must beat least equal to the version number of the patch that you are applying to theOracle Database.

• You must apply the patch to the Oracle Grid Infrastructure home before youapply it to the Oracle Database home.

About Oracle ASM Rolling UpgradeOracle ASM rolling upgrade enables you to independently upgrade or patch clustered OracleASM nodes without affecting database availability which provides greater uptime.

Rolling upgrade means that some features of a clustered Oracle ASM environment continueto function when one or more of the nodes in the cluster uses different software versions.Oracle recommends that you perform an Oracle ASM rolling upgrade when performing anOracle Clusterware rolling upgrade.

To perform a rolling upgrade, your environment must be prepared. Oracle Clusterware mustbe fully upgraded to the next patch or release version before you start the Oracle ASM rollingupgrade. In addition, you should prepare your Oracle Clusterware in a rolling upgrademanner to ensure high availability and maximum uptime.

Chapter 3Upgrading and Patching Oracle ASM

3-27

Page 69: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note that Oracle ASM is upgraded with Oracle Clusterware for Oracle 11g Release 2(11.2) or later as both are in the Oracle Grid Infrastructure home.

Note:

• Rolling upgrades only apply to clustered Oracle ASM instances, and youcan only perform rolling upgrades on environments with OracleDatabase 11g or later. You cannot use this feature to upgrade fromOracle Database 10g to Oracle Database 11g.

• See Oracle Exadata documentation for information about performing arolling upgrading of an Oracle ASM instance when Oracle Exadatastorage is present.

See Also:

• Oracle Grid Infrastructure Installation and Upgrade Guide for informationabout performing, and restrictions related to, a rolling upgrade of OracleASM

• Oracle Database Upgrade Guide for information about upgrading OracleDatabase

• Oracle Database SQL Language Reference for information about therolling migration clause of the ALTER SYSTEM command

About Oracle ASM Rolling PatchesYou can apply patches in a clustered Oracle ASM environment to update one node ata time to the latest patch level without affecting the overall availability of the OracleASM cluster or the database clusters using Oracle ASM for storage.

The ALTER SYSTEM ROLLING PATCH SQL statement enables you to start and stop rollingpatches. For example:

SQL> ALTER SYSTEM START ROLLING PATCH;

SQL> ALTER SYSTEM STOP ROLLING PATCH;

You can determine if the cluster is in rolling patch mode by executing a SYS_CONTEXTSQL query for Cluster State. A new state (In Rolling Patch) is added to informing theuser that the cluster is in rolling patch mode.

The queries in Example 3-2 display information about rolling patches. To run thesequeries, you must be connected to the Oracle ASM instance in the Grid home, and theGrid Infrastructure home must be configured with the Oracle Clusterware option for anOracle RAC environment.

You can view all the patch Ids applied on the node and cluster by querying theV$PATCHES view.

ASMCMD commands for rolling patches include:

Chapter 3Upgrading and Patching Oracle ASM

3-28

Page 70: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• showclusterstate

• showpatches

• showversion

Example 3-2 Determining rolling patch mode and patch level

SELECT SYS_CONTEXT('SYS_CLUSTER_PROPERTIES', 'CLUSTER_STATE') FROM DUAL;

SELECT SYS_CONTEXT('SYS_CLUSTER_PROPERTIES', 'CURRENT_PATCHLVL') FROM DUAL;

See Also:

• ASMCMD Instance Management Commands for information about ASMCMDcommands to monitor upgrade operations on an Oracle ASM instance

• Oracle Database SQL Language Reference for information about the rollingpatch clause of the ALTER SYSTEM command

• Oracle Grid Infrastructure Installation and Upgrade Guide for information aboutperforming, and restrictions related to, a rolling migration of Oracle ASM andOracle Grid Infrastructure homes

Authentication for Accessing Oracle ASM InstancesAn Oracle ASM instance does not have a data dictionary, so the only way to connect to anOracle ASM instance is by using one of three system privileges, SYSASM, SYSDBA, or SYSOPER.There are three modes of connecting to Oracle ASM instances:

• Local connection using operating system authentication

• Local connection using password authentication

• Remote connection by way of Oracle Net Services using password authentication

This section describes the following topics:

• About Privileges for Oracle ASM

• Creating Users with the SYSASM Privilege

• Operating System Authentication for Oracle ASM

• Password File Authentication for Oracle ASM

• Managing a Shared Password File in a Disk Group

The Oracle ASM and database instances must have read/write operating system accessrights to disk groups. For example, the Oracle ASM instance and the database instance musthave identical read and write permissions for the disks that comprise the related Oracle ASMdisk group. For Linux and UNIX systems, this is typically provided through shared Linux andUNIX group membership (OSASM group). On Windows systems, the Oracle ASM servicemust be run as Administrator.

Chapter 3Authentication for Accessing Oracle ASM Instances

3-29

Page 71: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Managing Oracle ASM File Access Control for Disk Groups forinformation about file permissions and Oracle ASM File Access Control

• Oracle Grid Infrastructure Installation and Upgrade Guide for youroperating system-specific information about how to ensure that theOracle ASM and database instances have member disk access

• Oracle Database Security Guide for information about maintainingdatabase security, including assigning passwords

About Privileges for Oracle ASMDuring Oracle ASM installation, you can use one operating system group for all usersor divide system privileges so that database administrators, storage administrators,and database operators each have distinct operating system privilege groups.

Whether you create separate operating system privilege groups or use one group toprovide operating system authentication for all system privileges, you should useSYSASM to administer an Oracle ASM instance. The SYSDBA privilege cannot beused to administer an Oracle ASM instance. If you use the SYSDBA privilege to runadministrative commands on an Oracle ASM instance, the operation results in anerror. The SYSDBA privilege is intended to be used by the database to access diskgroups.

Oracle also recommends the use of a less privileged user, such as ASMSNMP withSYSDBA privileges that is created during installation, for monitoring the Oracle ASMinstance.

Operating system authentication using membership in the group or groups designatedas OSDBA, OSOPER, and OSASM is valid on all Oracle platforms. Connecting to anOracle ASM instance as SYSASM grants you full access to all of the available OracleASM disk groups and management functions.

This section contains these topics:

• Using One Operating System Group for Oracle ASM Users

• Using Separate Operating System Groups for Oracle ASM Users

• The SYSASM Privilege for Administering Oracle ASM

• The SYSDBA Privilege for Managing Oracle ASM Components

See Also:

Oracle Automatic Storage Management Cluster File System Administrator'sGuide for information about privileges and Oracle ACFS

Chapter 3Authentication for Accessing Oracle ASM Instances

3-30

Page 72: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Using One Operating System Group for Oracle ASM UsersIf you do not want to divide the privileges for system access into separate operating systemgroups, then you can designate one operating system group as the group whose membersare granted access as OSDBA, OSOPER, and OSASM for Oracle ASM privileges. Thedefault operating system group name for all of these is usually dba and that group is typicallychosen for the default configuration.

Table 3-1 shows an example of a Linux deployment without separated privileges for OracleASM users.

Table 3-1 One operating system group and one set of privileges for all Oracle ASM users

Role/Software Owner User Group/Privilege

Oracle ASM administrator/Oracle Grid Infrastructurehome

oracle dba/SYSASM, SYSDBA, SYSOPER

Database administrator 1/Database home 1 oracle dba/SYSASM, SYSDBA, SYSOPER

Database administrator 2/Database home 2 oracle dba/SYSASM, SYSDBA, SYSOPER

Operating system disk device owner oracle dba

Using Separate Operating System Groups for Oracle ASM UsersYou can designate separate operating system groups as the operating system authenticationgroups for privileges on Oracle ASM. The following list describes the separate operatingsystem authentication groups for Oracle ASM and the privileges that their members aregranted.

• OSASM group (for example: asmadmin)

This group is granted the SYSASM privilege, which provides full administrative privilegesfor the Oracle ASM instance.

• OSDBA for Oracle ASM group (for example: asmdba)

This group is granted the SYSDBA privilege on the Oracle ASM instance, which grantsaccess to data stored on Oracle ASM. This group has a subset of the privileges of theOSASM group.

When you implement separate administrator privileges, choose an OSDBA group for theOracle ASM instance that is different than the group that you select for the databaseinstance (dba).

• OSOPER for Oracle ASM group (for example: asmoper)

This group is granted the SYSOPER privilege on the Oracle ASM instance, whichprovides operations such as startup, shutdown, mount, dismount, and check disk group.This group has a subset of the privileges of the OSASM group.

When you implement separate Oracle ASM and database administrator duties, thisconfiguration requires different group and different software owners. Implicitly thisimplementation requires that the OSASM and OSDBA are different groups. For thisconfiguration, you must create an OSDBA for Oracle ASM group and a database instancemust be a member of that group to access the Oracle ASM instance.

In an installation that has been configured as Oracle Grid Infrastructure, the Oracle ASMuser, such as grid, does not have to be a member of the Oracle Database OSDBA group,

Chapter 3Authentication for Accessing Oracle ASM Instances

3-31

Page 73: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

such as dba1 or dba2, because the Oracle Clusterware database agent runs as thedatabase owner and can use SYSDBA to connect to the database.

However, in an Oracle Restart configuration, the Oracle ASM user (grid) must be amember of the OSDBA group (dba1, dba2, ...) of every database. This requirement isnecessary because Oracle Restart software runs as the Oracle ASM user (grid) andthis user must be able to start and stop the databases using the CONNECT / AS SYSDBAauthentication.

Additionally, the owner of the operating system disk devices should be the same as theowner of the Oracle ASM software.

Table 3-2 shows an example of a Linux deployment using separate operating systemprivilege groups for Oracle ASM users.

Table 3-2 Separated operating system groups and privileges for Oracle ASM users

Role/Software Owner User Group/Privilege

Oracle ASM administrator/Oracle GridInfrastructure home

grid asmadmin (OSASM)/SYSASM

asmdba (OSDBA for ASM)/SYSDBA

asmoper (OSOPER for ASM)/SYSOPER

dba1, dba2, ... (OSDBA for the databaseswhen in an Oracle Restart configuration)

Database administrator 1/Database home 1 oracle1 asmdba (OSDBA for ASM)/SYSDBA

oper1 (OSOPER for database 1)/SYSOPER

dba1 (OSDBA for database 1)/SYSDBA

Database administrator 2/Database home 2 oracle2 asmdba (OSDBA for ASM)/SYSDBA

oper2 (OSOPER for database 2)/SYSOPER

dba2 (OSDBA for database 2)/SYSDBA

Operating system disk device owner grid asmadmin (OSASM)

The SYSASM Privilege for Administering Oracle ASMSYSASM is a system privilege that enables the separation of the SYSDBA databaseadministration privilege from the Oracle ASM storage administration privilege. Accessto the SYSASM privilege is granted by membership in an operating system group thatis designated as the OSASM group. This is similar to SYSDBA and SYSOPERprivileges, which are system privileges granted through membership in the groupsdesignated as the OSDBA and OSOPER operating system groups. You can designateone group for all of these system privileges, or you can designate separate groups foreach operating system privilege.

You can also grant the SYSASM privilege with password file authentication, asdiscussed in Password File Authentication for Oracle ASM.

To connect locally as SYSASM using password authentication with SQL*Plus, use thefollowing statement:

sqlplus SYS AS SYSASM...Enter password:

To connect remotely as SYSASM using password authentication with SQL*Plus, usethe following statement:

Chapter 3Authentication for Accessing Oracle ASM Instances

3-32

Page 74: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

sqlplus sys@\"myhost.mydomain.com:1521/+ASM\" AS SYSASM...Enter password:

In the previous example, +ASM is the service name of the Oracle ASM instance.

To connect locally as SYSASM to an Oracle ASM instance using operating systemauthentication with SQL*Plus, use the following statement:

sqlplus / AS SYSASM

The SYSDBA Privilege for Managing Oracle ASM ComponentsYou can connect as SYSDBA to use SQL*Plus or ASMCMD commands to manage OracleASM components associated with the database. When running SQL or ASMCMD operationswith the SYSDBA privilege, connect to the database instance rather than the Oracle ASMinstance.

Connecting as SYSDBA to the database instance has a limited set of Oracle ASM privileges.For example, you cannot create a disk group when connected with the SYSDBA privilege.

When connected as SYSDBA to the database instance, the Oracle ASM operations arelimited to:

• Create and delete files, aliases, directories, and templates

• Examine various Oracle ASM instance views

• Operate on files that were created by this user or only access files to which another userhad explicitly granted access

• Granting Oracle ASM File Access Control to other users

Creating Users with the SYSASM PrivilegeWhen you are logged in to an Oracle ASM instance as SYSASM, you can use thecombination of CREATE USER and GRANT SQL statements to create a user who has theSYSASM privilege.

You also can revoke the SYSASM privilege from a user using the REVOKE command, and youcan drop a user from the password file using the DROP USER command.

Note:

• These commands update the password file for the local Oracle ASM instanceonly.

• Oracle ASM does not support the creation of external and global users.

The following example describes how to perform these SQL operations for the user identifiedas new_user:

REM create a new user, then grant the SYSASM privilegeSQL> CREATE USER new_user IDENTIFIED by new_user_passwd;SQL> GRANT SYSASM TO new_user;

REM connect the user to the ASM instance

Chapter 3Authentication for Accessing Oracle ASM Instances

3-33

Page 75: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

SQL> CONNECT new_user AS SYSASM;Enter password:

REM revoke the SYSASM privilege, then drop the userSQL> REVOKE SYSASM FROM new_user;SQL> DROP USER new_user;

When you revoke the last privilege of a user in an Oracle ASM password file, the useris not automatically deleted as is done in the Oracle Database password file. You mustrun DROP USER to delete a user with no privileges in an Oracle ASM password file.

See Also:

• orapwusr for information about creating a user with Oracle ASMcommand-line utility (ASMCMD)

• Oracle Database SQL Language Reference for information about theCREATE USER and GRANT commands

• Oracle Database Administrator’s Guide for information about creatingand maintaining a password file

Operating System Authentication for Oracle ASMMembership in the operating system group designated as the OSASM group providesoperating system authentication for the SYSASM system privilege. OSASM isprovided exclusively for Oracle ASM. Initially, only the user that installs ASM is amember of the OSASM group, if you use a separate operating system group for thatprivilege. However, you can add other users. Members of the OSASM group areauthorized to connect using the SYSASM privilege and have full access to OracleASM, including administrative access to all disk groups that are managed by thatOracle ASM instance.

On Linux and UNIX systems, dba is the default operating system group designated asOSASM, OSOPER, and OSDBA for Oracle ASM.

On Windows systems, ORA_ASMADMIN, ORA_ASMDBA, and ORA_ASMOPER are the operatingsystem groups designated for OSASM, OSDBA and OSOPER respectively for Oracle ASM.

SQL*Plus commands, ASMCMD commands, and ASMCA use operating systemauthentication.

See Also:

• Oracle Database Administrator’s Guide for more information about usingoperating system authentication

• Oracle Grid Infrastructure Installation and Upgrade Guide for informationabout installation of the Oracle Grid Infrastructure

• Oracle Database Installation Guide for your specific operating system forinformation about default operating system groups

Chapter 3Authentication for Accessing Oracle ASM Instances

3-34

Page 76: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Password File Authentication for Oracle ASMPassword file authentication for Oracle ASM can work both locally and remotely. To enablepassword file authentication, you must create a password file for Oracle ASM.

If you select the Oracle ASM storage option, then ASMCA creates a password file for OracleASM with initial users (SYS and ASMSNMP) when ASMCA configures the Oracle ASM diskgroups. To add other users to the password file, you can use the CREATE USER and GRANTcommands.

If you configure an Oracle ASM instance without using ASMCA, then you must manuallycreate a password file and grant the SYSASM privilege to user SYS.

SQL*Plus commands use password file authentication.

See Also:

• About Privileges for Oracle ASM for information about privileges for OracleASM

• Oracle Database Administrator’s Guide for information about creating andmaintaining a password file

• Oracle Database SQL Language Reference for information about the CREATEUSER and GRANT commands

• Oracle Database Security Guide for information about database security

• Oracle Database Reference for information about the V$PWFILE_USERS viewwhich lists users who have been granted SYSASM, SYSDBA, and SYSOPERprivileges as derived from the password file.

Managing a Shared Password File in a Disk GroupYou can manage a shared password file on a disk group enabling access to the single fileacross the cluster system.

This sections contains these topics:

• About a Shared Password File in a Disk Group

• Creating a Password File in a Disk Group

• Backing Up and Restoring an Oracle ASM Password File in a Disk Group

Chapter 3Authentication for Accessing Oracle ASM Instances

3-35

Page 77: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

After a change has been made to the location of the password file, thefollowing SQL statement should be executed to flush the password filemetadata cache.

SQL> ALTER SYSTEM FLUSH PASSWORDFILE_METADATA_CACHE

The location of the password file can be changed by running orapwd, or theASMCMD pwcopy, pwcreate, pwdelete, pwmove, or pwset command.

For information about ASMCMD commands to manage an Oracle ASM or databaseinstance password file in a disk group, refer to ASMCMD Instance ManagementCommands.

See Also:

• Oracle Database Administrator's Guide for information about maintaininga password file

• Oracle Database Reference for information about theREMOTE_LOGIN_PASSWORDFILE initialization parameter

• Oracle Clusterware Administration and Deployment Guide and OracleReal Application Clusters Administration and Deployment Guide forinformation about SRVCTL commands

About a Shared Password File in a Disk GroupAn individual password file for Oracle Database or Oracle ASM can reside on adesignated Oracle ASM disk group. Having the password files reside on a singlelocation accessible across the cluster reduces maintenance costs and situationswhere passwords become out of sync.

You can use a password file located on a disk group for authentication only if theOracle ASM instance is running and the designated disk group is mounted. Otherwise,operating system authentication must be used to bootstrap the startup of the OracleASM instance and stack.

The COMPATIBLE.ASM disk group attribute must be set to 12.1 or higher for the diskgroup where the password is to be located. The SYSASM privilege is required to managethe Oracle ASM password file. The SYSDBA privilege on Oracle ASM is required tomanage the database password file.

The shared password file in a disk group is managed by ASMCMD commands, theORAPWD tool, and SRVCTL commands. ORAPWD supports the creation of password fileson an Oracle ASM disk group. All other password file manipulation is performed withASMCMD or SRVCTL commands.

Before running commands, such as ORAPWD, to create a password file, ensure that theORACLE_SID and ORACLE_HOME environmental variables have been set properly. Forexample, before setting the password file for Oracle ASM, set the ORACLE_SID and

Chapter 3Authentication for Accessing Oracle ASM Instances

3-36

Page 78: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

ORACLE_HOME environmental variables to ensure that you can connect to the local Oracle ASMinstance. For information about environmental variables and connecting to an Oracle ASMinstance, refer to Connecting To and Starting Up an Oracle ASM Instance.

SRVCTL provides commands to manage a password file in a disk group, such as thefollowing commands for updating and displaying the location of the password file:

$ srvctl modify asm -pwfile location$ srvctl modify database -db dbname -pwfile location$ srvctl config asm

Creating a Password File in a Disk Group

Note:

Do not use orapwd to create a new Oracle ASM password file when Oracle ASM isconfigured in a cluster. If the Oracle ASM password file is inaccessible in a clusterconfiguration, you must restore the password file using an available backup ratherthan create a new file. For articles about recreating a shared Oracle ASM passwordfile in a cluster, such as document 1929673.1, refer to articles at My Oracle Support(https://support.oracle.com).

You can use orapwd to create a password file in a specified Oracle ASM disk group.

• To create an Oracle Database password file in a disk group from the existing passwordfile on the file system, run orapwd with the dbuniquename switch. The dbuniquenameswitch specifies to create an Oracle Database password file for the database instanceidentified by orcl.

1. Determine that the Oracle Database password file is currently located on the filesystem.

SQL> SELECT file_name FROM V$PASSWORDFILE_INFO; FILE_NAME ---------------------------------------------------------------------- /u01/app/oracle/product/19.1.0/db_home1/dbs/orapworcl

2. Run orapwd to move the password file to an Oracle ASM disk group.

$ orapwd file='+data/ORCL/orapwdb' dbuniquename='orcl'

Enter password for SYS:

3. After the password file has been moved, update the password metadata cache withthe ALTER SYSTEM statement and then confirm the new password file location.

SQL> ALTER SYSTEM FLUSH PASSWORDFILE_METADATA_CACHE;System altered.

SQL> SELECT file_name FROM v$passwordfile_info; FILE_NAME ---------------------------------------------------------------------- +DATA/ORCL/orapwdb

• To create an Oracle ASM password file in a disk group, run orapwd with the asm switchset to y.

Chapter 3Authentication for Accessing Oracle ASM Instances

3-37

Page 79: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

$ orapwd file='+data/ASM/orapwasm' asm=y

Enter password for SYS:

• To create an Oracle ASM password file in an Oracle ASM disk group from anexisting password file, run orapwd with the input_file switch and the asm switchset to y.

$ orapwd input_file='/oraclegrid/dbs/orapwasm' file='+data/ASM/orapwasm' asm=y

Enter password for SYS:

Backing Up and Restoring an Oracle ASM Password File in a Disk GroupYou can make a backup of the Oracle ASM password file, and if the Oracle ASMpassword file is lost or the disk group becomes inaccessible, then you can restore thebackup password file.

This section describes the steps to back up the Oracle ASM password file to a diskgroup and the steps to restore the Oracle ASM password file.

The source and target disk groups must have the disk group attribute COMPATIBLE.ASMset to 12.1 or higher.

1. Locate the password file using the ASMCMD pwget command.

For example:

ASMCMD [+] > pwget --asm+DATA/orapwasm

2. Back up the password file to another disk group with the pwcopy command.

For example:

ASMCMD [+] > pwcopy +DATA/orapwasm +FRA/my_pwfile_backup

Using pwcopy without the --asm or --dbuniquename option does not change thecurrent location of the password file. If necessary after the copy is made, you canset the current password file location with the pwset command.

3. Verify which password file is in the current location after making a backup with thepwcopy command.

For example:

ASMCMD [+] > pwget --asm+DATA/orapwasm

4. Verify the backup password file was created.

For example:

ASMCMD [+] > ls +fra/my_pwfile_backupmy_pwfile_backup

5. To restore the Oracle ASM password file, you can use pwset or pwcopy.

To restore the Oracle ASM password file from the backup and use the existinglocation, use the pwset command with the --asm option.

For example:

ASMCMD [+] > pwset --asm +FRA/my_pwfile_backup

Chapter 3Authentication for Accessing Oracle ASM Instances

3-38

Page 80: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

To restore the Oracle ASM password file from the backup to another disk group, use thepwcopy command with the --asm option.

For example:

ASMCMD [+] > pwcopy --asm +FRA/my_pwfile_backup +DATA2/my_orapwasm

The --asm option with the pwset and pwcopy command sets the password location for theOracle ASM instance.

6. Verify the location of the current password file with the pwget command if you havechanged the location.

For example:

ASMCMD [+] > pwget --asm+DATA2/my_orapwasm

If the location of the current password file displayed is not the expected location, thenflush the password metadata cache to refresh the password file information.

SQL> ALTER SYSTEM FLUSH PASSWORDFILE_METADATA_CACHE;System altered.

Migration of a Database to Use Oracle ASMWith a new installation of Oracle Database and Oracle ASM, you can initially create yourdatabase and select the Oracle ASM storage option. If you have an existing Oracle Databasethat stores database files in the operating system file system, then you can migrate some orall of your data files to Oracle ASM storage.

Oracle provides several methods for migrating your database to Oracle ASM. Using OracleASM enables you to realize the benefits of automation and simplicity in managing yourdatabase storage. To migrate to Oracle ASM, you can use the methods described in thefollowing sections:

• About Using Oracle Recovery Manager to Migrate Databases to Oracle ASM

• Best Practices Technical Briefs on Migrating to Oracle ASM

Note:

You must upgrade to at least Oracle Database 10g before migrating your databaseto Oracle ASM.

About Using Oracle Recovery Manager to Migrate Databases to OracleASM

You can use Oracle Recovery Manager (RMAN) to manually migrate to Oracle ASM. You canalso use RMAN to migrate a single tablespace or data file to Oracle ASM.

For more information, see Performing Oracle ASM Data Migration with RMAN.

Chapter 3Migration of a Database to Use Oracle ASM

3-39

Page 81: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Best Practices Technical Briefs on Migrating to Oracle ASMThe Oracle Maximum Availability Architecture (MAA) website provides excellent bestpractices technical technical briefs based on different scenarios, such as:

• Minimal Downtime Migration to Oracle ASM

• Platform Migration using Transportable Tablespaces

• Platform Migration using Transportable Database

See Also:

• Information about best practices for migrating to Oracle ASM on theOracle Maximum Availability Architecture (MAA) website at https://www.oracle.com/database/technologies/high-availability/maa.html

• Additional information on the Oracle ASM website at https://www.oracle.com/database/technologies/rac/asm.html

Administering Oracle ASM audit trailThis document explains how to manage the audit trail records in Oracle ASMinstances.

Oracle ASM audit records with Syslog• Oracle ASM audit trail records are redirected to the Syslog facility.

• With this facility, the Oracle ASM audit trail records are written to /var/log/oraasmaudit.log file.

• Log rotation is configured for Oracle ASM audit trail records in /etc/logrotate.d/oraasmaudit configuration file. Audit logs are rotated once every four weeks andwill be compressed after they are rotated.

Managing Oracle ASM audit records in Operating system audit trail

Operating system audit trailEnabling Operating system audit trail

To disable syslog auditing and enable Operating system audit trail, setAUDIT_SYSLOG_LEVEL initialization parameter to NULL and AUDIT_TRAIL initializationparameter to ‘OS’.

Chapter 3Administering Oracle ASM audit trail

3-40

Page 82: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• AUDIT_FILE_DEST initialization parameter

• AUDIT_TRAIL initialization parameter

Purging Operating system audit trail files

• See Oracle Database Security Guide for more information on purging audit trail files.

• ASMCMD Audit Files Management Commands provides detailed information aboutASMCMD commands to manage Oracle ASM audit trail files.

See Also:

– audcreatejob ASMCMD command

– audsettimestamp ASMCMD command

– audcleanaudittrail ASMCMD command

Managing Oracle ASM audit records in Unified audit trailUnified audit trail

• See Oracle Database Security Guide for more information about unified auditing.

• Unified audit trail records are available through

– GV$UNIFIED_AUDIT_TRAIL view for Oracle ASM RAC instances.

Enabling Unified audit trail

• See Oracle Database Security Guide for more details on enabling unified audit trail.

Purging Unified audit trail files

• See Oracle Database Security Guide for more information on purging audit trail files.

• ASMCMD Audit Files Management Commands provides detailed information aboutASMCMD commands to manage Oracle ASM audit trail files.

See Also:

– audcreatejob ASMCMD command

– audsettimestamp ASMCMD command

– audcleanaudittrail ASMCMD command

Chapter 3Administering Oracle ASM audit trail

3-41

Page 83: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Audit Trail Properties in Operating System and Unified Audit Trail

Table 3-3 Audit Trail Size and Age Properties

Property Name Description

Audit file max size • Audit file max size can have a minimumvalue of 1 KB and maximum value of2000000 KB. The default value is 10000KB.

• Oracle ASM instance will stop writingaudit records to the audit files uponreaching the file max size limit. The filesare renamed and a new file will be createdfor subsequent audit records.

• See ASMCMD Audit Files ManagementCommands to set the audit file maxproperty.

Audit file max age • Audit file max age can have a minimumvalue of 1 day and maximum value of 497days. The default value is 5 days.

• Oracle ASM instance will stop writingaudit records to the audit files uponreaching the file max age limit. The filesare renamed and a new file will be createdfor subsequent audit records.

• See ASMCMD Audit Files ManagementCommands to set the audit file max age.

Audit purge job interval • Audit purge job interval can have aminimum value of 1 hour and maximumvalue of 999 hours.

• See ASMCMD Audit Files ManagementCommands to set the audit purge jobinterval.

See Also:

• audclearproperty ASMCMD command

• Oracle Database PL/SQL Packages and Types Reference for moredetails about audit trail properties.

Chapter 3Administering Oracle ASM audit trail

3-42

Page 84: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

4Administering Oracle ASM Disk Groups

Administration of Oracle ASM disk groups includes creating, altering, dropping, mounting,and dismounting tasks.

This chapter describes how to administer Oracle Automatic Storage Management (OracleASM) disk groups. This information includes how to create, alter, drop, mount, and dismountOracle ASM disk groups. The database instances that use Oracle ASM can continueoperating while you administer disk groups.

The examples in this chapter use SQL statements. These examples assume that SQL*Plus isrun from the Oracle grid home where Oracle ASM is installed and the Oracle environmentalvariables are set to this home. The examples also assume that the Oracle ASM instance isrunning. This chapter contains the following topics:

• Managing Disk Group Attributes

• Creating Disk Groups

• Altering Disk Groups

• Oracle ASM Disk Discovery

• Managing Capacity in Disk Groups

• Oracle ASM Mirroring and Disk Group Redundancy

• Performance and Scalability Considerations for Disk Groups

• Disk Group Compatibility

• Managing Oracle ASM File Access Control for Disk Groups

• Maintaining Disk Groups

• Managing Oracle ASM Flex Disk Groups

See Also:

• About Starting Up an Oracle ASM Instance for information about starting up anOracle ASM instance

• Managing Oracle ASM With ASMCA for information about administering OracleASM disk groups with Oracle ASM Configuration Assistant (ASMCA)

• Managing Oracle ASM with ASMCMD for information about administeringOracle ASM disk groups with ASMCMD

• The Oracle Cloud Storage page on the Oracle Technology Network website at http://www.oracle.com/technetwork/database/cloud-storage/index.htmlfor more information about Oracle ASM

4-1

Page 85: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Managing Disk Group AttributesDisk group attributes are parameters that are bound to a disk group, rather than anOracle ASM instance. Some disk group attributes can be set when a disk group iscreated or altered. Other disk attributes can only be set when a disk group is createdor only be set when a disk group is altered.

This section contains the following topics:

• About Viewing and Setting Disk Group Attributes

• Summary of Disk Group Attributes

In addition to the disk group attributes listed in this section, template attributes are alsoassigned to a disk group. For information about template attributes, see ManagingDisk Group Templates.

About Viewing and Setting Disk Group AttributesYou can set and display disk group attribute settings.

You can display disk group attributes with the V$ASM_ATTRIBUTE view and theASMCMD lsattr command.

Disk group attributes can be set with the ATTRIBUTE clause of the ALTER DISKGROUP orCREATE DISKGROUP SQL statement and the ASMCMD setattr and mkdg commands.

See Also:

• Example 6-1 for an example of the use of the V$ASM_ATTRIBUTE view

• lsattr for information about the lsattr command

• setattr for information about the setattr command

• mkdg for information about the mkdg command

• Managing Disk Groups with ASMCA for information about setting diskgroup attributes with Oracle ASM Configuration Assistant (ASMCA)

Summary of Disk Group AttributesThe Oracle ASM disk group attributes are listed in this section.

• ACCESS_CONTROL.ENABLED

• ACCESS_CONTROL.UMASK

• AU_SIZE

• CELL.SMART_SCAN_CAPABLE

• CELL.SPARSE_DG

• COMPATIBLE.ASM

• COMPATIBLE.RDBMS

Chapter 4Managing Disk Group Attributes

4-2

Page 86: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• COMPATIBLE.ADVM

• CONTENT.CHECK

• CONTENT.TYPE

• CONTENT_HARDCHECK.ENABLED

• DISK_REPAIR_TIME

• FAILGROUP_REPAIR_TIME

• IDP.BOUNDARY and IDP.TYPE

• LOGICAL_SECTOR_SIZE

• PHYS_META_REPLICATED

• PREFERRED_READ.ENABLED

• SCRUB_ASYNC_LIMIT

• SECTOR_SIZE

• STORAGE.TYPE

• THIN_PROVISIONED

• VAM_MIGRATION_DONE

ACCESS_CONTROL.ENABLEDThis attribute configures Oracle ASM File Access Control and can only be set when altering adisk group.

For information about the ACCESS_CONTROL.ENABLED attribute, see Setting Disk GroupAttributes for Oracle ASM File Access Control.

ACCESS_CONTROL.UMASKThis attribute configures Oracle ASM File Access Control and can only be set when altering adisk group.

For information about the ACCESS_CONTROL.UMASK attribute, see Setting Disk Group Attributesfor Oracle ASM File Access Control.

AU_SIZEThis attribute specifies allocation unit (AU) size and can only be set when creating a diskgroup. Example 4-1 shows how the AU_SIZE is specified with the CREATE DISKGROUP SQLstatement.

For information about allocation units, refer to About Oracle ASM Allocation Units .

CELL.SMART_SCAN_CAPABLEThis attribute is only applicable to the configuration of Oracle Exadata storage.

Chapter 4Managing Disk Group Attributes

4-3

Page 87: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

Oracle Exadata documentation

CELL.SPARSE_DGThis attribute is only applicable to the configuration of Oracle Exadata storage.

See Also:

Oracle Exadata documentation

COMPATIBLE.ASMThis attribute specifies the Oracle ASM compatibility level of a disk group.Compatibility attributes can be set when the disk group is created and advanced whena disk group is altered, but compatibility attributes cannot be reversed. For informationabout the COMPATIBLE.ASM attribute, refer to Disk Group Compatibility Attributes.

COMPATIBLE.RDBMSThis attribute specifies the database compatibility level of a disk group. Compatibilityattributes can be set when the disk group is created and advanced when a disk groupis altered, but compatibility attributes cannot be reversed. For information about theCOMPATIBLE.RDBMS attribute, refer to Disk Group Compatibility Attributes.

COMPATIBLE.ADVMThis attribute specifies the Oracle Automatic Storage Management Cluster FileSystem (Oracle ACFS) and Oracle ASM Dynamic Volume Manager (Oracle ADVM)compatibility level of a disk group. Compatibility attributes can be set when the diskgroup is created and advanced when a disk group is altered, but compatibilityattributes cannot be reversed. For information about the COMPATIBLE.ADVM attribute,refer to Disk Group Compatibility Attributes.

See Also:

Oracle Automatic Storage Management Cluster File System Administrator'sGuide for more information about Oracle ACFS and Oracle ADVM

CONTENT.CHECKThe CONTENT.CHECK attribute enables or disables content checking when performingdata relocation operations for a disk group.

The attribute value can be set to true (enabled) or false (disabled).

Chapter 4Managing Disk Group Attributes

4-4

Page 88: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

When CONTENT.CHECK is enabled, an Oracle ASM relocation process (rebalance, resync, orresilver) detects corruptions during a data copy operation and performs automatic blockcorruption recovery by replacing these corruptions with an uncorrupted mirror copy if one isavailable.

The content check process detects and repairs corruptions for situations when the I/Ooperation is successful, but the blocks have invalid content. The process also performs aHardware Assisted Resilient Data (HARD) check for all supported files and a block headercheck for data files.

This attribute can only be set when altering a disk group.

See Also:

Manually Rebalancing Disk Groups and Tuning Rebalance Operations forinformation about disk group rebalancing

CONTENT.TYPEThis attribute identifies the disk group type: data, recovery, or system. The type valuedetermines where Oracle ASM places the nearest neighbor disk in the failure group whereOracle ASM mirrors copies of the data. Oracle ASM uses this attribute value to make it lesslikely that a double failure in the storage medium causes disk groups of different contenttypes to become unavailable. Specifying this attribute enables Oracle ASM to better deployall disk groups in the available storage.

The default value is data which specifies a distance of 1 to the nearest neighbor disk. A valueof recovery specifies a distance of 3 to the nearest neighbor disk and a value of systemspecifies a distance of 5.

The attribute can be specified when creating or altering a disk group. If CONTENT.TYPEattribute is set or changed using ALTER DISKGROUP, then the new configuration does not takeeffect until a disk group rebalance is explicitly run.

The CONTENT.TYPE attribute is only valid for disk groups that are set to normal or highredundancy. The COMPATIBLE.ASM attribute must be set to 11.2.0.3 or higher to enable theCONTENT.TYPE attribute for the disk group.

This attribute can be set with ASMCMD mkdg or SQL CREATE and ALTER DISKGROUPstatements.

For example:

SQL> CREATE DISKGROUP data NORMAL REDUNDANCY FAILGROUP controller1 DISK '/devices/diska1' NAME diska1,... ATTRIBUTE 'compatible.asm' = '12.1.0.1', 'content.type' = 'recovery',...

SQL> ALTER DISKGROUP data SET ATTRIBUTE 'content.type' = 'data';

This attribute is primarily intended for use with Oracle Exadata storage.

Chapter 4Managing Disk Group Attributes

4-5

Page 89: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

For information about disk resync, see Oracle ASM Fast Mirror Resync.

See Also:

• Oracle Exadata documentation

• My Oracle Support (https://support.oracle.com) for information aboutusing the CONTENT.TYPE attribute with Oracle Exadata storage

CONTENT_HARDCHECK.ENABLEDThe CONTENT_HARDCHECK.ENABLED disk group attribute enables or disables HardwareAssisted Resilient Data (HARD) checking when performing data copy operations forrebalancing a disk group.

The attribute value can be set to true or false. This attribute can only be set whenaltering a disk group.

• When the CONTENT.CHECK disk group attribute is set to enabled (true), the settingof CONTENT_HARDCHECK.ENABLED is ignored and checking is done on the content ofuser data, including HARD checks.

• When the CONTENT.CHECK attribute is set to disabled (false) and theCONTENT_HARDCHECK.ENABLED attribute is set to enabled (true), only HARDchecking is performed.

• When the CONTENT.CHECK attribute is set to disabled (false) and theCONTENT_HARDCHECK.ENABLED attribute is set to disabled (false), no checking isperformed.

See Also:

Manually Rebalancing Disk Groups and Tuning Rebalance Operations forinformation about disk group rebalancing

DISK_REPAIR_TIMEThis attribute specifies the time interval to repair a disk and bring it back online beforeinitiating the drop operation. This attribute can only be set when altering a disk groupand is only applicable to normal and high redundancy disk groups.

For information about disk repair time, see Oracle ASM Fast Mirror Resync.

FAILGROUP_REPAIR_TIMEThis attribute specifies a default repair time for the failure groups in the disk group.The failure group repair time is used if Oracle ASM determines that an entire failuregroup has failed. The default value is 24 hours (24h). If there is a repair time specifiedfor a disk, such as with the DROP AFTER clause of the SQL ALTER DISKGROUP OFFLINEDISK statement, that disk repair time overrides the failure group repair time.

Chapter 4Managing Disk Group Attributes

4-6

Page 90: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

This attribute can only be set when altering a disk group and is only applicable to normal andhigh redundancy disk groups.

For information about failure group repair time, see Oracle ASM Fast Mirror Resync.

IDP.BOUNDARY and IDP.TYPE

Note:

The Intelligent Data Placement (IDP) feature has been deprecated since OracleASM 12c Release 2 (12.2) and is planned for desupport in a future release.

These attributes are used to configure Oracle Exadata storage.

See Also:

Oracle Exadata documentation

LOGICAL_SECTOR_SIZE

The LOGICAL_SECTOR_SIZE disk group attribute specifies the logical sector size for a diskgroup. The value can be set when creating or altering a disk group.

The value of LOGICAL_SECTOR_SIZE specifies the smallest unit of I/O allowed on the diskgroup. The value must be less than or equal to the size of the SECTOR_SIZE disk groupattribute.

COMPATIBLE.ASM must be set to 12.2 or greater to use the LOGICAL_SECTOR_SIZE disk groupattribute.

For information about setting the LOGICAL_SECTOR_SIZE disk group attribute, see Specifyingthe Logical and Physical Sector Size.

For information about the SECTOR_SIZE disk group attribute, refer to SECTOR_SIZE.

PHYS_META_REPLICATEDThis disk group attribute tracks the replication status of a disk group. When the Oracle ASMcompatibility of a disk group is advanced to 12.1 or higher, the physical metadata of each diskis replicated. This metadata includes the disk header, free space table blocks, and allocationtable blocks. The replication is performed online asynchronously. This attribute value is set totrue by Oracle ASM if the physical metadata of every disk in the disk group has beenreplicated.

This disk group attribute is only defined in a disk group with the Oracle ASM disk groupcompatibility (COMPATIBLE.ASM) set to 12.1 and higher. This attribute is read-only and isintended for information only. A user cannot set or change its value. The values are eithertrue or false.

Chapter 4Managing Disk Group Attributes

4-7

Page 91: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

PREFERRED_READ.ENABLEDIn an Oracle extended cluster, which contains nodes that span multiple physicallyseparated sites, the PREFERRED_READ.ENABLED disk group attribute controls whetherpreferred read functionality is enabled for a disk group.

If preferred read functionality is enabled, then this functionality enables an instance todetermine and read from disks at the same site as itself, which can improveperformance.

Each Oracle ASM instance in an Oracle extended cluster has the information todetermine the site in which it is located. If preferred read functionality is enabled, thenbased on the site information, the preferred status for a disk is determined to be true ifthe disk is in the same site as the instance. Otherwise, if the disk is not located at thesame site as the Oracle ASM instance, the preferred status for a disk is set to false.

For extended clusters, the preferred read setting is enabled by default with a TRUEsetting for the PREFERRED_READ.ENABLED disk group attribute of each disk group. Forclusters that are not extended (only one physical site), preferred read is disabled.Preferred read status applies to extended, normal, high, and flex redundancy diskgroups.

Oracle Database 12c Release 2 (12.2) is required and COMPATIBLE.ASM must be set to12.2 or greater to use PREFERRED_READ.ENABLED.

Whether or not PREFERRED_READ.ENABLED has been enabled, preferred read can be setat the failure group level on an Oracle ASM instance or a client instance in a clusterwith the ASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter, which isavailable for backward compatibility.

To determine whether a disk has preferred read status, you can check thePREFERRED_READ column of the V$ASM_DISK view.

See Also:

• ASM_PREFERRED_READ_FAILURE_GROUPS for information aboutthe ASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter

• About Oracle ASM Extended Disk Groups for information about OracleASM extended disk groups

• Oracle Grid Infrastructure Installation and Upgrade Guide for informationabout Oracle extended clusters

• Oracle Database Reference for information about all of the V$ASM*dynamic performance views

SCRUB_ASYNC_LIMIT

The SCRUB_ASYNC_LIMIT disk group attribute sets the maximum allowed outstandingparallel read requests for asynchronous scrubbing.

The range of values is 1 to 1024. The default value is 1.

Chapter 4Managing Disk Group Attributes

4-8

Page 92: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

COMPATIBLE.ASM must be set to 12.2 or greater to use this disk group attribute.

For information about the scrubbing operation, refer to Scrubbing Disk Groups.

SECTOR_SIZE

The SECTOR_SIZE disk group attribute specifies the sector size for a disk group. The value canbe set when creating or altering a disk group.

The value of SECTOR_SIZE is used for the block size of newly-created redo logs and OracleACFS file systems. The value can be changed to facilitate migration of disks to differentsector sizes. The value must be greater than or equal to the size of the LOGICAL_SECTOR_SIZEdisk group attribute.

COMPATIBLE.ASM must be set to 12.2 or greater to use the 12.2 functionality of SECTOR_SIZE,which includes the ability to alter the sector size after a disk group has been created.

For information about setting the SECTOR_SIZE disk group attribute, see Specifying the Logicaland Physical Sector Size.

For information about the LOGICAL_SECTOR_SIZE disk group attribute, refer to LOGICAL_SECTOR_SIZE.

STORAGE.TYPEThis disk group attribute specifies the type of the disks in the disk group. The possible valuesare AXIOM, ZFSSA, and OTHER. If the attribute is set to AXIOM or ZFSSA, then all disks in the diskgroup must be of that type. If the attribute is set to OTHER, then any types of disks can be inthe disk group.

If the STORAGE.TYPE disk group attribute is set to AXIOM or ZFSSA, then functionality for HybridColumnar Compression (HCC) can be enabled for Pillar Axiom or ZFS storage.

Note:

Pillar Axiom storage must be added as SCSI/Fiber Channel.

To set the STORAGE.TYPE attribute, the COMPATIBLE.ASM and COMPATIBLE.RDBMS disk groupattributes must be set to 11.2.0.3 or higher. For maximum support with ZFS storage, set theCOMPATIBLE.ASM and COMPATIBLE.RDBMS disk group attributes to 11.2.0.4 or higher. Forinformation about disk group compatibility attributes, refer to Disk Group Compatibility.

The STORAGE.TYPE attribute can be set when creating a disk group or when altering a diskgroup. The attribute cannot be set when clients are connected to the disk group. Forexample, the attribute cannot be set when an Oracle ADVM volume is enabled on the diskgroup.

The attribute is not visible in the V$ASM_ATTRIBUTE view or with the ASMCMD lsattrcommand until the attribute has been set.

Chapter 4Managing Disk Group Attributes

4-9

Page 93: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

Oracle Database Concepts for more information about Hybrid ColumnarCompression. Hybrid Columnar Compression is a feature of certain Oraclestorage systems.

THIN_PROVISIONEDThis attribute enables or disables the functionality to discard unused storage spaceafter a disk group rebalance is completed. The attribute value can be true to enable orfalse to disable the functionality. The default value is false.

Storage vendor products that support thin provisioning have the capability to reuse thediscarded storage space for a more efficient overall physical storage utilization. Givensuch support from a storage vendor, when the COMPACT phase of a rebalance operationhas completed, Oracle ASM informs the storage which space is no longer used andcan be repurposed. If a rebalance is not running, you can issue a rebalance with theALTER DISKGROUP ... REBALANCE SQL statement.

Note:

The THIN_PROVISIONED attribute is supported only with Oracle ASM FilterDriver (Oracle ASMFD) in Oracle Grid Infrastructure 12.2 and later releaseson Linux.

See Also:

• Administering Oracle ASM Filter Driver for information about OracleASMFD

• My Oracle Support (https://support.oracle.com) for articles aboutOracle ASM and Oracle ASMFD, such as notes 1369107.1 and2034681.1, and additional articles about Oracle ASM and thinprovisioning

• Tuning Rebalance Operations for information about disk grouprebalancing

VAM_MIGRATION_DONE

Virtual Allocation Metadata (VAM) supports flexible storage allocation. TheVAM_MIGRATION_DONE disk group attribute must be enabled and the migrationcompleted before migrating a NORMAL or HIGH redundancy disk group to a FLEXredundancy disk group without the use of a restrictive mount.

Chapter 4Managing Disk Group Attributes

4-10

Page 94: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Creating Disk GroupsThis topic introduces information about creating disk groups.

You can use the CREATE DISKGROUP SQL statement to create a disk group.

This section contains the following topics:

• About Creating a Disk Group

• Creating Disk Groups Using the CREATE DISKGROUP SQL Statement

• Creating Disk Groups for a New Oracle Installation

• Specifying the Logical and Physical Sector Size

• Storing Oracle Cluster Registry and Voting Files in Oracle ASM Disk Groups

See Also:

• Oracle Grid Infrastructure Installation and Upgrade Guide for information aboutstorage requirements for Oracle Automatic Storage Management

• Oracle Database SQL Language Reference for information about the CREATEDISKGROUP SQL statement

About Creating a Disk GroupThere are multiple items you need to specify when you create a disk group.

When creating a disk group, you:

• Assign a unique name to the disk group.

The specified disk group name is not case sensitive and is always converted touppercase when stored internally.

Note:

Do not use identifiers for Oracle ASM disk group names that must be quoted,including # and $ characters. While the use of quoted identifiers for OracleDatabase objects may be valid as names in some tools, the names may not bevalid when using other tools that manage that object. For more informationabout naming Oracle Database objects, refer to Oracle Database SQLLanguage Reference.

• Determine the redundancy level of the disk group.

For Oracle ASM to mirror files, specify a redundancy level such as NORMAL REDUNDANCY(two-way mirroring by default for most file types), HIGH REDUNDANCY (three-way mirroringfor all files), FLEX REDUNDANCY, or EXTENDED REDUNDANCY.

Chapter 4Creating Disk Groups

4-11

Page 95: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Specify EXTERNAL REDUNDANCY if you do not want mirroring by Oracle ASM. Forexample, you might choose EXTERNAL REDUNDANCY to use storage array protectionfeatures.

After a disk group is created with NORMAL or HIGH redundancy, you can migrate thedisk group to a FLEX redundancy disk group with the CONVERT REDUNDANCY TO FLEXclause of the ALTER DISKGROUP SQL statement. You cannot migrate an EXTERNALdisk group to a FLEX redundancy disk group. When migrating to a flex disk group,the disk group must have a minimum of three failure groups and must be mountedin restricted mode (MOUNTED RESTRICTED) for the duration of the migration.

To change the redundancy level for NORMAL, HIGH, or EXTERNAL disk groups to aNORMAL, HIGH, or EXTERNAL, you must create another disk group with theappropriate redundancy and then move the files to the new disk group.

For FLEX and EXTENDED redundancy disk groups, the disk group redundancycannot be changed. However, the redundancy of the files in the disk group can bechanged by modifying the REDUNDANCY property of the respective file group.

• Identify the disks that are to be formatted as Oracle ASM disks belonging to thedisk group.

The disks can be specified using operating system dependent wildcard charactersin search strings that Oracle ASM then uses to find the disks. You can specifynames for the disks with the NAME clause or use the system-generated names.

• Optionally indicate that the disks belong to specific failure groups.

You must create failure groups of equal size to maintain space balance and evendistribution of mirror data.

• Optionally determine the type of failure group, such as quorum (QUORUM) or regular(default).

• Optionally provide disk group attribute values, such as the values for softwarecompatibility or allocation unit size.

All disks in the disk group must be of equal size. Oracle ASM programmaticallydetermines the size of each disk. If for some reason the size cannot be determined, orto restrict the amount of space used on a disk, you can specify a SIZE clause for adisk; however, the same size value must be specified for every disk in the disk group.

Oracle ASM creates operating system–independent names for the disks in a diskgroup that you can use to reference the disks in other SQL statements. Optionally, youcan provide your own name for a disk using the NAME clause. Disk names are availablein the V$ASM_DISK view.

You can use the ASMCMD stamp command to provision disks for Oracle ASM beforecreating a disk group that uses them. If a disk is provisioned, then the disk name,failure group, and site information are specified at the time the disk is provisioned anddo not need to be specified when the disk group is created.

Note:

A disk cannot belong to multiple disk groups.

Chapter 4Creating Disk Groups

4-12

Page 96: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The Oracle ASM instance ensures that any disk in a newly created disk group is addressableand is not currently a member of another disk group. You must use FORCE only when adding adisk that was dropped with FORCE. If a disk is dropped with NOFORCE, then you can add it withNOFORCE. For example, a disk might have failed and was dropped from its disk group. Afterthe disk is repaired, it is no longer part of any disk group, but Oracle ASM still recognizes thatthe disk had been a member of a disk group. You must use the FORCE flag to include the diskin a new disk group. In addition, the disk must be addressable. Otherwise, the operation fails.

Note:

Use caution when using the FORCE option to add a previously used disk to a diskgroup; you might cause another disk group to become unusable.

The CREATE DISKGROUP statement mounts the disk group for the first time, and adds the diskgroup name to the ASM_DISKGROUPS initialization parameter if a server parameter file is beingused. If a text initialization parameter file is being used and you want the disk group to beautomatically mounted at instance startup, then you must remember to add the disk groupname to the ASM_DISKGROUPS initialization parameter before you shut down and restart theOracle ASM instance. You can also create disk groups with Oracle ASM ConfigurationAssistant (ASMCA) and the ASMCMD mkdg command.

See Also:

• Managing Oracle ASM Flex Disk Groups for information about flex disk groupsand file groups

• Mirroring, Redundancy, and Failure Group Options and Understanding OracleASM Concepts for information about redundancy levels and failure groups

• Storing Oracle Cluster Registry and Voting Files in Oracle ASM Disk Groups forinformation about QUORUM and REGULAR failure groups

• stamp for information about the ASMCMD stamp command

• Managing Disk Groups with ASMCA for information about creating disk groupswith Oracle ASM Configuration Assistant (ASMCA)

• mkdg for information about creating disk groups with the ASMCMD mkdgcommand

• Oracle Database SQL Language Reference for information about the CREATEDISKGROUP SQL statement

Creating Disk Groups Using the CREATE DISKGROUP SQL StatementYou can create disk groups for data and the fast recovery area using the CREATE DISKGROUPSQL statement.

The SQL statement in Example 4-1 creates a disk group named data with normalredundancy consisting of two failure groups controller1 or controller2 with four disks ineach failure group. The data disk group is typically used to store database data files.

Chapter 4Creating Disk Groups

4-13

Page 97: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The example assumes that the ASM_DISKSTRING initialization parameter is set to the '/devices/*' string. Oracle ASM disk discovery identifies diska1 through diska4 anddiskb1 through diskb4 in the /devices directory.

In Example 4-1, the NAME clauses enable you to explicitly assign names to the disksrather than the default system-generated names. The system-generated names are inthe form diskgroup_nnnn, where nnnn is the disk number for the disk in the disk group.

When creating the disk group in Example 4-1, the values of following disk groupattributes were explicitly set:

• AU_SIZE

Specifies the size of the allocation unit for the disk group.

You can view the value of the AU_SIZE disk group attribute in theALLOCATION_UNIT_SIZE column of the V$ASM_DISKGROUP view.

• COMPATIBLE.ASM

Determines the minimum software version for any Oracle ASM instance that usesa disk group.

• COMPATIBLE.RDBMS

Determines the minimum software version for any database instance that uses adisk group.

• COMPATIBLE.ADVM

Determines whether the disk group can contain Oracle ADVM volumes.

In Example 4-2, the fra disk group (typically created for the fast recovery area) iscreated with the default disk group attribute values. Names are not specified for theOracle ASM disks and failure groups are not explicitly specified. This exampleassumes that diskc1 through diskc9 are present in the /devices directory.

Example 4-1 Creating the DATA disk group

CREATE DISKGROUP data NORMAL REDUNDANCY FAILGROUP controller1 DISK '/devices/diska1' NAME diska1, '/devices/diska2' NAME diska2, '/devices/diska3' NAME diska3, '/devices/diska4' NAME diska4 FAILGROUP controller2 DISK '/devices/diskb1' NAME diskb1, '/devices/diskb2' NAME diskb2, '/devices/diskb3' NAME diskb3, '/devices/diskb4' NAME diskb4 ATTRIBUTE 'au_size'='4M', 'compatible.asm' = '19.0', 'compatible.rdbms' = '19.0', 'compatible.advm' = '19.0';

Example 4-2 Creating the FRA disk group

CREATE DISKGROUP fra NORMAL REDUNDANCY DISK '/devices/diskc*';

Chapter 4Creating Disk Groups

4-14

Page 98: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Administering Oracle ASM Filter Driver for information about the disk nameformat when using Oracle ASM Filter Driver

• About Oracle ASM Allocation Units for information about allocation units

• Disk Group Compatibility Attributes for information about COMPATIBLE.ASM,COMPATIBLE.RDBMS, and COMPATIBLE.ADVM

Creating Disk Groups for a New Oracle InstallationThis topic describes the basic procedure for creating disk groups during a new installation ofOracle Grid Infrastructure standalone (Oracle Restart) option and Oracle Database.

The procedure described in this topic for a new installation of Oracle Grid Infrastructurestandalone (Oracle Restart) assumes that a disk group is configured for storing the databasedata files and a disk group is configured for storing the fast recovery area files.

Note:

In Oracle Grid Infrastructure for cluster configurations, the Oracle Cluster Registry(OCR) and voting files should be stored on their own disk group. However, if onlytwo disk groups are created for the Oracle ASM installation, then store the OCRand voting files in the disk group that contains the database data files.

1. Install Oracle Restart with OUI, following the screen prompts.

During the installation, create a disk group (data) for storing database data files andcontrol files.

This OUI disk group creation process is similar to creating a disk group with Oracle ASMConfiguration Assistant (ASMCA). Detailed information about installation with OracleUniversal Installer (OUI) and database creation with Database Configuration Assistant(DBCA) is available in the installation guides for your specific operating system.

2. After the Oracle Grid Infrastructure is installed, use ASMCA to create a disk group (fra)for storing the fast recovery area files.

You can also create the fra disk group with SQL*Plus or ASMCMD commands run fromthe Oracle Grid Infrastructure home.

3. Install the Oracle Database software with OUI, following the screen prompts.

4. After the database software has been installed, run DBCA to create a database, followingthe screen prompts.

During the creation of the database, make the appropriate selections to use Oracle ASMfor storage of data files and fast recovery area files. When prompted:

• Store database data files in the data disk group

• Store fast recovery area files in the fra disk group

Chapter 4Creating Disk Groups

4-15

Page 99: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Managing Disk Groups with ASMCA for information about using ASMCAto create or alter disk groups

• Storing Oracle Cluster Registry and Voting Files in Oracle ASM DiskGroups for information about storing Oracle Cluster Registry (OCR) andvoting files

• About Creating a Disk Group for information about creating a disk groupwith SQL*Plus

• mkdg for information about creating a disk group with ASMCMD

• Oracle Database Backup and Recovery User’s Guide for informationabout configuring the fast recovery area

• Oracle Database Administrator’s Guide for information about specifyinga fast recovery area

• Oracle Grid Infrastructure Installation and Upgrade Guide for youroperating system for detailed information about installation of OracleGrid Infrastructure and Oracle Restart

• Oracle Database Installation Guide for your operating system for detailedinformation about installation of an Oracle Database

Specifying the Logical and Physical Sector SizeYou can use the optional LOGICAL_SECTOR_SIZE and SECTOR_SIZE disk group attributeswith the CREATE DISKGROUP and ALTER DISKGROUP SQL statements to specify a logicalsector size and physical sector size for a disk group.

Note:

To specify the logical and physical sector size, the disks must support sectorsize emulation.

The SECTOR_SIZE disk group attribute can be set to 512, 4096, or 4K if the disks supportthose values. The default value is platform dependent. The COMPATIBLE.ASM andCOMPATIBLE.RDBMS disk group attributes must be set to 11.2 or higher to enable thesetting of a value for the sector size during disk group creation. The COMPATIBLE.ASMdisk group attribute must be set to 12.2 or higher to alter the sector size.

The LOGICAL_SECTOR_SIZE disk group attribute can explicitly set the logical sector sizeof the disk group instead of the size that is estimated from the disks that join the diskgroup. The LOGICAL_SECTOR_SIZE disk group attribute can be set to 512, 4096, or 4K.The value specifies the smallest possible I/O that the disk group can accept, and alsolimits what types of disks can join the disk group. The COMPATIBLE.ASM disk groupattribute must be set to 12.2 or higher to set the logical sector size during creation of adisk group or alter the size of a disk group that has been created.

Chapter 4Creating Disk Groups

4-16

Page 100: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 4-1 lists the possible valid combinations of the logical sector size and sector size diskgroup attributes during disk group creation for disk sizes and types. The first columndescribes the user-specified values for logical sector size and sector size attributes duringdisk group creation. NS indicates that the no value was specified.

The top row of the table describes the combination of the disks used. A 512 native sector sizedisk has sector size equal to logical sector size equal to 512. The 512 native and 512emulated heading describes the combination of 512 native disks and 512 emulated disk. The512 emulated disk has a 4 k physical sector size and a 512 logical sector size. The values ineach of the table cells represents the final value of sector sizes of the disk group. Errorindicates that the disk group creation fails and an error message is displayed.

Table 4-1 Possible combinations of sector size and logical sector size by disk size and type

SECTOR_SIZE/LOGICAL_SECTOR_SIZEspecified at diskgroup creation

512 native disks 512 emulateddisks

4K native disks 512 native disks+ 512 emulateddisks

512 emulateddisks + 4Knative disks

4K / 4K Error 4K / 4K 4K / 4K Error 4K / 4K

NS / 4K Error 4K / 4K 4K / 4K Error 4K / 4K

4K / 512 Error 4K / 512 Error Error Error

512 / 512 512 / 512 512 / 512 Error 512 / 512 Error

512 / NS 512 / 512 512 / 512 Error 512 / 512 Error

4K / NS Error 4K / 512 4K / 4K Error 4K / 4K

NS / 512 512 / 512 512 / 512 Error 512 / 512 Error

NS / NS 512 / 512 512 / 512 4K / 4K 512 / 512 4K / 4K

You can determine the logical sector and sector size values that have either been assumedor explicitly set for a successful disk group creation by querying V$ASM views or runningASMCMD commands. The LOGICAL_SECTOR_SIZE and SECTOR_SIZE columns are included inthe V$ASM_DISKGROUP and V$ASM_ATTRIBUTE views to display the values. These columnsrepresent the logical sector size and sector size values of the disk group in bytes. TheASMCMD lsdg also displays the values of the logical sector size and sector size for the diskgroup. In addition, the disk group attributes are displayed with the V$ASM_ATTRIBUTE view andthe ASMCMD lsattr command. For example:

SQL> SELECT name, value FROM V$ASM_ATTRIBUTE WHERE (name = 'sector_size' OR name = 'logical_sector_size') AND group_number = 1;NAME VALUE----------------------------- ---------------------------sector_size 4096logical_sector_size 512

SQL> SELECT logical_sector_size, sector_size FROM V$ASM_DISKGROUP WHERE group_number = 1;LOGICAL_SECTOR_SIZE SECTOR_SIZE------------------- ----------- 512 4096

As shown in Example 4-3, you can use the LOGICAL_SECTOR_SIZE and SECTOR_SIZE diskgroup attributes with the CREATE DISKGROUP and ALTER DISKGROUP SQL statements to specifythe logical and physical sector size of the Oracle ASM disk group.

The following notes apply to the logical sector size and sector size disk group attributes.

Chapter 4Creating Disk Groups

4-17

Page 101: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• During the migration process from 512 bytes to 4096 bytes, password files storedon an Oracle ASM disk group do not need to be migrated or recreated. Thepassword files are a special case and retain their 512 byte block size, even afterthe new sector sizes are 4096 bytes.

• If the value of the LOGICAL_SECTOR_SIZE column is 512, while the value in theSECTOR_SIZE column is 4096, then the disk group supports 512 sector sizeemulation. This means that I/O operations can be both 512 or 4096 in size. Forexample, we can have redo log files with a file block size of 512 bytes in the diskgroup that can be both read and written to, as well as creating new redo log fileswith a file block size of 4096 bytes.

• The physical sector size (SECTOR_SIZE) cannot be smaller than the logical sectorsize (LOGICAL_SECTOR_SIZE) in an Oracle ASM disk group.

• Not all disks support all of the possible SECTOR_SIZE values. The sector sizeattribute setting must be compatible with the physical hardware.

Example 4-3 Specifying logical and sector sizes for disks in a disk group

CREATE DISKGROUP data NORMAL REDUNDANCY FAILGROUP controller1 DISK '/devices/diska1', '/devices/diska2', '/devices/diska3', '/devices/diska4' FAILGROUP controller2 DISK '/devices/diskb1', '/devices/diskb2', '/devices/diskb3', '/devices/diskb4' QUORUM FAILGROUP quorum_failgrp DISK '/devices/diskc1' ATTRIBUTE 'compatible.asm' = '12.2', 'compatible.rdbms' = '12.2', 'sector_size'='4096', 'logical_sector_size'='512';

ALTER DISKGROUP data2 SET ATTRIBUTE 'compatible.asm' = '12.2', 'compatible.rdbms' = '12.2';

ALTER DISKGROUP data2 SET ATTRIBUTE 'sector_size'='4096', 'logical_sector_size'='4096';

See Also:

• Oracle Database SQL Language Reference for information about thedisk group attributes and the CREATE DISKGROUP SQL statement

• Oracle Database SQL Language Reference for information about theBLOCKSIZE keyword

• Oracle Database Reference for details about the V$ASM_ATTRIBUTE ,V$ASM_DISK, and V$ASM_DISKGROUP views

• ASMCMD Disk Group Management Commands for information aboutASMCMD disk group management commands

Chapter 4Creating Disk Groups

4-18

Page 102: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Storing Oracle Cluster Registry and Voting Files in Oracle ASM DiskGroups

You can store Oracle Cluster Registry (OCR) and voting files in Oracle ASM disk groups.

You can also store a backup of the OCR file in a disk group. Voting files and OCR are twoimportant components of Oracle Clusterware. Voting files manage information about nodemembership. OCR manages cluster and Oracle Real Application Clusters (Oracle RAC)database configuration information.

A quorum failure group is a special type of failure group that does not contain user data.Quorum failure groups are used for storing Oracle ASM metadata. A quorum failure groupmay also contain voting files if those files are stored in a disk group that contains a quorumfailure group. Additionally, Oracle ASM uses a quorum failure group to help determine if thedisk group can be mounted in the event of the loss of one or more failure groups.

Because disks in quorum failure groups do not contain user data, a quorum failure group isnot considered when determining redundancy requirements in respect to storing user data.

You can manage and monitor OCR and voting files with CRSCTL and ocrconfig command-line tools, CREATE and ALTER DISKGROUP SQL statements, and V$ASM views.

The CRSCTL and ocrconfig commands enable the placement of OCR storage and ClusterSynchronization Services (CSS) voting files inside the disk groups managed by Oracle ASM.

The QUORUM and REGULAR keywords in CREATE and ALTER DISKGROUP SQL statements enablethe specification of an additional qualifier for failure groups or disks when creating or alteringa disk group. Note that QUORUM disks (or disks in QUORUM failure groups) cannot contain userdata, while REGULAR disks (or disks in non-quorum failure groups) do not have this restriction.

You can use these keywords before the keyword FAILGROUP if a failure group is beingexplicitly specified. If the failure group is implicitly implied, you can use these keywords(QUORUM/REGULAR) before the keyword DISK. When failure groups are explicitly specified, it isan error to specify these keywords (QUORUM/REGULAR) immediately before the keyword DISK.REGULAR is the default failure group type.

When performing operations on existing disks or failure groups, the qualifier specified in theSQL must match the qualifier that was specified when the disks or failure groups were addedto the disk group.

Example 4-4 shows the creation of a disk group with a QUORUM failure group. For OracleClusterware files a minimum of three disk devices or three failure groups is required with anormal redundancy disk group. A QUORUM failure group is not considered when determiningredundancy requirements in respect to storing user data. The COMPATIBLE.ASM disk groupcompatibility attribute must be set to 11.2 or greater to store OCR or voting files in a diskgroup.

The FAILGROUP_TYPE column in the V$ASM_DISK or V$ASM_DISK_STAT views specifies thefailure group type. The value for this column is REGULAR for regular failure groups and QUORUMfor quorum failure groups. The VOTING_FILE column in the V$ASM_DISK or V$ASM_DISK_STATviews specifies whether a disk contains a voting file. The value for this column is either Y ifthe disk contains a voting file or N if not. The value of USABLE_FILE_MB in V$ASM_DISKGROUP orV$ASM_DISKGROUP_STAT does not consider any free space that is present in QUORUM disksbecause that space is not available for client data files.

Chapter 4Creating Disk Groups

4-19

Page 103: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 4-4 Using the QUORUM keyword when creating a failure group

CREATE DISKGROUP mgmt_dg NORMAL REDUNDANCY FAILGROUP fg1 DISK '/devices/diskg1' FAILGROUP fg2 DISK '/devices/diskg2' QUORUM FAILGROUP fg3 DISK '/devices/diskg3' ATTRIBUTE 'compatible.asm' = '12.2.0.0.0';

See Also:

• Oracle ASM Failure Groups for information about failure groups

• Views Containing Oracle ASM Information for information about V$ASMviews

• Oracle Grid Infrastructure Installation and Upgrade Guide for informationabout configuring voting files and Oracle Cluster Registry (OCR)

• Oracle Clusterware Administration and Deployment Guide forinformation about managing Oracle Cluster Registry and voting files

• Oracle Database SQL Language Reference for information about the CREATE DISKGROUP and ALTER DISKGROUP SQL statements

• Oracle Database Reference for details about the V$ASM* dynamicperformance views

Altering Disk GroupsYou can alter a disk group with SQL*Plus, ASMCA, or ASMCMD commands.

You can use the ALTER DISKGROUP SQL statement to alter a disk group configuration.You can also alter a disk group configuration with Oracle ASM Configuration Assistant(ASMCA) and the ASMCMD chdg command.

You can add, resize, or drop disks while the database remains online. Wheneverpossible, multiple operations in a single ALTER DISKGROUP statement arerecommended. Grouping operations in a single ALTER DISKGROUP statement canreduce rebalancing operations.

Oracle ASM automatically rebalances when the configuration of a disk group changes.By default, the ALTER DISKGROUP statement does not wait until the operation iscomplete before returning. Query the V$ASM_OPERATION view to monitor the status ofthis operation.

Use the REBALANCE WAIT clause to cause the ALTER DISKGROUP statement processing towait until the rebalance operation is complete before returning. This is especiallyuseful in scripts. The statement also accepts a REBALANCE NOWAIT clause that invokesthe default behavior of conducting the rebalance operation asynchronously in thebackground.

You can interrupt a rebalance running in wait mode by typing CTRL+C on mostplatforms. This causes the statement to return immediately with the messageORA-01013: user requested cancel of current operation, and then to continuethe operation asynchronously. Typing CTRL+C does not cancel the rebalance operationor any disk add, drop, or resize operations.

Chapter 4Altering Disk Groups

4-20

Page 104: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

To control the speed and resource consumption of the rebalance operation, you can includethe REBALANCE POWER clause in statements that add, drop, or resize disks.

The following topics are discussed:

• Adding Disks to a Disk Group

• Replacing Disks in Disk Groups

• Renaming Disks in Disk Groups

• Dropping Disks from Disk Groups

• Resizing Disks in Disk Groups

• Undropping Disks in Disk Groups

• Manually Rebalancing Disk Groups

• Tuning Rebalance Operations

• Scrubbing Disk Groups

• Managing Oracle ADVM Volumes in a Disk Group

See Also:

• Managing Disk Groups with ASMCA for information about altering a disk groupconfiguration with Oracle ASM Configuration Assistant (ASMCA)

• chdg for information about altering a disk group configuration with ASMCMDchdg

• Manually Rebalancing Disk Groups for more information about the REBALANCEPOWER clause

• Oracle Database SQL Language Reference for information about the ALTERDISKGROUP SQL statement

• Oracle Automatic Storage Management Cluster File System Administrator'sGuide for more information about Oracle ACFS and Oracle ADVM

Adding Disks to a Disk GroupYou can use the ADD clause of the ALTER DISKGROUP statement to add a disk or a failure groupto a disk group.

You can add a disk or failure group with the ALTER DISKGROUP SQL statement. The syntaxused is similar to the CREATE DISKGROUP statement. After you add new disks, the new disksgradually begin to accommodate their share of the workload as rebalancing progresses.

When adding a disk, the disk must be the same size as the other disks in the disk group.

Chapter 4Altering Disk Groups

4-21

Page 105: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Using the ALTER DISKGROUP SQL Statement to Add Disks to a DiskGroup for an example using SQL statements to add disks to a disk group

• Example 4-1 for an example of the CREATE DISKGROUP SQL statement

• Mirroring, Redundancy, and Failure Group Options and UnderstandingOracle ASM Concepts for information about redundancy levels andfailure groups

• Managing Disk Groups with ASMCA for information about adding disksto a disk group with ASMCA

• Oracle Database SQL Language Reference for information about theALTER DISKGROUP SQL statement

Using the ALTER DISKGROUP SQL Statement to Add Disks to a Disk GroupThe SQL examples in this topic demonstrate the interactions of disk discovery with theADD DISK operation. Assume that disk discovery identifies the following disks in /devices directory:

/devices/diska1 -- member of data1/devices/diska2 -- member of data1/devices/diska3 -- member of data1/devices/diska4 -- member of data1/devices/diska5 -- candidate disk/devices/diska6 -- candidate disk/devices/diska7 -- candidate disk/devices/diska8 -- candidate disk

/devices/diskb1 -- member of data1/devices/diskb2 -- member of data1/devices/diskb3 -- member of data1/devices/diskb4 -- member of data2

/devices/diskc1 -- member of data2/devices/diskc2 -- member of data2/devices/diskc3 -- member of data3/devices/diskc4 -- candidate disk

/devices/diskd1 -- candidate disk/devices/diskd2 -- candidate disk/devices/diskd3 -- candidate disk/devices/diskd4 -- candidate disk/devices/diskd5 -- candidate disk/devices/diskd6 -- candidate disk/devices/diskd7 -- candidate disk/devices/diskd8 -- candidate disk

You can query the V$ASM_DISK view to display the status of Oracle ASM disks. See Views Containing Oracle ASM Information.

The following statement would fail because /devices/diska1 through /devices/diska4 currently belong to the disk group data1.

Chapter 4Altering Disk Groups

4-22

Page 106: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

ALTER DISKGROUP data1 ADD DISK '/devices/diska*';

The following statement successfully adds disks /devices/diska5 and /devices/diska6 todata1. Because no FAILGROUP clauses are included in the ALTER DISKGROUP statement, eachdisk is assigned to its own failure group. The NAME clauses assign names to the disks,otherwise they would have been assigned system-generated names.

ALTER DISKGROUP data1 ADD DISK '/devices/diska5' NAME diska5, '/devices/diska6' NAME diska6;

When specifying a failure group, you can specify the type (regular or quorum) as well as thename. The failure group type value defaults to regular. You must include QUORUM FAILGROUPclause to specify a quorum failure group. The following statement successfully adds disks /devices/diska7 and /devices/diska8 to data1 using the FAILGROUP clause to specify afailure group.

ALTER DISKGROUP data1 ADD FAILGROUP fg_diska78 DISK '/devices/diska7' NAME diska7, '/devices/diska8' NAME diska8;

The following statement would fail because the search string matches disks that arecontained in other disk groups. Specifically, /devices/diska4 belongs to disk group data1and /devices/diskb4 belongs to disk group data2.

ALTER DISKGROUP data1 ADD DISK '/devices/disk*4';

The following statement would successfully add /devices/diskd1 through /devices/diskd8to disk group data1. This statement runs with a rebalance power of 5, and does not returnuntil the rebalance operation is complete.

ALTER DISKGROUP data1 ADD DISK '/devices/diskd*' REBALANCE POWER 5 WAIT;

If /devices/diskc3 was previously a member of a disk group that no longer exists, then youcould use the FORCE option to add the disk as a member of another disk group. For example,the following use of the FORCE clause enables /devices/diskc3 to be added to data2, eventhough it is a current member of data3. For this statement to succeed, data3 cannot bemounted.

ALTER DISKGROUP data2 ADD DISK '/devices/diskc3' FORCE;

Replacing Disks in Disk GroupsA disk or multiple disks in a disk group can be replaced, rather than dropped and added back.

The single replace operation is more efficient than dropping and adding disks. This operationis especially useful when disks are missing or damaged.

For example, you can issue the following statement to replace the diskc7 disk with anotherdisk identified by the /devices/diskc18 path.

SQL> ALTER DISKGROUP data2 REPLACE DISK diskc7 WITH '/devices/diskc18' POWER 3;

Chapter 4Altering Disk Groups

4-23

Page 107: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The power option operates the same as the power option for the ALTER DISKGROUPREBALANCE statement, except that the power option cannot be set to 0.

The ALTER DISKGROUP SQL statement with the REPLACE clause includes a WAIT orNOWAIT option, plus the FORCE option.

Note:

• Manually Rebalancing Disk Groups for information about the poweroption in rebalancing a disk group

• ASM_POWER_LIMIT for information about the ASM_POWER_LIMITinitialization parameter

Renaming Disks in Disk GroupsYou can rename a disk in a disk group with the ALTER DISKGROUP RENAME DISK SQLstatement.

Note:

You can only use the RENAME DISK operation when the disk group thatcontains the disk is in the MOUNT RESTRICTED state. If any disks in the diskgroup are offline, then the RENAME operation fails. If the new disk name exists,then the RENAME operation fails. You must have SYSASM privileges to rename adisk.

In one SQL statement, you can rename one or multiple disks, or rename all disks in adisk group using the RENAME DISKS ALL clause.

For example, you can rename disks as follows:

SQL> ALTER DISKGROUP fra2 MOUNT RESTRICTED;

SQL> ALTER DISKGROUP fra2 RENAME DISK 'FRA1_0001' TO 'FRA2_0001', 'FRA1_0002' TO 'FRA2_0002';

For NORMAL, HIGH, and FLEX redundancy disk groups, you can associate a site nameusing ALTER DISKGROUP RENAME DISK with the SITE clause. For example:

SQL> ALTER DISKGROUP data1 RENAME DISK 'DATA1_0001' SITE SITE1;

For information about data sites, extended disk groups, and preferred read for disks,refer to About Oracle ASM Extended Disk Groups and PREFERRED_READ.ENABLED. For information about the ASMCMD stampcommand, refer to stamp.

For an EXTERNAL redundancy disk group, you can use ALTER DISKGROUP RENAME DISKwith the FAILGROUP clause to specify a failure group for a disk. For example:

SQL> ALTER DISKGROUP external1 RENAME DISK 'EXTERNAL1_0001' FAILGROUP FG_EXT1_0001;

Chapter 4Altering Disk Groups

4-24

Page 108: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The SITE and FAILGROUP clauses cannot be used together in the same SQL ALTER DISKGROUPRENAME statement.

The ALTER DISKGROUP diskgroupname RENAME DISKS ALL statement can be run after therenamedg utility to change the names of the disks in the renamed disk group. For informationabout renamedg, refer to Renaming Disks Groups.

When you run the ALTER DISKGROUP diskgroupname RENAME DISKS ALL statement, any diskname that is not in the format diskgroupname_number is renamed to that format. Disk namesthat are already in the diskgroupname_number format are not changed.

Note:

If a disk is labeled by any subsystem; such as ASMLIB, ASMFD, EXADATA, orASMTOOL; then that label becomes the disk name by design. The ALTERDISKGROUP RENAME DISKS SQL statement on these subsystems has no effect and thedisk is not renamed.

Dropping Disks from Disk GroupsYou can drop disks from a disk group with the DROP DISK clause of the ALTER DISKGROUPstatement.

You can also drop all of the disks in specified failure groups using the DROP DISKS INFAILGROUP clause.

When a disk is dropped, the disk group is rebalanced by moving all of the file extents fromthe dropped disk to other disks in the disk group. A drop disk operation might fail if notenough space is available on the other disks. The best approach is to perform both the addand drop operation with the same ALTER DISKGROUP statement. This has the benefit ofrebalancing data extents only one time and ensuring that there is enough space for therebalance operation to succeed.

Caution:

The ALTER DISKGROUP...DROP DISK SQL statement returns to SQL prompt beforethe drop and rebalance operations are complete. Do not reuse, remove, ordisconnect the dropped disk until the HEADER_STATUS column for this disk in theV$ASM_DISK view changes to FORMER. You can query the V$ASM_OPERATION view todetermine the amount of time remaining for the drop/rebalance operation tocomplete.

If you specify the FORCE clause for the drop operation, the disk is dropped even if Oracle ASMcannot read or write to the disk. You cannot use the FORCE flag when dropping a disk from anexternal redundancy disk group.

Chapter 4Altering Disk Groups

4-25

Page 109: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Caution:

A DROP FORCE operation leaves data at reduced redundancy until thesubsequent rebalance operation completes. This increases your exposure todata loss if there is a subsequent disk failure during rebalancing. Use DROPFORCE with caution.

The statements in Example 4-5 demonstrate how to drop disks from the disk groupdata1. The first example drops diska5 from disk group data1. The second exampledrops diska5 from disk group data1, and also illustrates how multiple actions arepossible with one ALTER DISKGROUP statement.

Example 4-5 Dropping disks from disk groups

ALTER DISKGROUP data1 DROP DISK diska5;

ALTER DISKGROUP data1 DROP DISK diska5 ADD FAILGROUP failgrp1 DISK '/devices/diska9' NAME diska9;

See Also:

• Managing Disk Groups with ASMCA for information about dropping disksfrom a disk group with ASMCA

• Using the ALTER DISKGROUP SQL Statement to Add Disks to a DiskGroup for an example of the ALTER DISKGROUP statement

• Oracle Database Reference for information about the V$ASM_OPERATIONview

• Oracle Database SQL Language Reference for information about theALTER DISKGROUP SQL statement

Resizing Disks in Disk GroupsThe RESIZE clause of ALTER DISKGROUP enables you to resize disks in a disk group.

When resizing disks in a disk group, all the disks must be of equal size.

If you do not specify a new size in the SIZE clause, then Oracle ASM uses the size ofthe disks as returned by the operating system. The new size is written to the OracleASM disk header and if the size is increasing, then the new space is immediatelyavailable for allocation. If the size is decreasing, rebalancing must relocate file extentsbeyond the new size limit to available space below the limit. If the rebalance operationcan successfully relocate all extents, then the new size is made permanent, otherwisethe rebalance fails.

The following example resizes all of the disks in the disk group data1. If the new sizeis greater than the capacity of a disk, then the statement fails.

Example 4-6 Resizing disks in disk groups

ALTER DISKGROUP data1 RESIZE ALL SIZE 100G;

Chapter 4Altering Disk Groups

4-26

Page 110: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Undropping Disks in Disk GroupsThe UNDROP DISKS clause of the ALTER DISKGROUP statement enables you to cancel allpending drops of disks within disk groups.

If a drop disk operation has completed, then this statement cannot be used to restore it. Thisstatement cannot be used to restore disks that are being dropped as the result of a DROPDISKGROUP statement, or for disks that are being dropped using the FORCE clause.

The following example cancels the dropping of disks from disk group data1:

Example 4-7 Undropping disks in disk groups

ALTER DISKGROUP data1 UNDROP DISKS;

Note:

• Oracle Database SQL Language Reference for information about the DROPDISKGROUP SQL statement

• Oracle Database SQL Language Reference for information about the ALTERDISKGROUP SQL statement

Manually Rebalancing Disk GroupsYou can manually rebalance the files in a disk group using the REBALANCE clause of the ALTERDISKGROUP statement.

Manual rebalancing would normally not be required because Oracle ASM automaticallyrebalances disk groups when their configuration changes, including changes to file groups.However, you might want to do a manual rebalance operation to control the speed of whatwould otherwise be an automatic rebalance operation.

The POWER clause of the ALTER DISKGROUP REBALANCE statement specifies the degree ofparallelism, and the speed of the rebalance operation. A higher value increases the speed ofthe rebalance operation. It can be set to a minimum value of 0 which stops a rebalancingoperation until the statement is either implicitly or explicitly rerun.

The default rebalance power is set by the ASM_POWER_LIMIT initialization parameter. Therange of values for the POWER clause is the same for the ASM_POWER_LIMIT initializationparameter.

The power level of an ongoing rebalance operation can be changed by entering therebalance statement using the MODIFY POWER clause. For example, the following SQLstatement modifies the power setting to 10 of an ongoing rebalance.

ALTER DISKGROUP data2 REBALANCE MODIFY POWER 10;

The the following SQL statement modifies the power setting to the default value.

ALTER DISKGROUP data2 REBALANCE MODIFY POWER;

When you rebalance a disk group, you have the option choosing the following phase optionsusing the WITH or WITHOUT keywords, except where noted:

Chapter 4Altering Disk Groups

4-27

Page 111: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• RESTORE

The RESTORE phase includes RESYNC, RESILVER, and REBUILD operations. TheRESTORE phase is always run by default and cannot be excluded.

– RESYNC

This operation synchronizes the stale extents on the disks that are beingbrought online.

– RESILVER

This operation is specific only to Exadata systems. During this phase, data iscopied from one mirror to the mirror with stale data.

– REBUILD

This operation restores the redundancy of forcing disks only. Forcing disks arethose disks that have been dropped with the force option.

• BALANCE

This phase restores redundancy of all the disks in the disk group, including filegroups, and also balances extents on Oracle ASM disks.

• PREPARE

This phase completes the work corresponding to the prepare SQL operation. Thisphase is enabled only for FLEX or EXTENDED redundancy disk groups.COMPATIBLE.ASM must be set to 12.2 or higher.

• COMPACT

This phase defragments and compacts extents across Oracle ASM disks.

The rebalance operation executes the phases in the optimal order. If none of thephases are specified with the ALTER DISKGROUP...REBALANCE SQL statement, then thebehavior remains the same as the rebalance operation previous to the Oracle ASM12.2 release during which all rebalance phases are run.

The following examples show the use of the phase options with ALTERDISKGROUP...REBALANCE:

ALTER DISKGROUP data2 REBALANCE WITH BALANCE COMPACT;

ALTER DISKGROUP data3 REBALANCE WITHOUT BALANCE;

The ALTER DISKGROUP...REBALANCE command returns immediately by default so thatyou can run other commands while the rebalance operation takes placeasynchronously in the background. You can query the V$ASM_OPERATION view for thestatus of the rebalance operation. When not all rebalance phases are run, theV$ASM_OPERATION view displays an ORA-59000 error at the end of the rebalance.

To cause the ALTER DISKGROUP...REBALANCE command to wait until the rebalanceoperation is complete before returning, add the WAIT keyword to the REBALANCE clause.The wait functionality is especially useful in scripts. The command also accepts aNOWAIT keyword, which invokes the default behavior of conducting the rebalanceoperation asynchronously. You can interrupt a rebalance running in wait mode bytyping CTRL+C on most platforms. This causes the command to return immediately withthe message ORA-01013: user requested cancel of current operation, and thencontinues the rebalance operation asynchronously.

Additional rules for the rebalance operation include the following:

Chapter 4Altering Disk Groups

4-28

Page 112: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• An ongoing rebalance command is restarted if the storage configuration changes eitherwhen you alter the configuration, or if the configuration changes due to a failure or anoutage. Furthermore, if the new rebalance fails because of a user error, then a manualrebalance may be required.

• The ALTER DISKGROUP...REBALANCE statement runs on a single node even if you areusing Oracle Real Application Clusters (Oracle RAC).

• Oracle ASM can perform one disk group rebalance at a time on a given instance. If youhave initiated multiple rebalances on different disk groups on a single node, then Oracleprocesses these operations in parallel on additional nodes if available; otherwise therebalances are performed serially on the single node. You can explicitly initiaterebalances on different disk groups on different nodes in parallel.

• Rebalancing continues across a failure of the Oracle ASM instance performing therebalance.

• The REBALANCE clause (with its associated POWER and WAIT/NOWAIT keywords) can also beused in ALTER DISKGROUP commands that add, drop, or resize disks.

Note:

Oracle restarts the processing of an ongoing rebalance operation if the storageconfiguration changes. If the next rebalance operation fails because of a usererror, then a manual rebalance may be required.

The following example manually rebalances the disk group data2. The command does notreturn until the rebalance operation is complete. All supported phases of the rebalanceoperation are executed. Note that specifying RESTORE is not necessary as that phase isalways run during a rebalance.

Example 4-8 Manually rebalancing a disk group

ALTER DISKGROUP data2 REBALANCE RESTORE POWER 5 WAIT;

See Also:

• ASM_POWER_LIMIT for information about the ASM_POWER_LIMIT initializationparameter

• Tuning Rebalance Operations for information about rebalancing operations

• Oracle Database SQL Language Reference for information about the ALTERDISKGROUP SQL statement

Tuning Rebalance Operations

If the POWER clause is not specified in an ALTER DISKGROUP statement, or when rebalance isimplicitly run by adding or dropping a disk, then the rebalance power defaults to the value ofthe ASM_POWER_LIMIT initialization parameter. You can adjust the value of this parameterdynamically. The range of values for the POWER clause is the same for the ASM_POWER_LIMITinitialization parameter.

Chapter 4Altering Disk Groups

4-29

Page 113: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The higher the power limit, the more quickly a rebalance operation can complete.Rebalancing takes longer with lower power values, but consumes fewer processingand I/O resources which are shared by other applications, such as the database.

Oracle ASM tries to keep a rebalance I/O for each unit of power. Each I/O requiresPGA memory for the extent involved in the relocation.

The default value of 1 minimizes disruption to other applications. The appropriatevalue is dependent on your hardware configuration, performance requirements, andavailability requirements. Oracle ASM always adjusts the power to fit availablememory.

When the COMPATIBLE.ASM disk group is set to 11.2.0.2 or higher, the rebalanceoperation may be run as one process using asynchronous I/O. You can check theOracle ASM alert log for details on the rebalance process.

If a rebalance is in progress because a disk is manually or automatically dropped, thenincreasing the power of the rebalance shortens the time frame during which redundantcopies of that data on the dropped disk are reconstructed on other disks.

You can also affect rebalance behavior with the CONTENT.CHECK and THIN_PROVISIONEDdisk group attributes.

The EXPLAIN WORK SQL statement determines the amount of work for a rebalanceoperation and the resulting calculations are displayed in the V$ASM_ESTIMATE view.

For example:

EXPLAIN WORK FOR ALTER DISKGROUP data DROP DISK data_0000;Explained.

SELECT est_work FROM V$ASM_ESTIMATE;EST_WORK-------- 4211

EXPLAIN WORK SET STATEMENT_ID='online' FOR ALTER DISKGROUP data ONLINE disk data_000;Explained.

SELECT est_work FROM V$ASM_ESTIMATE WHERE STATEMENT_ID='online';EST_WORK-------- 421

The V$ASM_ESTIMATE view provides information for adjusting ASM_POWER_LIMIT and theresulting power of rebalance operations. The EST_WORK column provides an estimate ofthe number of allocation units that have to be moved by the rebalance operation tocomplete.

The PASS column of V$ASM_OPERATION is updated for resync and rebalance operations.The contents of the column can be RESYNC, REBALANCE, or COMPACT. For example, thefollowing SQL query shows values in the PASS column during a rebalance operation.

SQL> SELECT GROUP_NUMBER, PASS, STATE FROM V$ASM_OPERATION;

GROUP_NUMBER PASS STAT------------ --------- ---- 2 RESYNC WAIT

Chapter 4Altering Disk Groups

4-30

Page 114: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

2 REBALANCE WAIT 2 COMPACT WAIT

See Also:

• ASM_POWER_LIMIT for information about the ASM_POWER_LIMIT initializationparameter

• Summary of Disk Group Attributes for information about disk group attributes

• Manually Rebalancing Disk Groups for more information about rebalancing diskgroups

Scrubbing Disk GroupsOracle ASM disk scrubbing improves availability and reliability by searching for data that maybe less likely to be read. Disk scrubbing checks logical data corruptions and repairs themautomatically in normal and high redundancy disks groups. The scrubbing process repairslogical corruptions using the mirror disks. Disk scrubbing can be combined with disk grouprebalancing to reduce I/O resources. The disk scrubbing process has minimal impact to theregular I/O in production systems.

You can perform scrubbing on a disk group, a specified disk, or a specified file of a disk groupwith the ALTER DISKGROUP SQL statement. For example, the following SQL statements showvarious options used when running the ALTER DISKGROUP disk_group SCRUB SQL statement.

SQL> ALTER DISKGROUP data SCRUB POWER LOW;

SQL> ALTER DISKGROUP data SCRUB FILE '+DATA/ORCL/DATAFILE/example.266.806582193' REPAIR POWER HIGH FORCE;

SQL> ALTER DISKGROUP data SCRUB DISK DATA_0005 REPAIR POWER HIGH FORCE;

You can stop an ongoing scrub operation with the STOP option.

SQL> ALTER DISKGROUP data SCRUB STOP;

When using ALTER DISKGROUP with the SCRUB option, the following items apply:

• The optional REPAIR option automatically repairs disk corruptions. If the REPAIR option isnot specified, then the SCRUB option only checks and reports logical corruptions of thespecified target.

• The optional POWER value can be set to AUTO, LOW, HIGH, or MAX. If the POWER option is notspecified, the power value defaults to AUTO and the power adjusts to the optimum level forthe system.

• If the optional WAIT option is specified, the command returns after the scrubbing operationhas completed. If the WAIT option is not specified, the scrubbing operation is added intothe scrubbing queue and the command returns immediately.

• If the optional FORCE option is specified, the command is processed even if the system I/Oload is high or scrubbing has been disabled internally at the system level.

The scrubbing process is visible in the fields of the V$ASM_OPERATION view while thescrubbing process is running.

Chapter 4Altering Disk Groups

4-31

Page 115: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Managing Oracle ADVM Volumes in a Disk GroupYou can create an Oracle ASM Dynamic Volume Manager (Oracle ADVM) volume in adisk group.

The volume device associated with the dynamic volume can be used to host an OracleACFS file system.

The compatibility attributes COMPATIBLE.ASM and COMPATIBLE.ADVM must be set to 11.2or higher for the disk group.

The ALTER DISKGROUP VOLUME SQL statements enable you to manage Oracle ADVMvolumes, including the functionality to add, modify, resize, disable, enable, and dropvolumes.

If the Oracle ADVM volume is on a flex disk group, then you can change theredundancy of the Oracle ADVM volume online with the ALTER DISKGROUP MODIFYFILEGROUP volume_name SQL statement.

Note:

If the volume is hosting an Oracle ACFS file system, then you cannot resizethat volume with the SQL ALTER DISKGROUP statement. You must use theacfsutil size command instead.

The following are examples of the ALTER DISKGROUP VOLUME statement.

Example 4-9 Managing volumes with ALTER DISKGROUP VOLUME statements

SQL> ALTER DISKGROUP data ADD VOLUME volume1 SIZE 10G;Diskgroup altered.

SQL> ALTER DISKGROUP data RESIZE VOLUME volume1 SIZE 15G;Diskgroup altered.

SQL> ALTER DISKGROUP data DISABLE VOLUME volume1;Diskgroup altered.

SQL> ALTER DISKGROUP data ENABLE VOLUME volume1;Diskgroup altered.

SQL> ALTER DISKGROUP ALL DISABLE VOLUME ALL;Diskgroup altered.

SQL> ALTER DISKGROUP data DROP VOLUME volume1;Diskgroup altered.

Chapter 4Altering Disk Groups

4-32

Page 116: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Disk Group Compatibility Attributes for information about disk groupcompatibility attributes

• About Oracle ASM File Group Properties for information about file groupproperties

• Oracle Automatic Storage Management Cluster File System Administrator'sGuide for more information about managing Oracle ACFS and Oracle ADVMwith ASMCMD and ASMCA tools

• Oracle Automatic Storage Management Cluster File System Administrator'sGuide for information about the resizing a volume with acfsutil size

• Oracle Database SQL Language Reference for information about the ALTERDISKGROUP SQL statement

Oracle ASM Disk DiscoveryDisk discovery is the mechanism used to find the operating system names for disks OracleASM can access.

This mechanism finds all the disks that comprise a disk group to be mounted, the disks anadministrator wants to add to a disk group, or the disks the administrator might consideradding to a disk group. This section contains the following topics:

• How A Disk is Discovered

• Disk Discovery Rules

• Improving Disk Discovery Time

See Also:

ASM_DISKSTRING for additional information about disk discovery and theASM_DISKSTRING initialization parameter

How A Disk is DiscoveredWhen an Oracle ASM instance is initialized, Oracle ASM discovers and examines thecontents of all of the disks that are in the paths that you designated with values in theASM_DISKSTRING initialization parameter.

Disk discovery also occurs when you:

• Run the following SQL statements

– Mount a disk group with ALTER DISKGROUP MOUNT

– Online a disk with ALTER DISKGROUP ONLINE DISK

– Add a disk to a disk group with CREATE or ALTER DISKGROUP...ADD DISK

Chapter 4Oracle ASM Disk Discovery

4-33

Page 117: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

– Resize a disk in a disk group with ALTER DISKGROUP...RESIZE DISK

– Query with SELECT FROM V$ASM_DISKGROUP or V$ASM_DISK views

• Run Oracle ASM Configuration Assistant (ASMCA) operations or ASMCMDcommands that perform the same operations as the SQL statements previouslylisted

After Oracle ASM successfully discovers a disk, the disk appears in the V$ASM_DISKview. Disks that belong to a disk group, that is, disks that have a disk group name inthe disk header, show a header status of MEMBER. Disks that were discovered, but thathave not yet been assigned to a disk group, have a status of either CANDIDATE orPROVISIONED. Disks that previously belonged to a disk group and were dropped cleanlyfrom the disk group have a status of FORMER.

The PROVISIONED status implies that an additional platform-specific action has beentaken by an administrator to make the disk available for Oracle ASM. For example, onWindows computers, the administrator might have used asmtool or asmtoolg to stampthe disk with a header. For example, on Linux computers, the administrator might haveused Oracle ASM Filter Driver or ASMLIB to prepare the disk for Oracle ASM.

Example 4-10 shows a SQL query on V$ASM_DISK that displays the header status of agroup of disks.

Example 4-10 Querying V$ASM_DISK for header status

SQL> SELECT name, header_status, path FROM V$ASM_DISK WHERE path LIKE '/devices/disk0%';

NAME HEADER_STATUS PATH--------- ------------- --------------------- FORMER /devices/disk02 FORMER /devices/disk01 CANDIDATE /devices/disk07DISK06 MEMBER /devices/disk06DISK05 MEMBER /devices/disk05DISK04 MEMBER /devices/disk04DISK03 MEMBER /devices/disk037 rows selected.

See Also:

Oracle Database Reference for information about the header status of anOracle ASM disk that is displayed in the V$ASM_DISK view

Disk Discovery RulesThe rules for discovering Oracle ASM disks are as follows:

• Oracle ASM can discover up to 10,000 disks. That is, if more than 10,000 disksmatch the ASM_DISKSTRING initialization parameter, then Oracle ASM discoversonly the first 10,000.

• Oracle ASM only discovers disk partitions. Oracle ASM does not discoverpartitions that include the partition table.

Chapter 4Oracle ASM Disk Discovery

4-34

Page 118: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• From the perspective of the installation, candidate disks are those that have theCANDIDATE, PROVISIONED, or FORMER header status. These disks with a CANDIDATE,PROVISIONED, or FORMER status can be added to Oracle ASM disk groups without usingthe FORCE flag.

• When adding a disk, the FORCE option must be used if Oracle ASM recognizes that thedisk was managed by Oracle. Such a disk appears in the V$ASM_DISK view with a statusof FOREIGN. In this case, you can only add the disk to a disk group by using the FORCEkeyword.

• MEMBER disks can usually be added to a disk group by specifying the FORCE flag, if thedisks are not part of a currently mounted disk group.

In addition, Oracle ASM identifies the following configuration errors during discovery:

• Multiple paths to the same disk

In this case, if the disk is part of a disk group, then disk group mount fails. If the disk isbeing added to a disk group with the ADD DISK or CREATE DISKGROUP command, then thecommand fails. To correct the error, adjust the ASM_DISKSTRING value so that Oracle ASMdoes not discover multiple paths to the same disk. Or if you are using multipathingsoftware, then ensure that you include only the pseudo-device name in theASM_DISKSTRING value. See Oracle ASM and Multipathing.

• Multiple Oracle ASM disks with the same disk header

This can be caused by having copied one disk onto another. In this case, the disk groupmount operation fails.

Improving Disk Discovery TimeThe value for the ASM_DISKSTRING initialization parameter is an operating system–dependentvalue that Oracle ASM uses to limit the set of paths that the discovery process uses to searchfor disks. When a new disk is added to a disk group, each Oracle ASM instance that has thedisk group mounted must be able to discover the new disk using its ASM_DISKSTRING.

In many cases, the default value (NULL) is sufficient. Using a more restrictive value mightreduce the time required for Oracle ASM to perform discovery, and thus improve disk groupmount time or the time for adding a disk to a disk group. Oracle may dynamically change theASM_DISKSTRING before adding a disk so that the new disk is discovered through thisparameter.

The default value of ASM_DISKSTRING might not find all disks in all situations. If your site isusing Oracle ASM Filter Driver or a third-party vendor, then you may have discovery stringconventions that you must use for ASM_DISKSTRING.

In addition, if your installation uses multipathing software, then the software might placepseudo-devices in a path that is different from the operating system default.

See Also:

• Administering Oracle ASM Filter Driver for information about Oracle ASM FilterDriver

• Oracle ASM and Multipathing and your multipathing vendor documentation forinformation about multipathing

Chapter 4Oracle ASM Disk Discovery

4-35

Page 119: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Managing Capacity in Disk GroupsWhen Oracle ASM provides redundancy, such as when you create a disk group withNORMAL or HIGH redundancy, you must have sufficient capacity in each disk group tomanage a re-creation of data that is lost after a failure of one or two failure groups.After one or more disks fail, the process of restoring redundancy for all data requiresspace from the surviving disks in the disk group. If not enough space remains, thensome files might end up with reduced redundancy.

Reduced redundancy means that one or more extents in the file are not mirrored at theexpected level. For example, a reduced redundancy file in a high redundancy diskgroup has at least one file extent with two or fewer total copies of the extent instead ofthree. For unprotected files, data extents could be completely missing. Other causes ofreduced redundancy files are disks running out of space or an insufficient number offailure groups.

The following guidelines help ensure that you have sufficient space to restore fullredundancy for all disk group data after the failure of one or more disks.

• Normal redundancy disk group - It is best to have enough free space in your diskgroup to tolerate the loss of all disks in one failure group. The amount of freespace should be equivalent to the size of the largest failure group.

• High redundancy disk group - It is best to have enough free space to cope with theloss of all disks in two failure groups. The amount of free space should beequivalent to the sum of the sizes of the two largest failure groups.

Note:

When you lose multiple disks from multiple failure groups, then you couldlose both the primary and the redundant copies of your data. In addition,if you do not have enough capacity to restore redundancy, then OracleASM can continue to operate. However, if another disk fails, then thesystem may not be able to tolerate additional failures.

The V$ASM_DISKGROUP view contains the following columns that contain information tohelp you manage capacity:

Note:

The values in the REQUIRED_MIRROR_FREE_MB and USABLE_FILE_MB columnsof the V$ASM_DISKGROUP view are 0 if the disk group type is FLEX or EXTEND.The 0 value in this case means no value is given, not a zero amount in theREQUIRED_MIRROR_FREE_MB and USABLE_FILE_MB columns.

• REQUIRED_MIRROR_FREE_MB indicates the amount of space that must be available ina disk group to restore full redundancy after the worst failure that can be toleratedby the disk group without adding additional storage. This requirement ensures thatthere are sufficient failure groups to restore redundancy. Also, this worst failure

Chapter 4Managing Capacity in Disk Groups

4-36

Page 120: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

refers to a permanent failure where the disks must be dropped, not the case where thedisks go offline and then back online.

The amount of space displayed in this column takes the effects of mirroring into account.The value is computed as follows:

– A normal redundancy disk group with more than two REGULAR failure groups

The value is the total raw space for all of the disks in the largest failure group. Thelargest failure group is the one with the largest total raw capacity. For example, ifeach disk is in its own failure group, then the value would be the size of the largestcapacity disk.

– A high redundancy disk group with more than three REGULAR failure groups

The value is the total raw space for all of the disks in the two largest failure groups.

• USABLE_FILE_MB indicates the amount of free space, adjusted for mirroring, that isavailable for new files to restore redundancy after a disk failure. USABLE_FILE_MB iscomputed by subtracting REQUIRED_MIRROR_FREE_MB from the total free space in the diskgroup and then adjusting the value for mirroring. For example, in a normal redundancydisk group where by default the mirrored files use disk space equal to twice their size, if 4GB of actual usable file space remains, then USABLE_FILE_MB equals roughly 2 GB. Youcan then add a file that is up to 2 GB. For information about negative values ofUSABLE_FILE_MB, refer to Negative Values of USABLE_FILE_MB.

• TOTAL_MB is the total usable capacity of a disk group in megabytes. The calculations fordata in this column take the disk header overhead into consideration. The disk headeroverhead depends on the number of Oracle ASM disks and Oracle ASM files. This valueis typically about 1% of the total raw storage capacity. For example, if the total LUNcapacity provisioned for Oracle ASM is 100 GB, then the value in the TOTAL_MB columnwould be about 99 GB.

• FREE_MB is the unused capacity of the disk group in megabytes, without considering anydata imbalance. There may be situations where the value in the FREE_MB column showsunused capacity but because one Oracle ASM disk is full, database writes fail because ofthe imbalance in the disk group. Ensure that you initiate a manual rebalance to forceeven data distribution which results in an accurate presentation of the values in theFREE_MB column.

With fine grain striping using 128 KB, the storage is preallocated to be eight times the AUsize. The data file size may appear slightly larger on Oracle ASM than on a local filesystem because of the preallocation.

When you use Oracle ASM normal or high redundancy, the disk space utilizationbecomes more complex to measure because it depends on several variables.

Note:

The values in the TOTAL_MB and FREE_MB columns best describe space usagewhen you do not configure Oracle ASM mirroring, that is, when you useexternal redundancy.

The results from the following query show capacity metrics for a normal redundancy diskgroup that consists of six 1 GB (1024 MB) disks, each in its own failure group:

SQL> SELECT name, type, total_mb, free_mb, required_mirror_free_mb, usable_file_mb FROM V$ASM_DISKGROUP;

Chapter 4Managing Capacity in Disk Groups

4-37

Page 121: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

NAME TYPE TOTAL_MB FREE_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB------------ ------ ---------- ---------- ----------------------- --------------DATA NORMAL 6144 3768 1024 1372

The REQUIRED_MIRROR_FREE_MB column shows that 1 GB of extra capacity must beavailable to restore full redundancy after one or more disks fail. The first three numericcolumns in the query results are raw numbers. That is, they do not take redundancyinto account. Only the last column is adjusted for normal redundancy. In the queryoutput example for the data disk group, the calculation is as follows:

(FREE_MB - REQUIRED_MIRROR_FREE_MB) / 2 = USABLE_FILE_MB

(3768 - 1024) / 2 = 2744 / 2 = 1372

Negative Values of USABLE_FILE_MBDue to the relationship between FREE_MB, REQUIRED_MIRROR_FREE_MB, andUSABLE_FILE_MB, USABLE_FILE_MB can become negative. Although this is notnecessarily a critical situation, it does mean that:

• Depending on the value of FREE_MB, you may not be able to create new files.

• The next failure might result in files with reduced redundancy.

If USABLE_FILE_MB becomes negative, it is strongly recommended that you add morespace to the disk group as soon as possible.

Oracle ASM Mirroring and Disk Group RedundancyThis section contains the following topics:

• Mirroring, Redundancy, and Failure Group Options

• Oracle ASM Recovery from Read and Write I/O Errors

• Oracle ASM Fast Mirror Resync

• Preferred Read Failure Groups

Mirroring, Redundancy, and Failure Group OptionsIf you specify mirroring for a file, then Oracle ASM automatically stores redundantcopies of the file extents in separate failure groups. Failure groups apply to normal,high, flex, and extended redundancy disk groups. You can define the failure groups foreach disk group when you create or alter the disk group.

There are multiple types of disk groups based on the Oracle ASM redundancy level. Table 4-2 lists the types with their supported and default mirroring levels. The defaultmirroring levels indicate the mirroring level with which each file is created unless adifferent mirroring level is designated.

Table 4-2 Mirroring options for Oracle ASM disk group types

Disk Group Type Supported Mirroring Levels Default Mirroring Level

EXTERNAL redundancy Unprotected (none) Unprotected

Chapter 4Oracle ASM Mirroring and Disk Group Redundancy

4-38

Page 122: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 4-2 (Cont.) Mirroring options for Oracle ASM disk group types

Disk Group Type Supported Mirroring Levels Default Mirroring Level

NORMAL redundancy Two-way, three-way, unprotected(none)

Two-way

HIGH redundancy Three-way Three-way

FLEX redundancy Two-way, three-way, unprotected(none)

Two-way (newly-created)

EXTENDED redundancy Two-way, three-way, unprotected(none)

Two-way

For normal and high disk group types, the redundancy level controls how many disk failuresare tolerated without dismounting the disk group or losing data. Each file is allocated basedon its own redundancy, but the default comes from the disk group.

For the flex group type, the number of failures tolerated before dismount demands on thenumber of failure groups. For five or more failure groups, two disk failures are tolerated. Forthree or four failure groups, one disk failure is tolerated.

For the extended disk group type, each site is similar to a flex disk group. If the site has fivefailure groups or more, two disk failures with in a site can be tolerated before the sitebecomes compromised. If the site has three or four failure groups, the site can tolerate onedisk failure before the site is compromised. When two sites are compromised, the disk groupdismounts. An extended disk group requires a minimum of three failure groups for each datasite.

For flex and extended disk groups, mirroring describes the availability of the files within a diskgroup, not the disk group itself. For example: If a file is unprotected in a flex disk group thathas five failure groups, then after one failure the disk group is still mounted, but the filebecomes unavailable.

The redundancy levels are:

• EXTERNAL redundancy

Oracle ASM does not provide mirroring redundancy and relies on the storage system toprovide RAID functionality. Any write error causes a forced dismount of the disk group. Alldisks must be located to successfully mount the disk group.

• NORMAL redundancy

Oracle ASM provides two-way mirroring by default, which means that all files aremirrored so that there are two copies of every extent. A loss of one Oracle ASM disk istolerated. You can optionally choose three-way or unprotected mirroring.

A file specified with HIGH redundancy (three-way mirroring) in a NORMAL redundancy diskgroup provides additional protection from a bad disk sector in one disk, plus the failure ofanother disk. However, this scenario does not protect against the failure of two disks.

• HIGH redundancy

Oracle ASM provides three-way (triple) mirroring by default. A loss of two Oracle ASMdisks in different failure groups is tolerated.

• FLEX redundancy

Oracle ASM provides two-way mirroring by default for newly-created flex disk groups. Formigrated flex disk groups, the default values are obtained from the template values in the

Chapter 4Oracle ASM Mirroring and Disk Group Redundancy

4-39

Page 123: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

normal or high redundancy disk groups before migration. For migration fromnormal redundancy, if the template defaults were not changed, then the flexdefaults are two-way mirroring. For migration from high redundancy, if the templatedefaults were not changed, then the flex defaults are three-way mirroring.

• EXTENDED redundancy

Oracle ASM provides two-way mirroring by default. The redundancy settingdescribes redundancy within a data site. For example: If there is a two-waymirrored file in a two-data-site extended disk group, then there are four copies ofthe file, two in each data site.

Oracle ASM file groups in a flex or extended disk group can have different redundancylevels.

If there are not enough online failure groups to satisfy the file mirroring (redundancyattribute value) specified in the disk group file type template, Oracle ASM allocates asmany mirrors copies as possible and subsequently allocates the remaining mirrorswhen sufficient online failure groups are available.

Failure groups enable the mirroring of metadata and user data. System reliability candiminish if your environment has an insufficient number of failure groups.

This section contains these topics:

• Oracle ASM Failure Groups

• How Oracle ASM Manages Disk Failures

• Guidelines for Using Failure Groups

• Failure Group Frequently Asked Questions

See Also:

• Managing Oracle ASM Flex Disk Groups for information about OracleASM flex disk groups, extended disk groups, and file groups

• Managing Disk Group Templates for information about specifying OracleASM disk group templates

Oracle ASM Failure GroupsFailure groups are used to store mirror copies of data. When Oracle ASM allocates anextent for a normal redundancy file, Oracle ASM allocates a primary copy and asecondary copy. Oracle ASM chooses the disk on which to store the secondary copyso that it is in a different failure group than the primary copy. Each copy is on a disk ina different failure group so that the simultaneous failure of all disks in a failure groupdoes not result in data loss.

A failure group is a subset of the disks in a disk group, which could fail at the sametime because they share hardware. The failure of common hardware must betolerated. Four drives that are in a single removable tray of a large JBOD (Just aBunch of Disks) array should be in the same failure group because the tray could beremoved making all four drives fail at the same time. Drives in the same cabinet couldbe in multiple failure groups if the cabinet has redundant power and cooling so that it isnot necessary to protect against failure of the entire cabinet. However, Oracle ASM

Chapter 4Oracle ASM Mirroring and Disk Group Redundancy

4-40

Page 124: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

mirroring is not intended to protect against a fire in the computer room that destroys the entirecabinet.

There are always failure groups even if they are not explicitly created. If you do not specify afailure group for a disk, then Oracle automatically creates a new failure group containing justthat disk, except for disk groups containing disks on Oracle Exadata cells.

A normal redundancy disk group must contain at least two failure groups. A high redundancydisk group must contain at least three failure groups. However, Oracle recommends usingmore failure groups. A small number of failure groups, or failure groups of uneven capacity,can create allocation problems that prevent full use of all of the available storage.

Oracle recommends a minimum of three failure groups for normal redundancy disk groupsand five failure groups for high redundancy disk groups to maintain the necessary number ofcopies of the Partner Status Table (PST) and to ensure robustness with respect to storagehardware failures.

In the event of a system failure, three failure groups in a normal redundancy disk group allowa comparison among three PSTs to accurately determine the most up to date and correctversion of the PST, which could not be done with a comparison between only two PSTs.Similarly with a high redundancy disk group, if two failure groups are offline, then Oracle ASMwould be able to make a comparison among the three remaining PSTs.

If configuring an extra failure group presents a problem with storage capacity management,then a quorum failure group can be used as the extra failure group to store a copy of the PST.A quorum failure group does not require the same capacity as the other failure groups.

Failure groups can be specified as regular or quorum failure groups. For information aboutquorum failure groups, see Storing Oracle Cluster Registry and Voting Files in Oracle ASMDisk Groups.

See Also:

Oracle Exadata documentation for information about Oracle Exadata failure groups

How Oracle ASM Manages Disk FailuresDepending on the redundancy level of a disk group and how you define failure groups, thefailure of one or more disks could result in either of the following:

• The disks are first taken offline and then automatically dropped. In this case, the diskgroup remains mounted and serviceable. In addition, because of mirroring, all of the diskgroup data remains accessible. After the disk drop operation, Oracle ASM performs arebalance to restore full redundancy for the data on the failed disks.

• The entire disk group is automatically dismounted, which means loss of data accessibility.

Guidelines for Using Failure GroupsThe following are guidelines for using failure groups:

• Each disk in a disk group can belong to only one failure group.

• Failure groups should all be of the same size. Failure groups of different sizes may leadto reduced availability.

Chapter 4Oracle ASM Mirroring and Disk Group Redundancy

4-41

Page 125: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• Oracle ASM requires at least two failure groups to create a normal redundancydisk group and at least three failure groups to create a high redundancy diskgroup.

Failure Group Frequently Asked QuestionsThis section discusses frequently asked questions about failure group under thefollowing topics:

• How Many Failure Groups Should I Create?

• How are Multiple Failure Groups Recovered after Simultaneous Failures?

• When Should External, Normal, or High Redundancy Be Used?

How Many Failure Groups Should I Create?

Choosing the number of failure groups to create depends on the types of failures thatmust be tolerated without data loss. For small numbers of disks, such as fewer than20, it is usually best to use the default failure group creation that puts every disk in itsown failure group.

Using the default failure group creation for small numbers of disks is also applicablefor large numbers of disks where your main concern is disk failure. For example, a diskgroup might be configured from several small modular disk arrays. If the system mustcontinue operating when an entire modular array fails, then a failure group shouldconsist of all of the disks in one module. If one module fails, then all of the data on thatmodule is relocated to other modules to restore redundancy. Disks should be placed inthe same failure group if they depend on a common piece of hardware whose failuremust be tolerated with no loss of availability.

How are Multiple Failure Groups Recovered after Simultaneous Failures?

A simultaneous failure can occur if there is a failure of a piece of hardware used bymultiple failure groups. This type of failure usually forces a dismount of the disk groupif all disks are unavailable.

When Should External, Normal, or High Redundancy Be Used?

Oracle ASM mirroring runs on the database server and Oracle recommends to off loadthis processing to the storage hardware RAID controller by using external redundancy.You can use normal redundancy in the following scenarios:

• Storage system does not have RAID controller

• Mirroring across storage arrays

• Extended cluster configurations

In general, Oracle ASM mirroring is the Oracle alternative to third party logical volumemanagers. Oracle ASM mirroring eliminates the deployment of additional layers ofsoftware complexity in your Oracle Database environment.

Oracle ASM Recovery from Read and Write I/O ErrorsRead errors can be the result of a loss of access to the entire disk or mediacorruptions on an otherwise a healthy disk. Oracle ASM tries to recover from readerrors on corrupted sectors on a disk. When a read error by the database or Oracle

Chapter 4Oracle ASM Mirroring and Disk Group Redundancy

4-42

Page 126: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

ASM triggers the Oracle ASM instance to attempt bad block remapping, Oracle ASM reads agood copy of the extent and copies it to the disk that had the read error.

• If the write to the same location succeeds, then the underlying allocation unit (sector) isdeemed healthy. This might be because the underlying disk did its own bad blockreallocation.

• If the write fails, Oracle ASM attempts to write the extent to a new allocation unit on thesame disk. If this write succeeds, the original allocation unit is marked as unusable. If thewrite fails, the disk is taken offline.

One unique benefit on Oracle ASM based mirroring is that the database instance is aware ofthe mirroring. For many types of logical corruptions such as a bad checksum or incorrectSystem Change Number (SCN), the database instance proceeds through the mirror sidelooking for valid content and proceeds without errors. If the process in the database thatencountered the read can obtain the appropriate locks to ensure data consistency, it writesthe correct data to all mirror sides.

When encountering a write error, a database instance sends the Oracle ASM instance a diskoffline message.

• If database can successfully complete a write to at least one extent copy and receiveacknowledgment of the offline disk from Oracle ASM, the write is considered successful.

• If the write to all mirror side fails, database takes the appropriate actions in response to awrite error such as taking the tablespace offline.

When the Oracle ASM instance receives a write error message from a database instance orwhen an Oracle ASM instance encounters a write error itself, the Oracle ASM instanceattempts to take the disk offline. Oracle ASM consults the Partner Status Table (PST) to seewhether any of the disk's partners are offline. If too many partners are offline, Oracle ASMforces the dismounting of the disk group. Otherwise, Oracle ASM takes the disk offline.

The ASMCMD remap command was introduced to address situations where a range of badsectors exists on a disk and must be corrected before Oracle ASM or database I/O. Forinformation about the remap command, see remap.

Oracle ASM Fast Mirror ResyncRestoring the redundancy of an Oracle ASM disk group after a transient disk path failure canbe time consuming. This is especially true if the recovery process requires rebuilding anentire Oracle ASM disk group. Oracle ASM fast mirror resync significantly reduces the time toresynchronize a failed disk in such situations. When you replace the failed disk, Oracle ASMcan quickly resynchronize the Oracle ASM disk extents.

Note:

To use this feature, the disk group compatibility attributes must be set to 11.1 orhigher.

Any problems that make a failure group temporarily unavailable are considered transientfailures that can be recovered by the Oracle ASM fast mirror resync feature. For example,transient failures can be caused by disk path malfunctions, such as cable failures, host busadapter failures, controller failures, or disk power supply interruptions.

Chapter 4Oracle ASM Mirroring and Disk Group Redundancy

4-43

Page 127: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Oracle ASM fast resync keeps track of pending changes to extents on an offline diskduring an outage. The extents are resynced when the disk is brought back online.

By default, Oracle ASM drops a disk in 12 hours after it is taken offline. You can setthe DISK_REPAIR_TIME disk group attribute to delay the drop operation by specifying atime interval to repair the disk and bring it back online. The time can be specified inunits of minutes (m or M) or hours (h or H). If you omit the unit, then the default unit ishours. The DISK_REPAIR_TIME disk group attribute can only be set with the ALTERDISKGROUP SQL statement and is only applicable to normal and high redundancy diskgroups.

If the attribute is not set explicitly, then the default value (12h) applies to disks thathave been set to OFFLINE mode without an explicit DROP AFTER clause. Disks takenoffline due to I/O errors do not have a DROP AFTER clause.

The default DISK_REPAIR_TIME attribute value is an estimate that should be adequatefor most environments. However, ensure that the attribute value is set to the amount oftime that you think is necessary in your environment to fix any transient disk error, andduring which you are able to tolerate reduced data redundancy.

The elapsed time (since the disk was set to OFFLINE mode) is incremented only whenthe disk group containing the offline disks is mounted. The REPAIR_TIMER column ofV$ASM_DISK shows the amount of time left (in seconds) before an offline disk isdropped. After the specified time has elapsed, Oracle ASM drops the disk. You canoverride this attribute with the ALTER DISKGROUP OFFLINE DISK statement and the DROPAFTER clause.

Note:

If a disk is offlined by Oracle ASM because of an I/O (write) error or isexplicitly offlined using the ALTER DISKGROUP... OFFLINE statement without theDROP AFTER clause, then the value specified for the DISK_REPAIR_TIMEattribute for the disk group is used.

Altering the DISK_REPAIR_TIME attribute has no effect on offline disks. Thenew value is used for any disks that go offline after the attribute is updated.You can confirm this behavior by viewing the Oracle ASM alert log.

If an offline disk is taken offline for a second time, then the elapsed time is reset andrestarted. If another time is specified with the DROP AFTER clause for this disk, the firstvalue is overridden and the new value applies. A disk that is in OFFLINE mode cannotbe dropped with an ALTER DISKGROUP DROP DISK statement; an error is returned ifattempted. If for some reason the disk must be dropped (such as the disk cannot berepaired) before the repair time has expired, a disk can be dropped immediately byissuing a second OFFLINE statement with a DROP AFTER clause specifying 0h or 0m.

You can use ALTER DISKGROUP to set the DISK_REPAIR_TIME attribute to a specifiedhour or minute value, such as 6 hours or 360 minutes. For example:

ALTER DISKGROUP data SET ATTRIBUTE 'disk_repair_time' = '6h'ALTER DISKGROUP data SET ATTRIBUTE 'disk_repair_time' = '360m'

After you repair the disk, run the SQL statement ALTER DISKGROUP ONLINE DISK. Thisstatement brings a repaired disk group back online to enable writes so that no new

Chapter 4Oracle ASM Mirroring and Disk Group Redundancy

4-44

Page 128: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

writes are missed. This statement also starts a procedure to copy of all of the extents that aremarked as stale on their redundant copies.

If a disk goes offline when the Oracle ASM instance is in rolling upgrade mode, the diskremains offline until the rolling upgrade has ended and the timer for dropping the disk isstopped until the Oracle ASM cluster is out of rolling upgrade mode. Examples of taking disksoffline and bringing them online follow.

The following example takes disk DATA_001 offline and drops it after fifteen minutes.

ALTER DISKGROUP data OFFLINE DISK DATA_001 DROP AFTER 15m;

The next example takes the disk DATA_001 offline and drops it after the time perioddesignated by DISK_REPAIR_TIME elapses:

ALTER DISKGROUP data OFFLINE DISK DATA_001;

This example takes all of the disks in failure group FG2 offline and drops them after the timeperiod designated by DISK_REPAIR_TIME elapses. If you used a DROP AFTER clause, then thedisks would be dropped after the specified time:

ALTER DISKGROUP data OFFLINE DISKS IN FAILGROUP FG2;

The next example brings all of the disks in failure group FG2 online:

ALTER DISKGROUP data ONLINE DISKS IN FAILGROUP FG2;

This example brings only disk DATA_001 online:

ALTER DISKGROUP data ONLINE DISK DATA_001;

This example brings all of the disks in disk group DATA online:

ALTER DISKGROUP data ONLINE ALL;

Querying the V$ASM_OPERATION view while you run ALTER DISKGROUP ONLINE statementsdisplays the name and state of the current operation that you are performing. For example,the following SQL query shows values in the PASS column during an online operation.

SQL> SELECT GROUP_NUMBER, PASS, STATE FROM V$ASM_OPERATION; GROUP_NUMBER PASS STAT------------ --------- ---- 1 RESYNC RUN 1 REBALANCE WAIT 1 COMPACT WAIT

An offline operation does not generate a display in a V$ASM_OPERATION view query.

The resync checkpoint maintains the position in the resync process in the event of a failure. Ifthe resync process or an instance fails, then the next resync operation continues from theposition where the previous process left off, rather than starting from the beginning or theresync process.

You can set the FAILGROUP_REPAIR_TIME and CONTENT.TYPE disk group attributes. TheFAILGROUP_REPAIR_TIME disk group attribute specifies a default repair time for the failuregroups in the disk group. The CONTENT.TYPE disk group attribute specifies the type of dataexpected to be stored in a disk group. You can set these attributes with ASMCA, ASMCMDmkdg, or SQL CREATE and ALTER DISKGROUP statements.

Chapter 4Oracle ASM Mirroring and Disk Group Redundancy

4-45

Page 129: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The ASMCMD lsop command shows the resync time estimate. There are separaterows in the V$ASM_OPERATION table for different phases of rebalance: disk resync,rebalance, and data compaction.

The ASMCMD online command has a power option to specify the power for the onlineoperation. The SQL ALTER DISKGROUP REPLACE DISK statement also has the poweroption.

The ASMCMD chdg command provides the replace option in addition to the add anddrop tags. The ASMCMD mkdg command has an additional time parameter (-t) tospecify the time to offline a failure group.

See Also:

• Disk Group Compatibility for information about disk group compatibility

• Managing Disk Group Attributes for information about disk groupattributes

• Oracle Grid Infrastructure Installation and Upgrade Guide and Upgradingand Patching Oracle ASM for information about upgrading Oracle ASM

• Oracle Database SQL Language Reference for information about ALTERDISKGROUP

• Oracle Database SQL Language Reference for information about CREATEDISKGROUP

Preferred Read Failure GroupsWhen you configure Oracle ASM failure groups, it might be more efficient for a node toread from an extent that is closest to the node, even if that extent is a secondaryextent. In other words, you can configure Oracle ASM to read from a secondary extentif that extent is closer to the node instead of Oracle ASM reading from the primarycopy which might be farther from the node. Using the preferred read failure groupsfeature is most useful in extended clusters.

To use this feature, Oracle recommends that you configure at least one mirroredextent copy from a disk that is local to a node in an extended cluster. However, afailure group that is preferred for one instance might be remote to another instance inthe same Oracle RAC database. The parameter setting for preferred read failuregroups is instance specific.

Chapter 4Oracle ASM Mirroring and Disk Group Redundancy

4-46

Page 130: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

In an Oracle extended cluster, which contains nodes that span multiple physicallyseparated sites, the PREFERRED_READ.ENABLED disk group attribute controls whetherpreferred read functionality is enabled for a disk group. If preferred readfunctionality is enabled, then this functionality enables an instance to determine andread from disks at the same site as itself, which can improve performance. Whetheror not PREFERRED_READ.ENABLED has been enabled, preferred read can be set at thefailure group level on an Oracle ASM instance or a client instance in a cluster withthe ASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter, which isavailable for backward compatibility.

Configuring and Administering Preferred Read Failure Groups

To configure this feature, set the ASM_PREFERRED_READ_FAILURE_GROUPS initializationparameter to specify a list of failure group names as preferred read disks.

Set the parameter where diskgroup is the name of the disk group and failuregroup is thename of the failure group, separating these variables with a period. Oracle ASM ignores thename of a failure group that you use in this parameter setting if the failure group does notexist in the named disk group. You can append multiple values using commas as a separatoras follows:

ASM_PREFERRED_READ_FAILURE_GROUPS = diskgroup.failuregroup,...

In an extended cluster, the failure groups that you specify with settings for theASM_PREFERRED_READ_FAILURE_GROUPS parameter should only contain disks that are local tothe instance. For normal redundancy disk groups, there should be only one failure group oneach site of the extended cluster.

If there are multiple mirrored copies and you have set a value for theASM_PREFERRED_READ_FAILURE_GROUPS parameter, then Oracle ASM first reads the copy thatresides on a preferred read disk. If that read fails, then Oracle ASM attempts to read from thenext mirrored copy that might not be on a preferred read disk.

Having multiple failure groups on one site can cause the loss of access to the disk group bythe other sites if the site containing multiple failure groups fails. In addition, by having multiplefailure groups on a site, an extent might not be mirrored to another site. This can diminish theread performance of the failure group on the other site.

For example, for a normal redundancy disk group, if a site contains two failure groups of adisk group, then Oracle ASM might put both mirror copies of an extent on the same site. Inthis configuration, Oracle ASM cannot protect against data loss from a site failure.

You should configure at most two failure groups on a site for a high redundancy disk group. Ifthere are three sites in an extended cluster, for the same reason previously mentioned, thenyou should only create one failure group.

For a two-site extended cluster, a normal redundancy disk group only has two failure groups.In this case, you can only specify one failure group as a preferred read failure group for eachinstance.

You can use views to identify preferred read failure groups, such as the V$ASM_DISK view thatshows whether a disk is a preferred read disk by the value in the PREFERRED_READ column.You can also use V$ASM_DISK to verify whether local disks in an extended cluster are

Chapter 4Oracle ASM Mirroring and Disk Group Redundancy

4-47

Page 131: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

preferred read disks. Use the Oracle ASM disk I/O statistics to verify that readoperations are using the preferred read disks that you configured.

If a disk group is not optimally configured for an extended cluster, then Oracle ASMrecords warning messages in the alert logs. To identify specific performance issueswith Oracle ASM preferred read failure groups, use the V$ASM_DISK_IOSTAT view. Thisview displays disk I/O statistics for each Oracle ASM client. You can also query theV$ASM_DISK_IOSTAT view on a database instance. However, this query only shows theI/O statistics for the database instance. In general, optimal preferred read extendedcluster configurations balance performance with disk group availability.

Both the Oracle ASM clients and Oracle ASM require Oracle Database 11g Release 1(11.1) or higher to use preferred read failure groups.

Note:

If you do not specify failure groups for a disk group, each disk in the diskgroup belongs to its own failure group. Oracle does not recommend that youconfigure multiple preferred read failure groups in a disk group for an OracleASM instance. For any given instance, if you specify multiple failure groupsin the same disk group as preferred read, a warning message is written tothe alert log.

See Also:

• PREFERRED_READ.ENABLED for information about thePREFERRED_READ.ENABLED disk group attribute

• ASM_PREFERRED_READ_FAILURE_GROUPS for more informationabout the ASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter

• Oracle Real Application Clusters Administration and Deployment Guidefor information about configuring preferred read disks in extendedclusters

• Oracle Database Reference for details about the V$ASM* dynamicperformance views

Performance and Scalability Considerations for Disk GroupsThis section discusses the following considerations for evaluating disk groupperformance:

• Determining the Number of Disk Groups

• Performance Characteristics When Grouping Disks

• Oracle ASM Storage Limits

Determining the Number of Disk GroupsUse the following criteria to determine the number of disk groups to create:

Chapter 4Performance and Scalability Considerations for Disk Groups

4-48

Page 132: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• Disks in a given disk group should have similar size and performance characteristics. Ifyou have several different types of disks in terms of size and performance, then createseveral disk groups that contain similar characteristics.

• Create separate disk groups for your database files and fast recovery area for backupfiles. This configuration allows fast recovery should a disk group failure occur.

For information about creating disk groups for a new installation, refer to Creating DiskGroups for a New Oracle Installation.

Performance Characteristics When Grouping DisksOracle ASM load balances the file activity by uniformly distributing file extents across all ofthe disks in a disk group. For this technique to be effective it is important that disks in a diskgroup be of similar performance characteristics. For example, the newest and fastest disksmight reside in a disk group reserved for the database work area, and slower drives couldreside in a disk group reserved for the fast recovery area.

There might be situations where it is acceptable to temporarily have disks of different sizesand performance characteristics coexist in a disk group. This would be the case whenmigrating from an old set of disks to a new set of disks. The new disks would be added andthe old disks dropped. As the old disks are dropped, their storage is migrated to the newdisks while the disk group is online.

Oracle ASM Storage LimitsOracle ASM provides near unlimited capacity for future growth, but does have some storagelimits.

Oracle ASM has the following limits on the number of disk groups, disks, and files:

• 511 disk groups in a storage system for Oracle Database 12c Release 1 or later

• 10,000 Oracle ASM disks in a disk group

• 65,530 Oracle ASM disks in a storage system

• 1 million files for each disk group

Without any Oracle Exadata Storage, Oracle ASM has the following storage limits if theCOMPATIBLE.ASM or COMPATIBLE.RDBMS disk group attribute is set to less than 12.1:

• 2 terabytes (TB) maximum storage for each Oracle ASM disk

• 20 petabytes (PB) maximum for the storage system

Without any Oracle Exadata Storage, Oracle ASM has the following storage limits if theCOMPATIBLE.ASM and COMPATIBLE.RDBMS disk group attributes are set to 12.1 or greater:

• 4 PB maximum storage for each Oracle ASM disk with the allocation unit (AU) size equalto 1 MB

• 8 PB maximum storage for each Oracle ASM disk with the AU size equal to 2 MB

• 16 PB maximum storage for each Oracle ASM disk with the AU size equal to 4 MB

• 32 PB maximum storage for each Oracle ASM disk with the AU size equal to 8 MB

• 320 exabytes (EB) maximum for the storage system

With all Oracle Exadata Storage, Oracle ASM has the following storage limits:

• 4 PB maximum storage for each Oracle ASM disk with the AU size equal to 1 MB

Chapter 4Performance and Scalability Considerations for Disk Groups

4-49

Page 133: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• 8 PB maximum storage for each Oracle ASM disk with the AU size equal to 2 MB

• 16 PB maximum storage for each Oracle ASM disk with the AU size equal to 4 MB

• 32 PB maximum storage for each Oracle ASM disk with the AU size equal to 8 MB

• 320 EB maximum for the storage system

The maximum size limit of a disk group equals the maximum disk size multiplied bythe maximum number of disks in a disk group (10,000).

The maximum number of disks across all disk groups is 65,530 disks. However, thetotal number of disks that can be in one disk group is limited to 10,000 disks. This is alimitation on the number of Oracle ASM disks, not necessarily the number of physicalstorage devices. A storage array could group multiple physical storage devices into aLUN that is used as a single Oracle ASM disk.

File size limits are dependent on the value of the disk group compatibility attributes.Oracle ASM supports file sizes greater than 128 TB in any redundancy mode when theCOMPATIBLE.RDBMS disk group attribute is set greater than 10.1.

If COMPATIBLE.RDBMS is set to 10.1, the file size limits are less. For example, withCOMPATIBLE.RDBMS equal to 10.1 and the AU size equal to 1 MB, Oracle ASM file sizelimits are:

• External redundancy: 16 TB

• Normal redundancy: 5.8 TB

• High redundancy: 3.9 TB

Note:

Oracle Database supports data file sizes up to 128 TB depending on the filesystem. In addition, Oracle Database has a file size limit that is dependent onthe DB_BLOCK_SIZE initialization parameter.

See Also:

• Disk Group Compatibility for information about Oracle ASM disk groupcompatibility attributes

• Considerations When Setting Disk Group Compatibility for additionalinformation about Oracle ASM file size limits

• Oracle Automatic Storage Management Cluster File SystemAdministrator's Guide for information about Oracle ACFS space usage

Disk Group CompatibilityThis section describes disk group compatibility under the following topics:

• Overview of Disk Group Compatibility

• Disk Group Compatibility Attributes

Chapter 4Disk Group Compatibility

4-50

Page 134: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• Setting Disk Group Compatibility Attributes

• Features Enabled By Disk Group Compatibility Attribute Settings

• Considerations When Setting Disk Group Compatibility

Overview of Disk Group CompatibilityAdvancing the disk group compatibility settings enables you to use the new Oracle ASMfeatures that are available in a later release. For example, a disk group with the disk groupcompatibility attributes set to 19.0 can take advantage of Oracle ASM 19c features. Forinformation about the features enabled for combinations of compatibility attribute settings,refer to Table 4-4.

The disk group attributes that determine compatibility are COMPATIBLE.ASM,COMPATIBLE.RDBMS. and COMPATIBLE.ADVM. The COMPATIBLE.ASM and COMPATIBLE.RDBMSattribute settings determine the minimum Oracle Database software version numbers that asystem can use for Oracle ASM and the database instance types respectively. For example, ifthe Oracle ASM compatibility setting is 19.0, and RDBMS compatibility is set to 12.2.0.1,then the Oracle ASM software version must be at least 19.0, and the Oracle Database clientsoftware version must be at least 12.2.0.1. The COMPATIBLE.ADVM attribute determineswhether the Oracle ASM Dynamic Volume Manager feature can create a volume in a diskgroup.

When you create a disk group, you can specify the disk group compatibility attribute settingsin the CREATE DISKGROUP SQL statement. The ALTER DISKGROUP SQL statement can updatethe compatible attribute settings for existing disk groups. For examples of valid combinationsof compatible attribute settings, refer to Table 4-3.

You can also set and update disk group attributes with the ASMCMD setattr command. Forinformation about the ASMCMD setattr command, refer to setattr.

Note:

• The disk group compatibility settings determine whether your environment canuse the latest Oracle ASM features.

• The disk group compatibility settings can only be advanced; you cannot revertto a lower compatibility setting. For more information, refer to Reverting DiskGroup Compatibility.

• The COMPATIBLE.ASM attribute must be advanced before advancing other diskgroup compatibility attributes and its value must be greater than or equal to thevalue of other disk group compatibility attributes.

Disk Group Compatibility AttributesThe disk group compatibility attributes specify the disk group compatibility settings for OracleASM and database instances.

• COMPATIBLE.ASM

• COMPATIBLE.RDBMS

• COMPATIBLE.ADVM

Chapter 4Disk Group Compatibility

4-51

Page 135: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

Starting with Oracle ASM version 12.2.0.1, the minimum and default settingsfor Oracle ASM disk group attributes are:

• COMPATIBLE.ASM = 11.2.0.2 and COMPATIBLE.RDBMS = 10.1 for EXTERNAL,NORMAL, and HIGH redundancy disk groups

• COMPATIBLE.ASM = 12.2.0.1 and COMPATIBLE.RDBMS = 12.2.0.1 for FLEXand EXTENDED disk groups

The default and minimum values for Oracle ASM disk group attributes arepresent when using SQL*Plus to create a disk group. Other utilities, such asASMCA, may use a different default value when creating a disk group;however, the minimum value for Oracle ASM disk group attributes should bethe same.

COMPATIBLE.ASM

The value for the disk group COMPATIBLE.ASM attribute determines the minimumsoftware version for an Oracle ASM instance that can use the disk group. This settingalso affects the format of the data structures for the Oracle ASM metadata on the disk.The format of other file contents is determined by Oracle ASM Dynamic VolumeManager (Oracle ADVM) and the database instance.

COMPATIBLE.RDBMS

The value for the disk group COMPATIBLE.RDBMS attribute determines the minimumCOMPATIBLE database initialization parameter setting for any database instance that isallowed to use the disk group. Before advancing the COMPATIBLE.RDBMS attribute,ensure that the values for the COMPATIBLE initialization parameter for all of thedatabases that access the disk group are set to at least the value of the new setting forCOMPATIBLE.RDBMS.

For example, if the COMPATIBLE initialization parameter of the databases is set to either12.2, then COMPATIBLE.RDBMS can be set to any value between 10.1 and 12.2inclusively. If the COMPATIBLE initialization parameter of the databases is set to 19.0,then COMPATIBLE.RDBMS can be set to any value between 10.1 and 19.0 inclusively.

Note:

The database initialization parameter COMPATIBLE enables you to use a newrelease of Oracle Database, while at the same time guaranteeing backwardcompatibility with an earlier release. For more information about theCOMPATIBLE initialization parameter, refer to Oracle Database Reference.

COMPATIBLE.ADVM

The value for the disk group COMPATIBLE.ADVM attribute determines whether the diskgroup can contain Oracle ADVM volumes. The value must be set to 11.2 or higher.Before setting this attribute, the COMPATIBLE.ASM value must be 11.2 or higher. Also,the Oracle ADVM volume drivers must be loaded in the supported environment.

Chapter 4Disk Group Compatibility

4-52

Page 136: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The default value of the COMPATIBLE.ADVM attribute depends on the level of the Oracle ASMrelease.

See Also:

Oracle Automatic Storage Management Cluster File System Administrator's Guidefor more information about Oracle ACFS and Oracle ADVM

Setting Disk Group Compatibility AttributesThis section discusses the settings of the disk group compatibility attributes and how to setthe attribute values with the CREATE DISKGROUP or ALTER DISKGROUP SQL statement.

This section contains these topics:

• Valid Combinations of Compatibility Attribute Settings

• Using CREATE DISKGROUP with Compatibility Attributes

• Using ALTER DISKGROUP with Compatibility Attributes

• Viewing Compatibility Attribute Settings

• Reverting Disk Group Compatibility

You can also set the disk group compatibility settings withOracle ASM command-line utility(ASMCMD) and Oracle ASM Configuration Assistant (ASMCA). Refer to Managing OracleASM With ASMCA and Managing Oracle ASM with ASMCMD .

Note:

Advancing the values for disk group compatibility attributes is an irreversibleoperation. See Reverting Disk Group Compatibility.

See Also:

Oracle Database SQL Language Reference for more information about the diskgroup compatibility SQL statements

Valid Combinations of Compatibility Attribute SettingsWhen setting the values for the disk group attributes, specify at least the major and minorversions of a valid Oracle Database release number. For example, you can specifycompatibility as 12.2 or 19.0; Oracle assumes that any missing version number digits arezeros.

Oracle ASM features enabled for combinations of attribute settings are shown in FeaturesEnabled By Disk Group Compatibility Attribute Settings.

Chapter 4Disk Group Compatibility

4-53

Page 137: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 4-3 shows some valid combinations of the disk group compatibility attributes andthe valid Oracle ASM and database instance versions for each combination.

Table 4-3 Examples of disk group compatibility attribute settings

COMPATIBLE.ASM COMPATIBLE.RDBMS COMPATIBLE.ADVM Oracle ASMInstanceVersion

COMPATIBLESetting for RDBMSInstance

12.1 12.1 12.1 >= 12.1 >= 12.1

12.2 12.1 12.2 >= 12.2 >= 12.1

18.0 18.0 18.0 >= 18.0 >= 18.0

19.0 19.0 19.0 >=19.0 >=19.0

21.0 21.0 21.0 >=21.0 >=21.0

These are some possible combinations of Oracle ASM and database releases:

• The database release is Oracle Database 11g Release 2 (11.2) (databaseinitialization parameter COMPATIBLE is set to 11.2) and the Oracle ASM release isOracle ASM 11g Release 2 (11.2). The COMPATIBLE.ASM and COMPATIBLE.RDBMSdisk group attributes are set to 10.2 for a disk group.

The Oracle ASM disk group functionality remains at Oracle Database 10g Release2 (10.2).

• The database release is Oracle Database 10g Release 1 (10.1) and the OracleASM release is 11.2. COMPATIBLE.ASM is set to 11.2 and COMPATIBLE.RDBMS is setto 10.1 for a disk group.

• The database release is Oracle Database 12c Release 2 (12.2) (databaseinitialization parameter COMPATIBLE is set to 12.2) and the Oracle ASM release isOracle ASM 12c Release 2 (12.2). All the disk group compatibility attributes areset to 12.2 for a disk group.

Oracle ASM in a Domain Services Cluster and Oracle Database in a MemberCluster Configuration

Note:

Starting with Oracle Grid Infrastructure 21c, Member Clusters, which are partof the Oracle Cluster Domain architecture, are desupported. However,Domain Services Clusters continues to support Members Clusters inreleases previous to Oracle Grid Infrastructure 21c.

Note:

Starting with Oracle Grid Infrastructure 21c, Domain Services Cluster (DSC),which is part of the Oracle Cluster Domain architecture, is deprecated andcan be desupported in a future release.

Chapter 4Disk Group Compatibility

4-54

Page 138: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Oracle ASM or Oracle IOServer running in a Domain Services Cluster (DSC) version 19.1support Oracle Database and Oracle Grid Infrastructure running in Member Cluster versions12.2 and 19.1.

Oracle ASM or Oracle IOServer running in a Domain Services Cluster (DSC) version 12.2support Oracle Database and Oracle Grid Infrastructure running in Member Cluster versions12.2 and 19.1.

An Oracle Database instance must be a version lower than or equal to the Oracle ASMversion in the same cluster. However, this requirement is not strictly enforced when thedatabase instance is connecting from a different cluster.

Using CREATE DISKGROUP with Compatibility AttributesYou can specify the compatibility settings for a disk group with the CREATE DISKGROUPstatement when creating the disk group.

The following example creates a normal redundancy disk group data1 with the Oracle ASMcompatibility set to 19.0 and the RDBMS compatibility set to the default (theCOMPATIBLE.RDBMS default is less than or equal to 19.0):

CREATE DISKGROUP data1 DISK '/dev/sd*' ATTRIBUTE 'compatible.asm' = '19.0';

The following example creates a normal redundancy disk group data2 with the ASM,RDBMS, and ADVM compatibility set to 19.0:

CREATE DISKGROUP data2 DISK '/dev/sd*' ATTRIBUTE 'compatible.asm' = '19.0', 'compatible.rdbms' = '19.0', 'compatible.advm' = '19.0';

Using ALTER DISKGROUP with Compatibility AttributesAfter a disk group has been created, you can use the ALTER DISKGROUP SQL statement tochange the compatibility attributes. The ALTER DISKGROUP SQL statement ensures that Oraclecan advance the compatibility of the specified disk group before committing the change.

All of the affected databases and file systems should be online when running ALTERDISKGROUP to ensure that advancing compatibility does not reduce the database and filesystem access. When advancing disk group compatibility, you must advance theCOMPATIBLE.ASM attribute before the COMPATIBLE.RDBMS or COMPATIBLE.ADVM attribute toensure a valid combination of compatible attribute settings as shown in Table 4-3. You canadvance only one compatibility attribute in a single ALTER DISKGROUP statement.

The following example advances the Oracle ASM compatibility for disk group data3 to 19.0.An Oracle ASM instance must be at Oracle ASM 19c or higher to access the data3 diskgroup.

ALTER DISKGROUP data3 SET ATTRIBUTE 'compatible.asm' = '19.0';

The following example advances the COMPATIBLE.RDBMS and COMPATIBLE.ADVM compatibilityattributes of the disk group data3 to 10.0. This example assumes that the value ofCOMPATIBLE.ASM is set to 19.0.

ALTER DISKGROUP data3 SET ATTRIBUTE 'compatible.rdbms' = '19.0',ALTER DISKGROUP data3 SET ATTRIBUTE 'compatible.advm' = '19.0';

Chapter 4Disk Group Compatibility

4-55

Page 139: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Viewing Compatibility Attribute SettingsYou can view the disk group compatibility settings in the V$ASM_ATTRIBUTE view.However, the V$ASM_ATTRIBUTE view does not display any rows when theCOMPATIBLE.ASM value is set to 10.1. Instead you can determine the values for theCOMPATIBLE.ASM and COMPATIBLE.RDBMS disk group compatibility attributes with theCOMPATIBILITY and DATABASE_COMPATIBILITY columns of the V$ASM_DISKGROUP view.

You can also display the disk group compatibility attributes with the ASMCMDcommand lsattr.

See Also:

• Example 6-1 for an example querying the V$ASM_ATTRIBUTE view

• lsattr for information about the ASMCMD lsattr command

• Oracle Database SQL Language Reference for information about diskgroup attributes

• Oracle Database Reference for details on the V$ASM_DISKGROUP andV$ASM_ATTRIBUTE dynamic performance views

Reverting Disk Group CompatibilityYou cannot revert disk group compatibility to a previous values. Instead you mustcreate a new disk group.

Advancing the values for disk group compatibility attributes is an irreversible operation.If you advance the disk group compatibility settings, you cannot change the valuesback to the previous settings. To revert to the previous values, you must create a newdisk group with the old compatibility attribute settings and then restore the databasefiles that were in the disk group to the new disk group.

When you revert to a new disk group with the old compatibility attribute settings, thelatest Oracle ASM features might not be available. For example, if you revert the diskgroup compatibility to a pre-11.2 value, Oracle ACFS functionality is not available.

For example, you could perform the following procedure to revert a disk group toprevious compatibility settings:

1. If the Oracle ASM SPFILE is in the disk group, move this SPFILE out of the diskgroup:

a. Connect with SQL*Plus to the Oracle ASM instance.

b. Create a PFILE in the file system.

For example:

SQL> CREATE PFILE '$ORACLE_HOME/dbs/asmspfile.ora' FROM SPFILE;

2. If the OCR and voting files are in the disk group, move them out of this disk group.

3. Back up any files that must be saved.

a. Back up the database files.

Chapter 4Disk Group Compatibility

4-56

Page 140: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

b. If an Oracle ACFS file system is mounted on an Oracle ADVM volume on the diskgroup, the operating system files in the file system must be backed up or copied to alocation outside the file system mount point.

4. Create a new disk group using SQL CREATE DISKGROUP specifying the previous values forthe disk group attribute settings.

5. Move or restore the database files into the newly created disk group using either theALTER DATABASE MOVE DATAFILE SQL statement or Recovery Manager (RMAN).

6. Drop the disk group with the advanced disk group compatibility settings using SQL DROPDISKGROUP INCLUDING CONTENTS to remove the disk group and its contents. This SQLstatement also removes any Oracle ACFS file system and its contents.

See Also:

• About Creating a Disk Group for information about creating a disk group

• Moving Data Files Between Disk Groups With ALTER DATABASE forinformation about moving data files between disk groups

• Moving Data Files Between Oracle ASM Disk Groups Using RMAN forinformation about moving database files with RMAN

• Dropping Disk Groups for information about dropping a disk group

• Oracle Clusterware Administration and Deployment Guide for information aboutadministering OCR and voting files

• Oracle Database Administrator’s Guide for information about using the ALTERDATABASE MOVE DATAFILE SQL statement to move data files between OracleASM disk groups

Features Enabled By Disk Group Compatibility Attribute SettingsThis topic describes the Oracle ASM features enabled by valid combinations of the diskgroup compatibility attribute settings.

The following list applies to Oracle ASM features enabled by valid combinations of the diskgroup compatibility attribute settings.

• The value of COMPATIBLE.ASM must always be greater than or equal to the value ofCOMPATIBLE.RDBMS and COMPATIBLE.ADVM.

• Starting with Oracle Grid Infrastructure 12.2.0.1 software, the minimum setting forCOMPATIBLE.ASM is 11.2.0.2.

• A value of not applicable (n/a) means that the setting of the attribute has no effect on thefeature.

• Oracle ASM features not explicitly listed in the following table do not require advancingthe disk group compatibility attribute settings.

• Oracle ASM features explicitly identified by an operating system in the following table areavailable on that operating system starting with the associated disk group attributesettings.

Chapter 4Disk Group Compatibility

4-57

Page 141: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• If encryption is configured for the first time on Oracle ASM 11g Release 2(11.2.0.3) on Linux or if encryption parameters must be changed or a new volumeencryption key must be created following a software upgrade to Oracle ASM 11gRelease 2 (11.2.0.3) on Linux, then the disk group compatibility attributes for ASMand ADVM must be set to 11.2.0.3 or higher.

• Oracle ACFS does not support encryption or replication with the following: OracleDatabase data files, control files, online redo logs, archived redo log files,flashback logs, RMAN backups, and Oracle Data Pump dump file sets.

• Oracle ACFS on Oracle Exadata storage is supported starting with Oracle GridInfrastructure 12.1.0.2 on Linux.

• There may also be minimum requirements for the database COMPATIBLEinitialization parameter.

Table 4-4 Oracle ASM features enabled by disk group compatibility attribute settings

Disk Group Features Enabled COMPATIBLE.ASM COMPATIBLE.RDBMS COMPATIBLE.ADVM

Support for larger AU sizes (32 or 64MB)

>= 11.1 >= 11.1 n/a

Attributes are displayed in theV$ASM_ATTRIBUTE view

>= 11.1 n/a n/a

Fast mirror resync >= 11.1 >= 11.1 n/a

Variable size extents >= 11.1 >= 11.1 n/a

Exadata storage >= 11.1.0.7 >= 11.1.0.7 n/a

OCR and voting files in a disk group >= 11.2 n/a n/a

Sector size set to nondefault value >= 11.2 >= 11.2 n/a

Oracle ASM SPFILE in a disk group >= 11.2 n/a n/a

Oracle ASM File Access Control >= 11.2 >= 11.2 n/a

ASM_POWER_LIMIT value up to 1024 >= 11.2.0.2 n/a n/a

Content type of a disk group >= 11.2.0.3 n/a n/a

Appliance mode for Oracle Exadata (nofixed partnering)

>= 11.2.0.4 n/a n/a

Replication status of a disk group >= 12.1 n/a n/a

Managing a shared password file in adisk group

>= 12.1 n/a n/a

Greater than 2 TB Oracle ASM diskswithout Oracle Exadata storage

>= 12.1 >= 12.1 n/a

Fixed partnering for Oracle Exadata >= 12.1.0.2 n/a n/a

Appliance mode for Oracle DataAppliance (ODA)

>= 12.1.0.2 n/a n/a

Support for Oracle Exadata sparse diskgroups

>= 12.1.0.2 >= 12.1.0.2 n/a

Support for resync checkpoint >= 12.1.0.2 >= 12.1.0.2 n/a

LOGICAL_SECTOR_SIZE >= 12.2 n/a n/a

Altering sector size >= 12.2 n/a n/a

Oracle ASM flex and extended diskgroups

>= 12.2 >= 12.2 n/a

Chapter 4Disk Group Compatibility

4-58

Page 142: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 4-4 (Cont.) Oracle ASM features enabled by disk group compatibility attribute settings

Disk Group Features Enabled COMPATIBLE.ASM COMPATIBLE.RDBMS COMPATIBLE.ADVM

SCRUB_ASYNC_LIMIT >= 12.2 n/a n/a

PREFERRED_READ.ENABLED

Oracle Database 12c Release 2 (12.2) isrequired.

>=12.2 n/a n/a

Converting normal or high redundancydisk groups to flex disk groups withoutrestricted mount

>=18.0 >=12.2 n/a

Oracle ASM flex disk group support formultitenant cloning

>=18.0 >=18.0 n/a

Storage conversion for member clusters >=18.0 and <21.0 n/a n/a

Virtual Allocation Metadata (VAM)enabled on non-sparse normal and highredundancy disk groups

>=18.0 n/a n/a

Support for single parity protection inOracle ASM flex disk groups

The database COMPATIBLE initializationparameter must be set to 19.1 or greater.

>=19.1 n/a n/a

Support for double parity protection inOracle ASM flex disk groups

The database COMPATIBLE initializationparameter must be set to 19.5 or greater.

>=19.5 n/a n/a

See Also:

• Oracle Automatic Storage Management Cluster File System Administrator'sGuide for information about Oracle ACFS features enabled by disk groupcompatibility settings

• Oracle Automatic Storage Management Cluster File System Administrator'sGuide for more information about Oracle ACFS and Oracle ADVM, includingany limitations or restrictions, about storing data files in an Oracle ACFS filesystem

• ASM_POWER_LIMIT for information about the rebalancing process and theASM_POWER_LIMIT initialization parameter

Considerations When Setting Disk Group CompatibilityIf you advance disk group compatibility, then you could enable the creation of files that aretoo large to be managed by a previous release of Oracle Database.

For example, you must be aware of the file size limits because replicated sites cannotcontinue using the software from a previous release to manage these large files. The diskgroup compatibility settings should be the same for all replicated environments.

Chapter 4Disk Group Compatibility

4-59

Page 143: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 4-5 shows the maximum Oracle ASM file sizes supported for multipleCOMPATIBLE.RDBMS settings with the AU_SIZE disk group attribute set to 1 MB. Thistable shows that Oracle Database 10g can only support a file size of up to 16 TB forexternal redundancy. If you advance the COMPATIBILE.RDBMS attribute to 11.1 orgreater, then a file can grow beyond 16 TB. However, the larger size causes the file tobe unusable in a replicated and disaster recovery site if the disaster recovery site hasa disk group COMPATIBLE.RDBMS setting that is incompatible with the larger size.

Table 4-5 Maximum Oracle ASM file sizes for disk groups with AU_SIZE set to1 MB

Redundancy COMPATIBLE.RDBMS = 10.1 COMPATIBLE.RDBMS >= 11.1

External 16 TB 128 TB

Normal 5.8 TB 93 TB

High 3.9 TB 62 TB

Table 4-6 shows the maximum Oracle ASM file sizes supported for multipleCOMPATIBLE.RDBMS settings with the AU_SIZE disk group attribute set to 4 MB.

Table 4-6 Maximum Oracle ASM file sizes for disk groups with AU_SIZE set to4 MB

Redundancy COMPATIBLE.RDBMS = 10.1 COMPATIBLE.RDBMS >= 11.1

External 64 TB 128 TB

Normal 32 TB 128 TB

High 21 TB 128 TB

Note:

The 128 TB limit under the COMPATIBLE.RDBMS >= 11.1 column in tables Table 4-5 and Table 4-6 is not a limit specific to Oracle ASM. The limit isspecific to the database data file, which is calculated as 2^2 * logical blocksize. The block size can be at most 32 KB, or 2^5. The resulting calculationis 2^2 * 2^5 = 2^7, or 128 TB.

Chapter 4Disk Group Compatibility

4-60

Page 144: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Oracle ASM Storage Limits for information about Oracle ASM storage sizes

• Oracle Database Upgrade Guide for information about database compatibility

• Oracle Database Administrator’s Guide for information about the COMPATIBLEinitialization parameter and irreversible compatibility

• Oracle Database Reference for information about the COMPATIBLE initializationparameter

Managing Oracle ASM File Access Control for Disk GroupsOracle ASM File Access Control provides optional protection for the content of Oracle ASMdisk groups from accidental access by unauthorized Oracle ASM clients, such as anunauthorized database.

To set up Oracle ASM File Access Control, you must designate separate operating systemgroup. You can manage Oracle ASM file access control with ASMCMD commands and SQLstatements.

This section contains these topics:

• About Oracle ASM File Access Control

• Setting Disk Group Attributes for Oracle ASM File Access Control

• Using SQL Statements to Manage Oracle ASM File Access Control

See Also:

• Using Separate Operating System Groups for Oracle ASM Users forinformation about designating separate operating system groups

• ASMCMD File Access Control Commands for information about managingOracle ASM File Access Control with ASMCMD commands

• Viewing Oracle ASM File Access Control Information for information aboutviews that provide details about Oracle ASM file access control

• Authentication for Accessing Oracle ASM Instances for information aboutcontrolling accessing to Oracle ASM instances

About Oracle ASM File Access ControlOracle ASM File Access Control restricts the access of files to specific Oracle ASM clientsthat connect as SYSDBA.

An Oracle ASM client is typically a database, which is identified as the user that owns thedatabase instance home. Oracle ASM File Access Control uses this user name to identify adatabase. Oracle ASM File Access Control restricts access based on the operating system

Chapter 4Managing Oracle ASM File Access Control for Disk Groups

4-61

Page 145: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

effective user identification number of a database owner. For example, in Table 3-2 thedatabases are identified as oracle1 and oracle2.

Oracle ASM uses file access control to determine the additional privileges that aregiven to a database that has been authenticated AS SYSDBA on the Oracle ASMinstance. These additional privileges include the ability to modify and delete certainfiles, aliases, and user groups.

You can set up user groups to specify the list of databases that share the same accesspermissions to Oracle ASM files. User groups are lists of databases and any databasethat authenticates AS SYSDBA can create a user group. However, only the creator ofa group can delete it or modify its membership list.

Each Oracle ASM file has three categories of privileges: owner, group, and other. Eachcategory can have no permission, read-only permission, or read-write permission.

The file owner is usually the creator of the file and can assign permissions for the filein any of the owner, group, or other categories. The owner can also change the groupassociated with the file.

When you create a file, a group is not automatically associated with the file. You mustuse the asmcmd chgrp command to set the group manually because Oracle ASM FileAccess Control does not have the concept of the primary group of a user.

When administering Oracle ASM File Access Control, Oracle recommends that youconnect as SYSDBA to the database instance that is the owner, or planned owner, ofthe files in the disk group.

To set up Oracle ASM File Access Control for files in a disk group, perform thefollowing steps:

1. Alter a new or existing disk group to set the Oracle ASM File Access Control diskgroup attributes.

For a newly-created disk group, you should set the disk group attributes beforecreating any files in the disk group.

2. For files that exist in a disk group before setting the Oracle ASM File AccessControl disk group attributes, you must explicitly set the permissions andownership on those existing files.

Ensure that the user exists before setting ownership or permissions on a file. Thefile must be closed before setting the ownership or permissions.

3. Optionally, you can create user groups that are groups of database users thatshare the same access permissions to Oracle ASM files.

Chapter 4Managing Oracle ASM File Access Control for Disk Groups

4-62

Page 146: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Setting Disk Group Attributes for Oracle ASM File Access Control forinformation about setting disk group attributes

• Using SQL Statements to Manage Oracle ASM File Access Control forinformation about using ALTER DISKGROUP SET PERMISSION and ALTER DISKGROUPSET OWNERSHIP for managing Oracle ASM File Access Control with SQLstatements

• Using SQL Statements to Manage Oracle ASM File Access Control forinformation about using ALTER DISKGROUP ADD USERGROUP

Setting Disk Group Attributes for Oracle ASM File Access ControlTo manage Oracle ASM File Access Control for a disk group, you must set theACCESS_CONTROL.ENABLED and ACCESS_CONTROL.UMASK disk group attributes. You can set theattributes by altering the disk group with the ALTER DISKGROUP SQL statement or you can setthe attributes with the ASMCMD setattr command.

When you set up file access control on an existing disk group, the files previously createdremain accessible by everyone, unless you run the ALTER DISKGROUP SET PERMISSION SQLstatement or the ASMCMD chmod command to restrict the permissions.

The COMPATIBLE.ASM and COMPATIBLE.RDBMS disk group attributes must be set to 11.2 orhigher to enable Oracle ASM File Access Control.

The disk group attributes that control Oracle ASM File Access Control are the following:

• ACCESS_CONTROL.ENABLED

This attribute determines whether Oracle ASM File Access Control is enabled for a diskgroup.

The value can be true or false. The default is false.

If the attribute is set to true, accessing Oracle ASM files is subject to access control. Iffalse, any user can access every file in the disk group. All other operations behaveindependently of this attribute.

• ACCESS_CONTROL.UMASK

This attribute determines which permissions are masked out on the creation of an OracleASM file for the user that owns the file, users in the same user group, and others not inthe user group. This attribute applies to all files on a disk group.

The values can be combinations of three digits {0|2|6} {0|2|6} {0|2|6}. The default is 066.

Setting to 0 masks out nothing. Setting to 2 masks out write permission. Setting to 6masks out both read and write permissions.

Before setting the ACCESS_CONTROL.UMASK disk group attribute, you must set theACCESS_CONTROL.ENABLED attribute to true to enable Oracle ASM File Access Control.

Example 4-11 shows how to enable Oracle ASM File Access Control for a disk group usingSQL*Plus. In this example, the umask permissions setting is 026 which enables read-writeaccess for the owner (masks out nothing with 0), read access for users in the group (masks

Chapter 4Managing Oracle ASM File Access Control for Disk Groups

4-63

Page 147: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

out write permission with 2), and no access to others (masks out all access with 6) notin the group.

Example 4-11 Setting up Oracle ASM File Access Control

ALTER DISKGROUP data1 SET ATTRIBUTE 'access_control.enabled' = 'true';ALTER DISKGROUP data1 SET ATTRIBUTE 'access_control.umask' = '026';

See Also:

• setattr for information about the ASMCMD setattr command

• chmod for information about the ASMCMD chmod command

• Disk Group Compatibility for information about disk group compatibilityattributes

Using SQL Statements to Manage Oracle ASM File Access ControlYou can use the ALTER DISKGROUP SQL statement to manage file access control forOracle ASM disk groups. These SQL statements are available for both database andOracle ASM instances.

When administering users with SQL*Plus, the users must be existing operating systemusers and their user names must have corresponding operating system user IDs.However, only users in the same cluster as the Oracle ASM instance can be validated.

Note:

When modifying ownership of files, the previous owner of a file cannot bedropped while the file is still open even after the ownership of the file haschanged.

The SQL statements that support disk group access control are:

• ALTER DISKGROUP ADD USERGROUP WITH MEMBER

Adds an Oracle ASM user group to a disk group. The maximum length of a usergroup name is 63 bytes. If you specify the user name, then it must be in the OSpassword file and its length cannot exceed 32 characters.

The operating system users of the databases identified in the MEMBER clause mustbe in the disk group, as shown by V$ASM_USER, or the command returns an error.Any users authenticated as SYSASM or SYSDBA can create new user groups. Forexample:

SQL> SELECT group_number, os_name FROM V$ASM_USER;

GROUP_NUMBER OS_NAME------------ ---------------------------------------------------------------- 1 oracle1 1 oracle2...

Chapter 4Managing Oracle ASM File Access Control for Disk Groups

4-64

Page 148: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

SQL> ALTER DISKGROUP data ADD USERGROUP 'test_grp1' WITH MEMBER 'oracle1','oracle2';

• ALTER DISKGROUP DROP USERGROUP

Drops an Oracle ASM user group from a disk group. Dropping a group might leave somefiles without a valid group. For those files to have a valid group, you must manuallyupdate the group associated with those files to a valid group.

SQL> ALTER DISKGROUP data DROP USERGROUP 'test_grp1';

• ALTER DISKGROUP MODIFY USERGROUP ADD MEMBER

Adds users to the specified user group. The users must be in the disk group, as shownby V$ASM_USER, or the command returns an error. Only the creator of the group or theOracle ASM administrator can modify group membership.

SQL> ALTER DISKGROUP data MODIFY USERGROUP 'test_grp2' ADD MEMBER 'oracle2';

• ALTER DISKGROUP MODIFY USERGROUP DROP MEMBER

Removes users from the specified user group. If a member is not in the user group, thenan error is returned. Only the creator of the group or the Oracle ASM administrator canmodify group membership.

SQL> ALTER DISKGROUP data MODIFY USERGROUP 'test_grp2' DROP MEMBER 'oracle2';

• ALTER DISKGROUP ADD USER

Adds operating system (OS) users to an Oracle ASM disk group, so that these users canhave access privileges on the disk group. If a user exists in the disk group, as shown byV$ASM_USER, then the command records an error and continues to add other users, if any.

The operating system user of a running database instance is automatically added to adisk group when the database instance accesses that disk group and creates files.However, for a database instance to read files in a disk group without creating any files,then you must use the ADD USER clause to add the operating system user associated withthat database to the disk group. Also, you can use this clause to add the operatingsystem user associated with a database to an existing disk group immediately aftersetting the Oracle ASM File Access Control disk group attributes and before creating newfiles.

SQL> ALTER DISKGROUP data ADD USER 'oracle1';

• ALTER DISKGROUP DROP USER

Drops operating system users from an Oracle ASM disk group. If a user is not in the diskgroup, then this command records an error and continues to drop other users, if any.

If the user owns any files on the same Oracle ASM disk group, then this command failswith an error, unless the CASCADE keyword is specified. If the latter case, then the user isdeleted, along with all the files that the user owns.

If any files owned by the user are currently open, then the DROP USER command fails, andno files are deleted.

SQL> ALTER DISKGROUP data DROP USER 'oracle1';

• ALTER DISKGROUP REPLACE USER

Replaces one operating system user with another in an Oracle ASM disk group. Thereplacement user must not be a user currently in the disk group user list.

Chapter 4Managing Oracle ASM File Access Control for Disk Groups

4-65

Page 149: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

If the command succeeds, all files that were previously owned by current user arenow owned by the replacement user. The current user is automatically removedfrom the user list of the disk group. Adding the current user back to the disk groupis possible, but this user does not own any files.

When changing the owner of an open file, the new owner cannot be dropped withthe owner's files until all instances within a cluster are restarted.

Only an Oracle ASM administrator can run this command.

SQL> ALTER DISKGROUP data REPLACE USER 'oracle1' WITH 'oracle2';

• ALTER DISKGROUP SET PERMISSION

Modifies permissions of an Oracle ASM file. Setting read only permission to a filethat has read write permission revokes the write permission. Only the file owneror the Oracle ASM administrator can change the permissions of a file.

SQL> ALTER DISKGROUP data SET PERMISSION OWNER=read write, GROUP=read only, OTHER=none FOR FILE '+data/controlfile.f';

• ALTER DISKGROUP SET OWNERSHIP

Changes the owner or group of a file to the specified user or user group name,respectively. If the specified user or user group name does not exist, thiscommand fails with an error. Only the owner of the file or the Oracle ASMadministrator can run this command, and only the Oracle ASM administrator canchange the owner. Also, the user group name must exist, and the owner of the filemust be a member of that group.

SQL> ALTER DISKGROUP data SET OWNERSHIP OWNER='oracle1', GROUP='test_grp1' FOR FILE '+data/controlfile.f';

See Also:

The ALTER DISKGROUP SQL statement in the Oracle Database SQLLanguage Reference

Maintaining Disk GroupsThis section discusses maintenance operations performed on disk groups.

This section contains the following topics:

• Mounting and Dismounting Disk Groups

• Mounting Disk Groups Using the FORCE Option

• Checking the Internal Consistency of Disk Group Metadata

• Dropping Disk Groups

• Renaming Disks Groups

Mounting and Dismounting Disk GroupsDisk groups that are specified in the ASM_DISKGROUPS initialization parameter aremounted automatically at Oracle ASM instance startup. This process makes the disk

Chapter 4Maintaining Disk Groups

4-66

Page 150: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

groups available to all database instances running on the same node as Oracle ASM. Thedisk groups are dismounted at Oracle ASM instance shutdown. Oracle ASM alsoautomatically mounts a disk group when you initially create it, and dismounts a disk group ifyou drop it.

When a disk group is mounted, a disk group number is chosen. This number may changeacross disk group mounts. A disk group number is not recorded in any persistent structure,but the current value can be viewed in the GROUP_NUMBER column of the V$ASM views.

When you want to mount or dismount disk groups manually, use the ALTERDISKGROUP...MOUNT or ALTER DISKGROUP...DISMOUNT statement. You can mount or dismountdisk groups by name, or specify ALL. You can also specify the optional FORCE option. Forinformation about using the FORCE option, refer to Mounting Disk Groups Using the FORCEOption.

If you try to dismount a disk group that contains open files, the statement fails, unless youalso specify the FORCE clause.

In a clustered Oracle ASM environment in RESTRICTED mode, a disk group is mounted insingle-instance exclusive mode. No other Oracle ASM instance in that cluster can mount thatdisk group. In this mode the disk group is not usable by any Oracle ASM client. Use thismode to perform a fast rebalance.

The following SQL statement dismounts all disk groups that are currently mounted to theOracle ASM instance:

ALTER DISKGROUP ALL DISMOUNT;

The following SQL statement mounts disk group data1:

ALTER DISKGROUP data1 MOUNT;

Mounting Disk Groups Using the FORCE OptionOracle ASM provides a MOUNT FORCE option with ALTER DISKGROUP to enable Oracle ASM diskgroups to be mounted in normal or high redundancy modes even though some Oracle ASMdisks may be unavailable to the disk group at mount time.

The default behavior without the FORCE option is to fail to mount a disk group that hasdamaged or missing disks.

The MOUNT FORCE option is useful in situations where a disk is temporarily unavailable and youwant to mount the disk group with reduced redundancy while you correct the situation thatcaused the outage.

To successfully mount with the MOUNT FORCE option, Oracle ASM must be able to find at leastone copy of the extents for all of the files in the disk group. In this case, Oracle ASM cansuccessfully mount the disk group, but with potentially reduced redundancy.

The disks that Oracle ASM cannot access are placed in an offline mode. Oracle ASM thenbegins timing the period that these disks are in an offline mode. If the disk offline time periodexceeds the timer threshold set by DISK_REPAIR_TIME disk group attribute, then those disksare permanently dropped from the disk group. You can change the offline timer after a disk isput in an offline state by using the ALTER DISKGROUP OFFLINE statement.

Chapter 4Maintaining Disk Groups

4-67

Page 151: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

An Oracle ASM instance mounts an incomplete disk group differentlydepending on the specified compatibility.

In clustered Oracle ASM environments, if an Oracle ASM instance is not the firstinstance to mount the disk group, then using the MOUNT FORCE statement fails. This isbecause the disks have been accessed by another instance and the disks are notlocally accessible.

If all disks are available, then using the FORCE option causes the MOUNT command tofail. This discourages unnecessary and improper use of the feature.

The following example shows how to use the FORCE option to force the mount of thedata1 disk group:

SQL> ALTER DISKGROUP data1 MOUNT FORCE;

See Also:

• Oracle ASM Fast Mirror Resync for more information about setting theDISK_REPAIR_TIME disk group attribute

• Features Enabled By Disk Group Compatibility Attribute Settings forinformation features enabled by disk group compatibility attributes

• Oracle Database SQL Language Reference for additional informationabout the ALTER DISKGROUP statement and the FORCE option

Checking the Internal Consistency of Disk Group MetadataYou can check the internal consistency of disk group metadata using the ALTERDISKGROUP statement with the CHECK keyword. You can use this statement to checkspecific files in a disk group, specific disks or all disks in a disk group, or specificfailure groups within a disk group. The disk group must be mounted to perform thesechecks.

By default, the CHECK DISK GROUP clause verifies all of the metadata directories. OracleASM displays summary errors and writes the details about the errors in an alert log.The CHECK keyword performs the following operations:

• Verifies the consistency of the disk

• Cross checks all of the file extent maps and allocation tables for consistency

• Checks that the alias metadata directory and file directory are linked correctly

• Verifies that the alias directory tree is linked correctly

• Checks that Oracle ASM metadata directories do not have unreachable allocatedblocks

The REPAIR | NOREPAIR clause specifies whether Oracle ASM should attempt to repairerrors that are found during the check. The default is NOREPAIR. Use the NOREPAIR

Chapter 4Maintaining Disk Groups

4-68

Page 152: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

clause to receive alerts about inconsistencies and to suppress Oracle ASM from resolving theerrors automatically. The following example statement checks for consistency in the metadatafor all disks in the data1 disk group:

ALTER DISKGROUP data1 CHECK ALL;

See Also:

The Oracle Database SQL Language Reference for additional information about theCHECK clause syntax

Dropping Disk GroupsThe DROP DISKGROUP statement enables you to delete an Oracle ASM disk group andoptionally, all of its files.

You can specify the INCLUDING CONTENTS clause if you also want to delete all files that arecontained in the disk group. The default is EXCLUDING CONTENTS, which provides syntacticconsistency and prevents you from dropping the disk group if it has any contents

The Oracle ASM instance must be started and the disk group must be mounted with none ofthe disk group files open, in order for the DROP DISKGROUP statement to succeed. Thestatement does not return until the disk group has been dropped.

When you drop a disk group, Oracle ASM dismounts the disk group and removes the diskgroup name from the ASM_DISKGROUPS initialization parameter if a server parameter file isbeing used. If a text initialization parameter file is being used, and the disk group ismentioned in the ASM_DISKGROUPS initialization parameter, then you must remove the diskgroup name from the ASM_DISKGROUPS initialization parameter before the next time that youshut down and restart the Oracle ASM instance.

The following statement deletes data1:

DROP DISKGROUP data1;

After ensuring that none of the files contained in data1 are open, Oracle ASM rewrites theheader of each disk in the disk group to remove Oracle ASM formatting information. Thestatement does not specify INCLUDING CONTENTS, so the drop operation fails if the disk groupcontains any files.

If an Oracle Automatic Storage Management Cluster File System (Oracle ACFS) file systemis mounted on a volume contained in the disk group, then the file system must bedismounted. If the file system has been registered, then it must be deregistered. TheINCLUDING CONTENTS clause must be used to drop this disk group. All data in the file system isdestroyed. To view the volumes and mount paths associated with a disk group, you can querythe V$ASM_VOLUME view.

If you cannot mount a disk group but must drop it, you can use the FORCE option of the DROPDISKGROUP statement. This command enables you to remove the headers on disks thatbelong to a disk group that cannot be mounted by any Oracle ASM instances as shown in thefollowing example:

SQL> DROP DISKGROUP data1 FORCE;

Chapter 4Maintaining Disk Groups

4-69

Page 153: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The disk group on which you perform this operation should not be mounted anywherein the cluster. When you use the FORCE option, the Oracle ASM instance does notattempt to verify that a disk group is being used by another Oracle ASM instance in thesame storage subsystem.

Note:

Use the FORCE option with extreme caution.

You can also drop disks from a disk group with ASMCA.

See Also:

• Oracle Automatic Storage Management Cluster File SystemAdministrator's Guide for information about dismounting an Oracle ACFSfile system

• Managing Disk Groups with ASMCA for information about ASMCA

Renaming Disks GroupsThe renamedg tool enables you to change the name of a cloned disk group. The diskgroup must be dismounted on all nodes in the cluster before running renamedg on thedisk group.

renamedg renames a disk group using a two-step process:

1. Phase one

This phase generates a configuration file to be used in phase two.

2. Phase two

This phase uses the configuration file to perform the renaming of the disk group.

The syntax is:

renamedg {-help | help=true}

renamedg [phase={one|two |both}] dgname=diskgroup newdgname=newdiskgroup [config=configfile] [asm_diskstring=discoverystring, discoverystring ...] [clean={true|false}] [check={true|false}] [confirm={true|false}] [verbose={ true|false}] [keep_voting_files={true|false}]

• phase={one|two|both}

Specifies the phase to be run. Allowed values are one, two, or both. This argumentis optional. The default is both.

Typically you would run both phases. If a problem occurs during the secondphase, then you can rerun phase two using the generated configuration file.

Chapter 4Maintaining Disk Groups

4-70

Page 154: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• dgname=diskgroup

Specifies the name of the disk group to be renamed.

• newdgname=newdiskgroup

Specifies the new name for the disk group.

• config=configfile

Specifies the path to the configuration file to be generated during phase one or specifiesthe path to the configuration file to be used during phase two.

This argument is optional. The default configuration file is named renamedg_config and islocated in the directory in which the command is run. The single quotations may berequired on some platforms.

• asm_diskstring=discoverystring, discoverystring ...

Specifies the Oracle ASM discovery strings. The asm_diskstring value must bespecified if the Oracle ASM disks are not in the default location for the platform. Thesingle quotations may be required on some platforms, usually when wildcard charactersare specified.

• clean={true|false}

Specifies whether to clean errors that are otherwise ignored. The default is true.

• check={true|false}

Specifies a boolean value that is used in the second phase. If true, then the tool printsthe list of changes that are to be made to the disks. No writes are issued. It is an optionalparameter that defaults to false.

• confirm={true|false}

Specifies a boolean value that is used in the second phase. If false, then the tool printsthe changes that are to be made and seeks confirmation before actually making thechanges. It is an optional value that defaults to false. If check is set to true, then thevalue of this parameter is redundant.

• verbose={true|false}

Specifies verbose execution when verbose=true. The default is false.

• keep_voting_files={true|false}

Specifies whether voting files are kept in the renamed disk group. The default is falsewhich deletes the voting files from the renamed disk group.

Note:

renamedg does not update resources, nor does renamedg update any file referenceswithin the database. Because of this behavior, the original disk group resource isnot automatically deleted after the completion of phase two. The status of the olddisk group resource can be checked with the Oracle Clusterware Control (CRSCTL)crsctl stat res -t command and then manually deleted with the Server ControlUtility (SRVCTL) srvctl remove diskgroup command.

Example 4-12 shows several examples of the use of renamedg. The first example renamesthe fra1 disk group to fra2 using a disk string to locate the disks and the verbose option is

Chapter 4Maintaining Disk Groups

4-71

Page 155: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

enabled. The second example only creates a configuration file during the completionof phase one of the renamedg operation. The third example runs phase two of therenamedg operation using a configuration file generated from a phase one execution ofrenamedg.

After renaming a disk group, you can rename the disks in the disk group to match thenew disk group name. For example:

SQL> ALTER DISKGROUP fra2 RENAME DISKS ALL;

For information about renaming disks, refer to Renaming Disks in Disk Groups.

Example 4-12 Using renamedg

$ renamedg dgname=fra1 newdgname=fra2 asm_diskstring='/devices/disk*' verbose=true

$ renamedg phase=one dgname=fra1 newdgname=fra2 asm_diskstring='/devices/disk*' config=/tmp/fra2.conf verbose=true

$ renamedg phase=two dgname=fra1 newdgname=fra2 config=/tmp/fra2.conf verbose=true

Managing Oracle ASM Flex Disk GroupsOracle ASM provides database-oriented storage management with flex and extendeddisk groups.

An Oracle ASM flex disk group is a disk group type that supports Oracle ASM filegroups. An Oracle ASM file group describes a group of files that belong to a database,and enables storage management to be performed at the file group, or database,level. An Oracle ASM extended disk group has all the features of a flex disk group,with a specific design to be highly available in an extended (or stretch) clusterenvironment.

This section discusses the following topics:

• About Oracle ASM Flex Disk Groups

• About Oracle ASM File Groups

• About Oracle ASM File Group Properties

• About Quota Groups for Oracle ASM File Groups

• About Oracle ASM Extended Disk Groups

• About Point-In-Time Database Cloning With Oracle ASM Flex Disk Groups

About Oracle ASM Flex Disk GroupsAn Oracle ASM flex disk group is a disk group type that supports Oracle ASM filegroups and quota groups.

In general, a flex disk group enables users to manage storage at the granularity of thedatabase, in addition to at the disk group level.

The following are characteristics of a flex disk group:

Chapter 4Managing Oracle ASM Flex Disk Groups

4-72

Page 156: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• The redundancy of files in a flex disk group is flexible and enables storage managementat the database level.

• File groups of flex disk groups are used to describe database files.

Each database has its own file group, and storage management can be done at the filegroup level, in addition to the disk group level. For example, you can specify differentredundancy and rebalance settings for different file groups. File groups are associatedwith a quota group, enabling easy quota management.

• The redundancy setting of a flex disk group is set to FLEX REDUNDANCY and each file groupof the flex disk group has its own redundancy property setting.

• A flex disk group generally tolerates two failures, the same as a HIGH redundancy diskgroup.

However, if the disk group has fewer than five failure groups, then it can only tolerate onefailure. This restriction is the result of the quorum requirement of the disk group.

• The failure tolerated by a database is dependent on the redundancy setting of itsassociated file group in the flex disk group.

• A flex disk group requires a minimum of three failure groups.

• If a disk group with FLEX REDUNDANCY has only two regular failure groups and one quorumfailure group, then only two copies of the data are stored, even if HIGH REDUNDANCY isselected for a database file in the flex disk group. This behavior is a consequence ofhaving only two regular failure groups. However, if an additional regular failure group isadded later, then a third copy of the data is created automatically. After the addition of theregular failure group, if one failure group is lost and a rebalance completes successfully,then the disk group can remain mounted after a second failure group goes offline.

• Migrating (converting) to a flex disk group can be performed for a NORMAL or HIGHredundancy disk group with the CONVERT REDUNDANCY TO FLEX clause of the ALTERDISKGROUP SQL statement. You cannot migrate an EXTERNAL redundancy disk group to aFLEX redundancy disk group.

Note:

– When migrating to a flex disk group, a disk group with NORMAL redundancymust have a minimum of three failure groups and a disk group with HIGHredundancy must have a minimum of five failure groups.

– The Virtual Allocation Metadata (VAM) migration disk group attribute mustbe enabled and the migration completed before migrating without the use ofa restrictive mount.

• A flex disk group enables the creation of point-in-time database clones.

A point-in-time database clone is a full copy of a specific database, not the underlyingstorage system. Only data files are copied. Other files are created, or referenced asrequired to create the clone. For information about flex disk groups and point-in-timedatabase clones, refer to About Point-In-Time Database Cloning With Oracle ASM FlexDisk Groups.

• The default size of the allocation unit (AU) is 4 M.

• The Virtually Allocated Metadata (VAM) is enabled and required for a flex disk group.

Chapter 4Managing Oracle ASM Flex Disk Groups

4-73

Page 157: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• Flex disk groups require the COMPATIBLE.ASM and COMPATIBLE.RDBMS disk groupattributes to be set at 12.2 or greater.

• To create an Oracle ADVM volume on a flex disk group, the COMPATIBLE.ADVM diskgroup attribute must be set to 12.2 or greater.

Note:

The REQUIRED_MIRROR_FREE_MB and USABLE_FILE_MB columns in theV$ASM_DISKGROUP view report no values for a flex disk group.

The following examples illustrate how to use SQL statements to:

• Create a flex disk group

• Migrate a normal disk group to a flex disk group

Example 4-13 Using CREATE DISKGROUP to create a flex disk group

SQL> CREATE DISKGROUP flex_data FLEX REDUNDANCY DISK my_disk_discovery_path;

Example 4-14 Using ALTER DISKGROUP to migrate a normal disk group to aflex disk group

SQL> CREATE DISKGROUP normaltoflex NORMAL REDUNDANCY DISK '/devices/diskm*' ATTRIBUTE 'au_size'='4M', 'compatible.asm' = '19.0', 'compatible.rdbms' = '19.0', 'compatible.advm' = '19.0';

Diskgroup created.

SQL> ALTER DISKGROUP normaltoflex CONVERT REDUNDANCY TO FLEX;

Diskgroup altered.

SQL> SELECT name, type FROM V$ASM_DISKGROUP WHERE name = 'NORMALTOFLEX';

NAME TYPE------------------------------ ------NORMALTOFLEX FLEX

About Oracle ASM File GroupsAn Oracle ASM file group is a group of files that share the same set of properties andcharacteristics.

Chapter 4Managing Oracle ASM Flex Disk Groups

4-74

Page 158: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

A multitenant container database is the only supported architecture in OracleDatabase 21c. While the documentation is being revised, legacy terminology maypersist. In most cases, "database" and "non-CDB" refer to a CDB or PDB,depending on context. In some contexts, such as upgrades, "non-CDB" refers to anon-CDB from a previous release.

A major benefit of file groups is the ability to have a different availability specification for eachdatabase that shares the same disk group.

The set of properties for an Oracle ASM file group includes redundancy, rebalance rebuildpriority, rebalance power limit, client compatibility, striping, quota group, and the accesscontrol list.

The following list provides important notes about file groups.

• A disk group contains at least one file group, the default file group.

• A disk group can contain multiple file groups.

• A disk group must have FLEX or EXTENDED redundancy to contain a file group.

• A disk group can store files belonging to multiple databases with each database having aseparate file group.

• A database can have only one file group in a disk group.

• A database can span multiple disk groups with multiple file groups in different diskgroups. The file groups belonging to a database in multiple disk groups should all havethe same name for consistency and easy identification.

• A file group can belong to only one disk group.

• A file group can describe only one database, PDB, CDB, volume, or cluster.

• A file group of an Oracle ADVM volume in a flex disk group always has the name of theassociated volume. There can be only one volume in a file group.

• A file group can belong to only one quota group.

• Automatically created file groups are associated with the generic quota group.

• When a database, PDB, or CDB is created, if an existing file group has a client ID orname that matches the ID or name of the database, PDB, or CDB, then that file group isused to describe its files. Otherwise, a new file group is created for the database, PDB, orCDB.

• A file group that is automatically created as a result of a create database operation isidentified as system-created. This system-created file group is dropped when thedatabase is dropped. However, if you manually create a file group, then that file group isnot automatically dropped when you drop the related database. You must explicitly dropthe manually-created file group.

The following figure illustrates the use of Oracle ASM file groups and quota groups in amultitenant environment. In this illustration, PDB3 could be a clone of PDB2. File groups andquota groups in different disk groups can have the same name.

Chapter 4Managing Oracle ASM Flex Disk Groups

4-75

Page 159: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Figure 4-1 Oracle ASM File Groups

File

3

File

2

File Group PDB1

File

1

File

6

File

5

File Group PDB2

Quota Group QGRP1 Quota Group QGRP2

Oracle ASM Disk Group 1

File

4

PDB

3

PDB

2

PDB

1

File

9

File

8

File Group PDB3

File

7

File

12

File

11

File Group PDB1

File

10

File

15

File

14

File Group PDB2

Quota Group QGRP1 Quota Group QGRP2

Oracle ASM Disk Group 2

File

13

File

18

File

17

File Group PDB3

File

16

In the figure, file groups named PDB1 in disk group 1 and disk group 2 are dedicatedto pluggable database PDB1, file groups named PDB2 in disk group 1 and disk group2 are dedicated to pluggable database PDB2, and file groups named PDB3 in diskgroup 1 and disk group 2 are dedicated to pluggable database PDB3.

File group PDB1 in disk group 1 belongs to quota group QGRP1 in disk group 1. Filegroup PDB1 in disk group 2 belongs to quota group QGRP1 in disk group 2. Filegroups PDB2 and PDB3 in disk group 1 belong to quota group QGRP2 in disk group1. File groups PDB2 and PDB3 in disk group 2 belong to quota group QGRP2 in diskgroup 2.

You can administer file groups with SQL statements. For example, you can use theFILEGROUP clause of the ALTER DISKGROUP SQL statement to administer file groups.

Example 4-15 Adding a File Group to a Database

This example shows how SQL statements are used to add a file group for a pluggabledatabase. The SQL statements also associate the newly added file group to anexisting quota group.

ALTER DISKGROUP DATA ADD FILEGROUP DATAFG1_PDB1 DATABASE ORCL_PDB1 SET 'quota_group' = 'Quota_QGRP1';

Chapter 4Managing Oracle ASM Flex Disk Groups

4-76

Page 160: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 4-16 Modifying a File Group

This example shows how to modify the redundancy property for a specific file type in a filegroup.

ALTER DISKGROUP DATA MODIFY FILEGROUP DATAFG1_PDB1 SET 'datafile.redundancy' = 'HIGH';

ASMCMD provides the following commands to manage and track file and quota groups.

• chfg and chqg to modify a file group or quota group

• lsfg and lsqg to list file groups or quota groups

• mkfg and mkqg to create a file group or quota group

• rmfg and rmqg to delete a file group or quota group

• mvfg to move a file group

You can drop a file group including its associated files (drop including content) using theCASCADE keyword with the ALTER DISKGROUP ... DROP FILEGROUP SQL statement or the —roption with the ASMCMD rmfg command.

To monitor Oracle ASM file groups, you can check the V$ASM_FILEGROUP,V$ASM_FILEGROUP_PROPERTY, and V$ASM_FILEGROUP_FILE views. You can also displayinformation about Oracle ASM file groups with the ASMCMD lsfg command.

See Also:

• About Quota Groups for Oracle ASM File Groups for information about quotagroups.

• ASMCMD File Group Management Commands for information about ASMCMDcommands to administer Oracle ASM File Groups

• Oracle Database Reference for information about the V$ASM* dynamicperformance views

About Oracle ASM File Group PropertiesThe following list summarizes the properties of file groups. You can create a customized a setof file group properties in a file group template that can be inherited by a number ofdatabases. For more information, refer to File Group Property Templates.

• COMPATIBLE.CLIENT

The current value of this file group property is the last known client compatibility during afile open operation.

The COMPATIBLE.RDBMS disk group attribute must be set less than or equal to:

– COMPATIBLE.CLIENT of each file group (when set)

– COMPATIBLE database initialization parameter (for each database that is connected toOracle ASM)

– COMPATIBLE.ASM of the disk group

Chapter 4Managing Oracle ASM Flex Disk Groups

4-77

Page 161: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

You must be an Oracle ASM administrator to modify this property.

• DBCLONE_STATUS

This file group property specifies the status of the database split operation. Thisproperty cannot be set manually.

During the split operation of the database associated with this file group, the filegroup property contains one of the following values.

– PREPARING

The process to prepare the database for splitting has started, but the databaseis not yet ready to be split.

– PREPARED

The preparation process is complete and the database is ready to be split.

– SPLITTING

The process to split the database files has started.

– SPLIT COMPLETED

The database has been split.

– DROPPING

The process to drop the prepared database clone has started.

– FAILED

The clone operation has failed. The rebalance operation should drop theincomplete clone.

• OWNER

This file group property specifies the OWNER setting. To set the OWNER property, theACCESS_CONTROL.ENABLED disk group attribute must be set to TRUE to enableOracle ASM File Access Control. The user specified as the owner must be amember of the disk group.

Only the Oracle ASM administrator, the OWNER, the OWNER of the USER_GROUPassociated with the file group, and a member of the USER_GROUP associated withthe file group can modify the attributes of file groups that are labeled with Adatabase administrator can modify this property. This is true only ifACCESS_CONTROL.ENABLED is true.

You can display the owner with the USER_NUMBER and USER_INCARNATION columnsof the V$ASM_FILEGROUP view. The values in USER_NUMBER and USER_INCARNATIONcan be joined with the USER_NUMBER and INCARNATION columns of the V$ASM_USERview to display the user names.

The default value is NULL.

You must be an Oracle ASM administrator to modify this property.

• PARENT_FILEGROUP_NUMBER

This file group property specifies the Parent File Group number. This propertycannot be set manually.

When a database is prepared for split, a child file group is created for the shadowfiles. The child file group automatically has the PARENT_FILEGROUP_NUMBER propertyset.

Chapter 4Managing Oracle ASM Flex Disk Groups

4-78

Page 162: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• POWER_LIMIT

This file group property specifies the rebalance power, which determines the number ofparallel relocations for disk rebalancing of this file group. The valid settings are 1 to 1024.When rebalancing a file group, the power limit value is applied as follows:

1. If the power option has been explicitly specified in the ALTER DISKGROUP REBALANCESQL statement or the ASMCMD rebal command, then the power value specified inthe SQL rebalance statement or ASMCMD rebalance command is used forrebalancing all file groups.

2. If the power option has not been specified in the SQL rebalance statement orASMCMD rebalance command, then the file group POWER_LIMIT property value, ifset, applies for the file group rebalance.

3. If the power option has not been specified in the SQL rebalance statement orASMCMD rebalance command, and the POWER_LIMIT property has not been set forthe file group, then the power value defaults to the value of the ASM_POWER_LIMITinitialization parameter for the file group rebalance.

You must be a database administrator to modify this property.

• PRIORITY

This file group property specifies the rebalance priority and ensures that certain types offiles are rebalanced before others. File groups with the highest priority are completelyrebalanced first, then file groups with the next highest priority, and so on to the lowestpriority.

You can set the rebalance priority setting to HIGHEST, HIGH, MEDIUM, LOW, or LOWEST. Thedefault value is MEDIUM.

You must be a database administrator to modify this property.

• QUOTA_GROUP

This file group property specifies the name of the quota group to which this file groupbelongs. The valid setting is an existing quota group name. The default value is GENERIC.Every file group in the disk group must be a member of a quota group.

You must be an Oracle ASM administrator to modify this property.

• REDUNDANCY

This file type property specifies the redundancy for the file group. The default redundancysetting for each file type is derived from the system templates. The valid settings are:

– HIGH

HIGH redundancy provides three-way mirroring for all files.

– MIRROR

MIRROR redundancy provides two-way mirroring for all files.

– PARITY

To reduce the overhead of data protection associated with Oracle ASM, parityprotection is provided for FLEX redundancy disk groups. Parity redundancy isrestricted to data not requiring ongoing updating to reduce the execution impact withparity protection. The PARITY setting is intended for write-once files, such as archivelogs and backup sets and is not supported on data files and read/write files.

– DOUBLE

Chapter 4Managing Oracle ASM Flex Disk Groups

4-79

Page 163: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

DOUBLE specifies double parity and tolerates double failures for FLEXredundancy disk groups.

– UNPROTECTED

UNPROTECTED does not provide mirroring by Oracle ASM.

If a file is created as UNPROTECTED, MIRROR, or HIGH redundancy, its redundancycan change to UNPROTECTED, MIRROR, or HIGH. If redundancy has been changed,then the REMIRROR column of V$ASM_FILE contains Y to indicate that the file needsnew mirroring, initiating a rebalance to put the new redundancy into effect. Afterthe rebalance completes, the value in the REMIRROR column contains N .

PARITY and DOUBLE redundancy are supported only on FLEX redundancy diskgroups (not EXTENDED disk groups).

When a file is created with PARITY or DOUBLE redundancy, that file can neverchange redundancy.

PARITY requires a minimum of three regular (not quorum) failure groups in the flexdisk group. DOUBLE requires a minimum of five regular (not quorum) failure groupsin the flex disk group.

– If there are three or more failure groups when the parity file is created, theneach parity extent set has 2+1 single parity. This scenario incurs 50%redundancy overhead rather than 100% redundancy overhead for NORMALredundancy (two-way mirror files).

– If there are five or more failure groups when the parity file is created, theneach parity extent set has 2+2 double parity. Double parity requires at least 5failure groups. This scenario incurs 100% redundancy overhead rather than200% redundancy overhead for HIGH redundancy (three-way mirror files).

When the file group redundancy property is modified from a HIGH, MIRROR, orUNPROTECTED setting to a PARITY or DOUBLE setting, the redundancy of the existingfiles in the file group does not change. This behavior also applies to a change fromPARITY or DOUBLE to a HIGH, MIRROR, or UNPROTECTED setting. However, any filescreated in the future adopt the new redundancy setting.

Changing the file group redundancy may not modify the redundancy of files thatare being created concurrently when the ALTER DISKGROUP MODIFY FILEGROUP SQLcommand is issued. To complete the redundancy change, issue the ALTERDISKGROUP MODIFY FILEGROUP SQL command again after those files have beencreated.

If the redundancy in the file group is increased, then the value of the REDUNDANCYcolumn of V$ASM_FILE is increased after rebalance completes. However, if theredundancy in the file group is decreased, then the value of the REDUNDANCYcolumn of V$ASM_FILE is lowered immediately before rebalance is run.

Changing the redundancy without specifying a file type affects all file types.

You must be a database administrator to modify this property.

• STRIPING

This file type property specifies the STRIPING setting for each file type. Usually thedefault value for each file type is sufficient and is not changed.

Most files have a COARSE stripe, except for the control file which has a FINE stripeby default. The valid settings are COARSE and FINE. The default value is COARSE orderived from the file type template.

Chapter 4Managing Oracle ASM Flex Disk Groups

4-80

Page 164: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

STRIPING affects only newly-created files and cannot be changed after the file is created.

You must be a database administrator to set this property.

• USER_GROUP

This file group property specifies the USER_GROUP setting. To set the USER_GROUP property,the ACCESS_CONTROL.ENABLED disk group attribute must be set to TRUE to enable OracleASM File Access Control. The user group specified must be an existing user group.

Only the Oracle ASM administrator, the OWNER, the OWNER of the USER_GROUP associatedwith the file group, and a member of the USER_GROUP associated with the file group canmodify the attributes of file groups that are labeled with A database administrator canmodify this property. This is true only if ACCESS_CONTROL.ENABLED is true.

You can display the user group information with the USERGROUP_NUMBER andUSERGROUP_INCARNATION columns of the V$ASM_FILEGROUP view. The values inUSERGROUP_NUMBER and USERGROUP_INCARNATION can be joined with theUSERGROUP_NUMBER and INCARNATION columns of the V$ASM_USERGROUP view to display theuser group names.

Files created in a file group inherit the USER_GROUP property setting.

Clones inherit the USER_GROUP property setting.

The default value is NULL.

You must be an Oracle ASM administrator to modify this property.

Example 4-17 Setting a file group property for file types

The following SQL statements set the REDUNDANCY file group property for the datafile andarchivelog file types.

ALTER DISKGROUP DATA MODIFY FILEGROUP DATAFG1_PDB1 SET 'datafile.redundancy' = 'HIGH';

ALTER DISKGROUP DATA MODIFY FILEGROUP DATAFG1_PDB1 SET 'archivelog.redundancy' = 'MIRROR';

Example 4-18 Setting the file group redundancy property for an ADVM volume

The following SQL statement sets the REDUNDANCY file group property for the Oracle ADVMvolume. To enable Oracle ADVM volumes to change redundancy, both COMPATIBLE.ASM andCOMPATIBLE.ADVM must be set to 18.1 or greater. For Oracle ADVM volumes, you cannotchange the redundancy setting of individual file types.

SQL> ALTER DISKGROUP DATA MODIFY FILEGROUP volume1 SET 'redundancy'='high';

File Group Property Templates

You can create a file group template with the ADD FILEGROUP clause of ALTER DISKGROUP tocustomize a set of file group properties that can be inherited by multiple databases.

SQL> ALTER DISKGROUP data2 ADD FILEGROUP fg_template1 TEMPLATE SET 'datafile.redundancy'='unprotected';

You can customize a file group template similar to modifying a regular file group.

SQL> ALTER DISKGROUP data2 MODIFY FILEGROUP fg_template1 SET 'controlfile.redundancy'='high';

Chapter 4Managing Oracle ASM Flex Disk Groups

4-81

Page 165: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Multiple file groups can be created from a file group template to inherit the propertiesin the template. Using a file group template automatically creates a new file group forthe database if one is not already created, and the new file group inherits theproperties of the file group template.

SQL> ALTER DISKGROUP data2 ADD FILEGROUP fg_db DATABASE NONE FROM TEMPLATE fg_template2;

Note:

You can specify the name of an Oracle ASM file group as part of a file name.For example:

+diskgroup_name(fg$file_group_name)/file_name

Similar syntax is used for indicating the name of a file group rather than atemplate.

Multiple tablespaces or databases can be created to inherit customized propertiesfrom a file group template. In the example, the fg$ prefix in fg$fg_template2 is a fixedstring that indicates the name of a file group rather than the name of a template.

SQL> CREATE TABLESPACE tbs1 datafile '+data2(fg$fg_template2)/dbs/tbs1.f' size 1M;

See Also:

• What Types of Files Does Oracle ASM Support? for a list of Oracle ASMfile types

• Managing Oracle ASM File Access Control for Disk Groups forinformation about Oracle ASM File Access Control

• Oracle Database Reference for information about file group propertiesdisplayed in the V$ASM_FILEGROUP_PROPERTY and V$ASM_FILEGROUP dynamic performance views

About Quota Groups for Oracle ASM File GroupsA quota group defines the quota allocated to a group of Oracle ASM File Groups. A filegroup belongs to only one quota group. For information about file groups, refer to About Oracle ASM File Groups.

A quota can describe an aggregate of space used by different databases.

The following list provides important notes about quota groups for file groups.

• A file group can belong to only one quota group.

• A quota group cannot span multiple disk groups.

Chapter 4Managing Oracle ASM Flex Disk Groups

4-82

Page 166: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• A quota group describes an aggregate of space used by one file group or multiple filegroups in the same disk group.

A file group for a PDB and a file group for a clone of that PDB could be a scenario wherefile groups would share a common quota group.

A file group clone by default inherits the parent’s quota group. However, the clone couldbelong to a different quota group.

• A quota is enforced when a file is created and resized.

• A quota is a physical space.

As a consequence, if the quota limit has been set to 10 M, then a two-way mirrored 6 Mfile exceeds the quota.

• Each quota group has two values: the limit and the current used space.

The limit value can be set below the current used space. This action prevents anyadditional space being allocated for files described by file groups associated with thisquota group.

• A file group can be moved from one quota group to another, regardless whether or notthe target quota group has enough space for the file group.

This capability enables an Oracle ASM administrator to stop any files described by aspecific file group from allocating additional space.

You can administer quota groups with SQL and ASMCMD commands. The followingexamples illustrate how SQL statements are used to add a quota group to a disk group andhow to move a file group from its current quota group to a new quota group.

Example 4-19 Adding a Quota Group to a Disk Group

ALTER DISKGROUP DATA ADD QUOTAGROUP Quota_QGRP1 SET 'quota'= 10m;

Example 4-20 Moving a File Group to a new Quota Group

ALTER DISKGROUP DATA MODIFY FILEGROUP DATAFG1_PDB1 SET 'quota_group' = 'Quota_QGRP2';

About Oracle ASM Extended Disk GroupsAn Oracle ASM extended disk group has all the features of a flex disk group, with a specificdesign to be highly available in an extended (stretch) cluster environment, which containsnodes that span multiple physically separated sites.

The following are characteristics of an extended disk group:

• The redundancy setting of an extended disk group is set to EXTENDED REDUNDANCY andeach file group of the extended disk group has its own redundancy property setting.

• The redundancy of files and file groups in an extended disk group is specified for eachsite, rather than for each disk group.

This means that the number of copies determined by the REDUNDANCY setting is multipliedby the number of data sites. If the REDUNDANCY is set to MIRROR, then that specifies twocopies, resulting in four copies total for two data sites.

Chapter 4Managing Oracle ASM Flex Disk Groups

4-83

Page 167: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• An extended disk group can tolerate the loss of an entire site, plus the loss of up totwo failure groups in another site.

This means that an extended disk group can tolerate failures at the site level inaddition to the failure group level.

• All data sites must have the same number of failure groups during disk groupcreation.

• A quota group is specified for each disk group, rather than for each site.

• The quota group limit is the physical space required for all copies across all sites.

For example, with two data sites, a 6 M file with redundancy set to MIRROR uses 24M of the quota limit.

• There must be a total of three sites, two data sites and one quorum site, to createan extended disk group. Each data site should have three failure groups, and thequorum site should have one failure group.

• For database files, the redundancy setting is dictated by the redundancy setting ofthe file groups of the extended disk group.

• The COMPATIBLE.ASM and COMPATIBLE.RDBMS disk group attributes must be set to12.2 or greater.

• The minimum allocation unit (AU) size is 4 M.

• Converting from another disk group type to an extended disk group is notsupported.

• The SITE specification for failure groups can be inferred from cells if OracleExadata has been configured. Otherwise, the site specification can be specifiedwith the SQL statement when creating a disk group.

Note:

The REQUIRED_MIRROR_FREE_MB and USABLE_FILE_MB columns in theV$ASM_DISKGROUP view report no values for an extended disk group.

The following example illustrates how to create an extended disk group with a SQLstatement.

Example 4-21 Using CREATE DISKGROUP with extended disk groups

SQL> CREATE DISKGROUP extended_site_data EXTENDED REDUNDANCY SITE NY FAILGROUP fg1 DISK '/devices/disks/disk01' FAILGROUP fg2 DISK '/devices/disks/disk02' FAILGROUP fg3 DISK '/devices/disks/disk03' SITE NJ FAILGROUP fg4 DISK '/devices/disks/disk04' FAILGROUP fg5 DISK '/devices/disks/disk05' FAILGROUP fg6 DISK '/devices/disks/disk06' SITE QM QUORUM FAILGROUP fg7 DISK '/devices/disks/disk07';

Chapter 4Managing Oracle ASM Flex Disk Groups

4-84

Page 168: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

About Point-In-Time Database Cloning With Oracle ASM Flex Disk GroupsBefore creating a point-in-time database clone, review the following requirements.

Note:

• Point-in-time database clones are supported only in Oracle ASM flex andextended disk groups.

• Point-in-time database clones are supported only with Oracle Database 18c,version 18.1 or higher.

• Point-in-time database clones require disk group compatibility attributesCOMPATIBLE.ASM and COMPATIBLE.RDBMS be set to 18.0 or higher.

• The source database (parent) must be a pluggable database. The databaseclone (child) created is a pluggable database under the same containerdatabase or in a different container database.

Oracle ASM provides support for creating a point-in-time database clone which is a mirrorcopy of a pluggable database. All the data files of the database being cloned should bepresent in a single disk group. The cloning operation can be used for rapid configuration ofidentical copies. You can specify the redundancy setting of the database data files in thedatabase clone, or the setting can default to the redundancy of the data files in the sourcedatabase that is being the cloned.

The copy of data files created during the cloning process is initially identical to the source.However, after the cloning process has completed, updates to the source do not result in anychange to the child that has been cloned. The V$ASM_DBCLONE_INFO view shows therelationship between the source database, the cloned database, and their file groups. TheV$ASM_DBCLONE_INFO should be run on the Oracle ASM instance.

In the examples shown in this topic, the source database is present on the DATA flex diskgroup.

Database cloning has these steps:

1. Preparing the Mirrored Copy

During this step, Oracle ASM allocates space for the additional copies of data. Thisprocess involves creating the cloned files and linking them with the source files. However,the data is not copied at this time; the copying is done during remirroring. Remirroringoccurs during the prepare phase of rebalance, which is initiated as part of this step. Onlyone mirror copy can be in existence at any time. All the data files of the given database orthe pluggable database should reside on a single disk group. The mirror copy must beused to create a database clone before another mirror copy can be created.

A file group is created and all the cloned files are made part of this file group. Theredundancy of the database data files in the file group is set to the value that you specify,or the value defaults to the redundancy setting of the source file group. The quota groupassociated with the clone is the same as that of the source database.

Oracle ASM File Access Control properties associated with the clone are the same asthose associated with the source database. For example, the file access control usergroup property for the database clone is same as that of the source database.

Chapter 4Managing Oracle ASM Flex Disk Groups

4-85

Page 169: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

At the end of this step and before you start the next step, you can drop theprepared mirror copy, as described in Dropping the Prepared Mirror Copy.

2. Splitting the Mirrored Copy and Creating the Database Clone

The prepare and copy step must complete before starting this step. You candisplay the V$ASM_DBCLONE_INFO view on the Oracle ASM instance to query thestatus of the ongoing prepare operation. The DBCLONE_STATUS column of theV$ASM_DBCLONE_INFO view indicates PREPARED when the file group is ready to besplit.

The process initiated with CREATE PLUGGABLE DATABASE breaks the relationshipbetween the source database files and the cloned database files.

Preparing the Mirrored Copy to Create a PDB in the Same Container Database

The following example prepares the mirrored copy and creates a file group on the DATAdisk group. Before you issue the ALTER PLUGGABLE DATABASE PREPARE SQL command,you must connect to the source pluggable database (pdb1 in the examples) that isbeing prepared for cloning.

SQL> SHOW CON_NAMECON_NAME------------------------------CDB$ROOT

SQL> ALTER SESSION SET CONTAINER = pdb1;Session altered.

SQL> SHOW CON_NAMECON_NAME------------------------------PDB1

SQL> ALTER PLUGGABLE DATABASE PREPARE MIRROR COPY pdb1_mirror;Pluggable database altered.

You can query the V$ASM_DBCLONE_INFO view on the Oracle ASM instance to check thestatus of the process.

SQL> SELECT * FROM V$ASM_DBCLONE_INFO;GROUP_NUMBER DBCLONE_NAME MIRRORCOPY_NAME DBCLONE_STATUS PARENT_DBNAME PARENT_FILEGROUP_NAME CON_ID------------ ------------ --------------- -------------- ------------- --------------------- ------ 1 DB_UNKNOWN PDB1_MIRROR PREPARED ORCL_PDB1 ORCL_PDB1 0

Preparing the Mirrored Copy to Create a PDB in a Different Container Database

The following example prepares the mirrored copy and creates a file group on the DATAdisk group, to be used by a different container database. Before you issue the ALTERPLUGGABLE DATABASE PREPARE SQL command, you must connect to the sourcepluggable database (pdb1 in the examples) that is being prepared for cloning.

SQL> SHOW CON_NAMECON_NAME------------------------------CDB$ROOT

SQL> ALTER SESSION SET CONTAINER = pdb1;

Chapter 4Managing Oracle ASM Flex Disk Groups

4-86

Page 170: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Session altered.

SQL> SHOW CON_NAMECON_NAME------------------------------PDB1

SQL> ALTER PLUGGABLE DATABASE PREPARE MIRROR COPY pdb2_mirror FOR DATABASE new_cdb;Pluggable database altered.

You can query the V$ASM_DBCLONE_INFO view on the Oracle ASM instance to check the statusof the process.

SQL> SELECT * FROM V$ASM_DBCLONE_INFO;GROUP_NUMBER DBCLONE_NAME MIRRORCOPY_NAME DBCLONE_STATUS PARENT_DBNAME PARENT_FILEGROUP_NAME CON_ID------------ -------------- --------------- -------------- ------------- --------------------- ------ 1 FOR$DB$NEW_CDB PDB1_MIRROR PREPARED ORCL_PDB1 ORCL_PDB1 0

Splitting the Mirrored Copy and Creating the Database Clone in the Same ContainerDatabase

The following example creates the newpdb1 database clone using the mirror copypdb1_mirror. newpdb1 is a clone of pdb1 pluggable database and is plugged into the CDB.The CREATE PLUGGABLE DATABASE SQL command must be run in the root container of theCDB.

SQL> SHOW CON_NAMECON_NAME------------------------------CDB$ROOT

SQL> CREATE PLUGGABLE DATABASE newpdb1 FROM pdb1 USING MIRROR COPY pdb1_mirror;Pluggable database created.

SQL> ALTER SESSION SET CONTAINER = newpdb1;Session altered.

SQL> SHOW CON_NAMECON_NAME------------------------------NEWPDB1

You can query the V$ASM_DBCLONE_INFO, V$ASM_FILEGROUP, and V$ASM_FILEGROUP_PROPERTYviews on the Oracle ASM instance for additional information.

SQL> SELECT * FROM V$ASM_DBCLONE_INFO;GROUP_NUMBER DBCLONE_NAME MIRRORCOPY_NAME DBCLONE_STATUS PARENT_DBNAME PARENT_FILEGROUP_NAME CON_ID------------ ------------- --------------- --------------- ------------- --------------------- ------ 1 ORCL_NEWPDB1 PDB1_MIRROR SPLIT COMPLETED ORCL_PDB1 ORCL_PDB1 0

SQL> SELECT NAME, GROUP_NUMBER, FILEGROUP_NUMBER FROM V$ASM_FILEGROUP;NAME GROUP_NUMBER FILEGROUP_NUMBER------------------------------------ ------------ ----------------DEFAULT_FILEGROUP 1 0ORCL_CDB$ROOT 1 1ORCL_PDB$SEED 1 2ORCL_PDB1 1 3PDB1_MIRROR 1 4

SQL> SELECT NAME, VALUE FROM V$ASM_FILEGROUP_PROPERTY WHERE FILEGROUP_NUMBER = 4;

Chapter 4Managing Oracle ASM Flex Disk Groups

4-87

Page 171: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

NAME VALUE------------------------------------ ------------------------------------PRIORITY MEDIUMPARENT_FILEGROUP_NUMBER 3DBCLONE_STATUS SPLIT COMPLETEDCOMPATIBLE.CLIENT 18.0.0.0.0REDUNDANCY MIRRORSTRIPING FINE...

Splitting the Mirrored Copy and Creating the Database Clone in a DifferentContainer Database

The following example creates the newpdb2 database clone using the mirror copypdb2_mirror. newpdb2 is a clone of pdb1 pluggable database and is plugged into adifferent CDB new_cdb. The CREATE PLUGGABLE DATABASE SQL command must be runin the root container of new_cdb.

Before running the CREATE PLUGGABLE DATABASE command, you must create adatabase link that can connect to the source CDB, from where the prepare commandwas issued. The CREATE PLUGGABLE DATABASE SQL command must be run in CDB$ROOT.The database user that is used by the database link to connect to the source databasemust have the CREATE PLUGGABLE DATABASE system privilege, either granted commonlyor granted locally in that application container, to run the command.

The following commands must be run in the source CDB.

SQL> SELECT NAME FROM V$DATABASE;NAME---------SRC_CDB

SQL> SHOW CON_NAMECON_NAME------------------------------CDB$ROOT

SQL> CREATE USER c##dbl_user IDENTIFIED BY password;User created.

SQL> GRANT CREATE SESSION, CREATE PLUGGABLE DATABASE TO c##dbl_user CONTAINER=all ;Grant succeeded.

The following commands must be run in the target CDB.

SQL> SELECT NAME FROM V$DATABASE;NAME---------NEW_CDB

SQL> SHOW CON_NAMECON_NAME------------------------------CDB$ROOT

SQL> CREATE DATABASE LINK cdb1_dblink CONNECT TO c##dbl_user IDENTIFIED BY password USING tns_alias_to_src_cdb;Database link created.

SQL> CREATE PLUGGABLE DATABASE newpdb2 FROM pdb1@cdb1_dblink USING MIRROR COPY

Chapter 4Managing Oracle ASM Flex Disk Groups

4-88

Page 172: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

pdb2_mirror;Pluggable database created.

SQL> ALTER SESSION SET CONTAINER = newpdb2;Session altered.

SQL> SHOW CON_NAMECON_NAME------------------------------NEWPDB2

You can query the V$ASM_DBCLONE_INFO, V$ASM_FILEGROUP, and V$ASM_FILEGROUP_PROPERTYviews on the Oracle ASM instance for additional information.

SQL> SELECT * FROM V$ASM_DBCLONE_INFO;GROUP_NUMBER DBCLONE_NAME MIRRORCOPY_NAME DBCLONE_STATUS PARENT_DBNAME PARENT_FILEGROUP_NAME CON_ID------------ ------------- --------------- --------------- ------------- --------------------- ------ 1 ORCL_NEWPDB2 PDB2_MIRROR SPLIT COMPLETED ORCL_PDB1 ORCL_PDB1 0

SQL> SELECT NAME, GROUP_NUMBER, FILEGROUP_NUMBER FROM V$ASM_FILEGROUP;NAME GROUP_NUMBER FILEGROUP_NUMBER------------------------------------ ------------ ----------------DEFAULT_FILEGROUP 1 0ORCL_CDB$ROOT 1 1ORCL_PDB$SEED 1 2ORCL_PDB1 1 3PDB2_MIRROR 1 4

SQL> SELECT NAME, VALUE FROM V$ASM_FILEGROUP_PROPERTY WHERE FILEGROUP_NUMBER = 4;NAME VALUE------------------------------------ ------------------------------------PRIORITY MEDIUMPARENT_FILEGROUP_NUMBER 3DBCLONE_STATUS SPLIT COMPLETEDCOMPATIBLE.CLIENT 18.0.0.0.0REDUNDANCY MIRRORSTRIPING FINE...

Dropping the Prepared Mirror Copy

After preparing the mirrored copy, and before splitting the mirrored copy and creating thedatabase clone, you can drop the prepared mirror copy.

The drop action discards all the changes performed by the ALTER PLUGGABLE DATABASEPREPARE SQL command. Similar to the PREPARE SQL operation, the drop action also triggers arebalance on the appropriate disk group. You can use the V$ASM_DBCLONE_INFO view to querythe status of the ongoing drop operation. The DBCLONE_STATUS column of theV$ASM_DBCLONE_INFO view indicates DROPPING when the file group is being dropped and theentry is removed after all changes are discarded.

The following example illustrates how to drop the prepared mirror copy when you areconnected to the source pluggable database (pdb1 in the example).

SQL> ALTER SESSION SET CONTAINER = pdb1;Session altered.

SQL> ALTER PLUGGABLE DATABASE DROP MIRROR COPY pdb1_mirror;Pluggable database altered.

Chapter 4Managing Oracle ASM Flex Disk Groups

4-89

Page 173: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Cleaning Up After Failed Attempts

The DBCLONE_STATUS column of the V$ASM_DBCLONE_INFO view indicates FAILED whenthe point-in-time clone process is unsuccessful. If you experience a failed attempt tocreate a point-in-time clone, then you can resolve the problem by issuing a rebalanceon the disk group to clean up the file group. For example, after connecting to theOracle ASM instance, you can run the following:

SQL> ALTER DISKGROUP data REBALANCE WAIT;

See Also:

• Oracle Multitenant Administrator's Guide for information aboutmultitenant databases

• Oracle Database SQL Language Reference for information about theCREATE PLUGGABLE DATABASE SQL statement

• Oracle Database SQL Language Reference for information about theCREATE DATABASE LINK SQL statement

• Oracle Database Reference for information about theV$ASM_DBCLONE_INFO view

Chapter 4Managing Oracle ASM Flex Disk Groups

4-90

Page 174: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

5Administering Oracle ASM Files, Directories,and Templates

Administration of Oracle ASM includes the management of files, directories, and templates.

This chapter describes how to administer files when you use the Oracle Automatic StorageManagement (Oracle ASM) storage option.

This chapter contains the following topics:

• What Types of Files Does Oracle ASM Support?

• About Oracle ASM File Names

• Creating and Referencing Oracle ASM Files in the Database

• Managing Alias Names for Oracle ASM File Names

• Managing Disk Group Directories

• Accessing Oracle ASM Files with the XML DB Virtual Folder

• Using DBMS_FILE Transfer Utility for Oracle ASM

• Managing Disk Group Templates

What Types of Files Does Oracle ASM Support?Oracle ASM supports most file types required by the database.

Table 5-1 lists file types that are supported directly by Oracle ASM and lists the systemdefault template that provides the attributes for file creation. Some file types shown in thetable are related to specific products or features, and are not discussed in this book.

Table 5-1 File types supported by Oracle ASM

File Type Default Templates

Archive log files ARCHIVELOG

Oracle ASM Persistent initialization parameter file (SPFILE) ASMPARAMETERFILE

Oracle ASM Persistent initialization parameter file (SPFILE) backup ASMPARAMETERFILEBACKUP

Audit spill files AUDIT_SPILLFILES

Automatically generated control file backup AUTOBACKUP

Auto-login software keystore AUTOLOGIN_KEY_STORE

Archive log backup piece BACKUPSET

Data file backup pieces BACKUPSET

Data file incremental backup pieces BACKUPSET

Change tracking file CHANGETRACKING

Control files CONTROLFILE

5-1

Page 175: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 5-1 (Cont.) File types supported by Oracle ASM

File Type Default Templates

Data file copy DATAFILE

Data files DATAFILE

Data Guard configuration file DATAGUARDCONFIG

Data Pump dumpset DUMPSET

Flashback logs FLASHBACK

Flash file FLASHFILE

Cross-platform transportable data files incremental backup INCR XTRANSPORT BACKUPSET

Software keystore KEY_STORE

Oracle Cluster Registry file OCRFILE

Redo log files ONLINELOG

Persistent initialization parameter file (SPFILE) PARAMETERFILE

Temporary files TEMPFILE

Voting files VOTINGFILE

Cross-platform transportable data files XTRANSPORT

Cross-platform transportable data files backup XTRANSPORT BACKUPSET

Oracle ASM Dynamic Volume Manager volumes n/a

Oracle ASM cannot directly support some administrative file types on disk groups.These include trace files, audit files, alert logs, export files, tar files, and core files.

Note:

Oracle Automatic Storage Management Cluster File System (Oracle ACFS)and Oracle ASM Dynamic Volume Manager (Oracle ADVM) extend OracleASM support to include database and application executables, databasedata files, database trace files, database alert logs, application reports,BFILEs, and configuration files. Other supported files are video, audio, text,images, engineering drawings, and other general-purpose application filedata.

See Also:

• Managing Disk Group Templates for a description of the system defaulttemplates

• lstmpl for an example of the output of the ASMCMD lstmpl command

• Oracle Automatic Storage Management Cluster File SystemAdministrator's Guide for more information about Oracle ACFS andOracle ADVM, including files supported by Oracle ACFS

Chapter 5What Types of Files Does Oracle ASM Support?

5-2

Page 176: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

About Oracle ASM File NamesEvery file created in Oracle ASM is provided a file name generated by Oracle Managed Files,known as a fully qualified file name (or system-generated file name). The fully qualified filename represents a complete path name in the Oracle ASM file system. An example of a fullyqualified file name is:

+data/orcl/controlfile/Current.256.541956473

You can use the fully qualified file name to reference (read or retrieve) an Oracle ASM file.You can also use other abbreviated file name formats, such as an alias Oracle ASM filename, to reference an Oracle ASM file.

Oracle ASM generates a fully qualified file name upon any request to create a file. A creationrequest does not or cannot specify a fully qualified file name. Instead, it uses a simpler syntaxto specify a file, such as an alias or just a disk group name. Oracle ASM then creates the file,placing it in the correct Oracle ASM path according to file type, and then assigns anappropriate fully qualified file name. If you specify an alias in the creation request, OracleASM also creates the alias so that it references the fully qualified file name.

Oracle ASM file creation requests are either single file creation requests or multiple filecreation request.

Note:

• You can find the generated name in database views displaying Oracle filenames, such as V$DATAFILE and V$LOGFILE. You can use this name, or anabbreviated form of it, if you later must reference an Oracle ASM file in a SQLstatement. As with other Oracle Database file names, Oracle ASM file namesare kept in the control file and the RMAN catalog.

• You can use fully qualified and numeric file names in single-file creation if youspecify the REUSE keyword, as described in Using Oracle ASM File Names inSQL Statements.

• Forward slash (/) and backslash (\) are interchangeable in file names. Filenames are case insensitive, but case retentive.

Table 5-2 specifies the valid usage for each file name form. If the form is used for filecreation, the table specifies whether the created file is an Oracle Managed Files (OMF).

Table 5-2 Valid usage for Oracle ASM file name forms

File Name Form Reference toFile?

Single-fileCreation?

Multiple FileCreation?

Created asOMF?

Fully qualified file name Yes No No No

Alias file name Yes Yes No No

Alias with template file name No Yes No No

Incomplete file name No Yes Yes Yes

Incomplete file name with template No Yes Yes Yes

Chapter 5About Oracle ASM File Names

5-3

Page 177: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

This section contains the following topics:

• Single File Creation Form

• Multiple File Creation Form

• Fully Qualified File Name Form

• Alias Oracle ASM File Name Forms

• Creating a Tablespace in Oracle ASM: Using a Data File with an Alias Name

• Alias Oracle ASM File Name with Template Form

• Incomplete Oracle ASM File Name Form

• Incomplete Oracle ASM File Name with Template Form

Single File Creation FormA single file creation form is used to create a single file, such as a data file or a controlfile. The form of the Oracle ASM file name in this type is either an alias, such as+data/orcl/ctl.f, or an incomplete file name, such as a disk group name precededby a plus sign (+data). You use the alias or disk group name where a file name iscalled for in a SQL statement, such as CREATE TABLESPACE, CREATE CONTROLFILE.

Multiple File Creation FormA multiple file creation form is used multiple times to create Oracle ASM files, such aswhen assigning a value to the initialization parameter DB_CREATE_FILE_DEST. You canalso run a CREATE TABLESPACE statement (without a file name specification) multipletimes. Each time, Oracle ASM creates a different unique data file name.

When using the multiple file creation form, you can use an incomplete file name form,such as a disk group name preceded by a plus sign (+data). In this case, you setDB_CREATE_FILE_DEST to an incomplete file name (for example, +data), and whenevera command is run that must create a database file in DB_CREATE_FILE_DEST, the file iscreated in the designated disk group and assigned a unique fully qualified name. Youcan use an incomplete file name in other *_DEST initialization parameters.

Fully Qualified File Name FormYou can use a fully qualified form for referencing existing Oracle ASM files in OracleASM operations, except for disk group creation. This form is the Oracle ASM file namethat Oracle ASM automatically generates when an Oracle ASM file is created.

Note:

A multitenant container database is the only supported architecture in OracleDatabase 21c. While the documentation is being revised, legacy terminologymay persist. In most cases, "database" and "non-CDB" refer to a CDB orPDB, depending on context. In some contexts, such as upgrades, "non-CDB"refers to a non-CDB from a previous release.

A fully qualified file name has the following form in a non-multitenant environment:

Chapter 5About Oracle ASM File Names

5-4

Page 178: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

+diskgroup/dbname/filetype/filetypetag.file.incarnation

With multitenant databases, a fully qualified file name has the following form:

+diskgroup/cdb/pdb_guid/filetype/filetypetag.file.incarnation

The fields of the fully qualified file name are:

• +diskgroup is the disk group name preceded by a plus sign.

You can think of the plus sign (+) as the root directory of the Oracle ASM file system,similar to the slash (/) on UNIX or Linux computers.

• dbname is the DB_UNIQUE_NAME of the database to which the file belongs.

• filetype is the Oracle file type and can be one of the file types shown in Table 5-3.

• filetypetag is type-specific information about the file and can be one of the tags shownin Table 5-3.

• file.incarnation is the file/incarnation pair, used to ensure uniqueness.

• cdb is the name of the CDB

• pdb_guid is the PDB GUID value.

Examples of fully qualified Oracle ASM file names are:

SQL> SELECT NAME FROM V$DATAFILE;

NAME---------------------------------------------------------------------------+DATA/ORCL/DATAFILE/system.257.967544915+DATA/ORCL/DATAFILE/sysaux.258.967544961+DATA/ORCL/DATAFILE/undotbs1.259.967544985+DATA/ORCL/64A52F53A7693286E053CDA9E80AED76/DATAFILE/system.267.967545119+DATA/ORCL/64A52F53A7693286E053CDA9E80AED76/DATAFILE/sysaux.266.967545119+DATA/ORCL/DATAFILE/users.260.967544987...

Table 5-3 Oracle file types and Oracle ASM file type tags

Oracle ASM File Type Description Oracle ASM File TypeTag

Comments

CONTROLFILE Control files andbackup control files

Current

Backup

Archive

Backup

DATAFILE Data files and data filecopies

tblspname Name of the tablespace into whichthe file is added

ONLINELOG Online logs group_loggroup#

ARCHIVELOG Archive logs thread_thread#_seq_sequence#

TEMPFILE Tempfiles tsname Name of the tablespace into whichthe file is added

Chapter 5About Oracle ASM File Names

5-5

Page 179: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 5-3 (Cont.) Oracle file types and Oracle ASM file type tags

Oracle ASM File Type Description Oracle ASM File TypeTag

Comments

BACKUPSET Data file and archivelog backup pieces;data file incrementalbackup pieces

spfile?_timestamp spfile? can take one of twovalues: s indicates that the backupset includes the spfile; nindicates that the backup set doesnot include the spfile.

timestamp is the time that thebackup is started.

PARAMETERFILE Persistent parameterfiles

spfile Name of the SPFILE

DATAGUARDCONFIG Data Guardconfiguration file

db-unique-name Data Guard uses the value of theDB_UNIQUE_NAME initializationparameter.

FLASHBACK Flashback logs log_flashbacklog#

CHANGETRACKING Block change trackingdata

ctf Used during incremental backups

DUMPSET Data Pump dumpset user_obj#_file# Dump set files encode the username, the job number that createdthe dump set, and the file numberas part of the tag.

XTRANSPORT Data file convert tblspname Name of the tablespace where theOracle ASM metadata is added

AUTOBACKUP Automatic backup files spfile?_timestamp spfile? can take one of twovalues: s indicates that the backupset includes the spfile; nindicates that the backup set doesnot include the spfile.

timestamp is the time that thebackup is started.

ASMPARAMETERFILE Oracle ASM persistentparameter files

spfile Name of the Oracle ASM SPFILE

OCRFILE Oracle ClusterwareRegistry files

ocrfile Name of the OCR files

Alias Oracle ASM File Name FormsYou can use Alias Oracle ASM file names both for referencing existing Oracle ASMfiles and for creating new Oracle ASM files. Alias names start with the disk groupname preceded by a plus sign, after which you specify a name string. Alias file namesare implemented using a hierarchical directory structure, with the slash (/) or backslash(\) character separating name components. You can create an alias in any Oracle ASMdirectory generated by Oracle Managed Files (system-generated) or created by a user.An alias must include the disk group name; you cannot create an alias at the root level(+).

When you create an Oracle ASM file with an alias file name, the file is created with afully qualified name, and the alias file name is additionally created. You can thenaccess the file with either name.

Chapter 5About Oracle ASM File Names

5-6

Page 180: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Alias Oracle ASM file names are distinguished from fully qualified file names or numeric filenames because they do not end in a dotted pair of numbers. It is an error to attempt to createan alias that ends in a dotted pair of numbers, such as in the format USERS.259.685366091.Examples of Oracle ASM alias file names are:

+data/orcl/control_file1+fra/recover/second.dbf

Oracle Database references database files by their alias file names, but only if you create thedatabase files with aliases. If you create database files without aliases and then add aliaseslater, the database references the files by their fully qualified file names. The following areexamples of how the database uses alias file names:

• Alias file names appear in V$ views. For example, if you create a tablespace and use analias file name for the data file, the V$DATAFILE view shows the alias file name.

• When a control file points to data files and online redo log files, it can use alias filenames.

• The CONTROL_FILES initialization parameter can use the alias file names of the controlfiles. Database Configuration Assistant (DBCA) creates control files with alias file names.

Note:

Files created using an alias file name are not considered Oracle Managed Files andmight require manual deletion in the future if they are no longer needed.

For more information about alias file names, see Managing Alias Names for Oracle ASM FileNames.

Creating a Tablespace in Oracle ASM: Using a Data File with an AliasName

Example 5-1 creates an undo tablespace with a data file that has an alias name, and withattributes that are set by the user-defined template my_undo_template. This exampleassumes that a directory has been created in disk group data to contain the alias name andthat the user-defined template exists.

Because an alias is used when creating the data file, the file is not an Oracle Managed Files(OMF) file and the file is not automatically deleted when the tablespace is dropped. To dropthe file manually after the tablespace has been dropped, use the following SQL statement:

ALTER DISKGROUP data DROP FILE '+data/orcl/my_undo_ts';

Example 5-1 Creating a tablespace using an alias name

CREATE UNDO TABLESPACE myundo DATAFILE '+data(my_undo_template)/orcl/my_undo_ts' SIZE 200M;

Alias Oracle ASM File Name with Template FormAn alias Oracle ASM file name with template is used only for Oracle ASM file creationoperations. It has the following format:

Chapter 5About Oracle ASM File Names

5-7

Page 181: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

+diskgroup(templatename)/alias

Alias file names with template behave identically to alias file names except that a filecreated with an alias file name with template receives the attributes specified by thenamed template. The template must belong to the disk group that the file is beingcreated in.

An example of an alias Oracle ASM file name with template is:

+data(mytemplate)/config1

Explicitly specifying a template name, as in the previous example, overrides thesystem default template for the type of file being created.

Note:

Files created using an alias file name with template are not consideredOracle Managed Files and might require manual deletion in the future if theyare no longer needed.

See Also:

• Example 5-1 for information about creating objects using an alias name

• Managing Disk Group Templates for information about the creation andmaintenance of Oracle ASM templates

Incomplete Oracle ASM File Name FormIncomplete Oracle ASM file names are used only for file creation operations and areused for both single and multiple file creation. They consist only of the disk groupname. Oracle ASM uses a system default template to determine the Oracle ASM filemirroring and striping attributes. The system template that is used is determined by thefile type that is being created. For example, if you are creating a data file for atablespace, then the DATAFILE template is used.

An example of using an incomplete Oracle ASM file name is setting theDB_CREATE_FILE_DEST initialization parameter to:

+data

With this setting, every time you create a tablespace, a data file is created in the diskgroup data, and each data file is assigned a different fully qualified name. See Creating Oracle ASM Files Using a Default File Location for Disk Group Specificationfor more information.

Incomplete Oracle ASM File Name with Template FormIncomplete Oracle ASM file names with templates are used only for file creationoperations and are used for both single and multiple file creation. They consist of thedisk group name followed by the template name in parentheses. When you explicitly

Chapter 5About Oracle ASM File Names

5-8

Page 182: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

specify a template in a file name, Oracle ASM uses the specified template instead of thedefault template for that file type to determine attributes for the file.

An example of using an incomplete Oracle ASM file name with template is setting theDB_CREATE_FILE_DEST initialization parameter to:

+data(mytemplate)

Creating and Referencing Oracle ASM Files in the DatabaseAn Oracle ASM file is an Oracle Managed File unless you created the file using an alias. AnyOracle Managed File is automatically deleted when it is no longer needed.

This section contains the following topics:

• Creating Oracle ASM Files Using a Default File Location for Disk Group Specification

• Using Oracle ASM File Names in SQL Statements

• Moving Data Files Between Disk Groups With ALTER DATABASE

• Oracle Database File Mapping for Oracle ASM Files

Creating Oracle ASM Files Using a Default File Location for Disk GroupSpecification

Using the Oracle Managed Files feature for operating system files, you can specify adirectory as the default location for the creation of data files, temporary files, redo log files,and control files. Using the Oracle Managed Files feature for Oracle ASM, you can specify adisk group, in the form of an incomplete Oracle ASM file name, as the default location forcreation of these files, and additional types of files, including archived log files. As foroperating system files, the name of the default disk group is stored in an initializationparameter and is used whenever a file specification (for example, DATAFILE clause) is notexplicitly specified during file creation.

The following initialization parameters accept the multiple file creation context form of OracleASM file names as a destination:

• DB_CREATE_FILE_DEST

Specifies the default disk group location in which to create data and temp files.

• DB_CREATE_ONLINE_LOG_DEST_n

Specifies the default disk group location in which to create redo log and control files.

• DB_RECOVERY_FILE_DEST

Specifies a default disk group for a fast recovery area that contains a copy of the controlfile and redo log files if this parameter is specified and DB_CREATE_ONLINE_LOG_DEST_nand CONTROL_FILES are not specified.

• CONTROL_FILES

Specifies a disk group in which to create control files.

The following initialization parameters accept the multiple file creation context form of theOracle ASM file names and Oracle ASM directory names as a destination:

• LOG_ARCHIVE_DEST_n

Chapter 5Creating and Referencing Oracle ASM Files in the Database

5-9

Page 183: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Specifies a default disk group or Oracle ASM directory as destination for archivingredo log files

• LOG_ARCHIVE_DEST

Optional parameter to use to specify a default disk group or Oracle ASM directoryas destination for archiving redo log files. Use when specifying only onedestination.

• STANDBY_ARCHIVE_DEST

Relevant only for a standby database. It specifies a default disk group or OracleASM directory that is the location of archive logs arriving from a primary database.Not discussed in this book. This parameter has been deprecated. See Oracle DataGuard Concepts and Administration.

The following CREATE TABLESPACE SQL statement illustrates how an Oracle ASM file, inthis case a data file, might be created in a default disk group. This example assumesthat the DB_CREATE_FILE_DEST initialization parameter has been set to +data.

SQL> CREATE TABLESPACE mytblspace;

Oracle ASM automatically creates and manages the data file for mytblspace on OracleASM disks in the disk group data. File extents are stored using the attributes definedby the default template for a data file.

See Also:

• Oracle Database Reference for information about initializationparameters

• Oracle Database Administrator's Guide for information about initializationparameter files

Using Oracle ASM File Names in SQL StatementsYou can specify Oracle ASM file names in the file specification clause of your SQLstatements. If you are creating a file for the first time, then use the creation form of anOracle ASM file name. If the Oracle ASM file exists, then you must use the referenceform of the file name, and if you are trying to re-create the file, you must add the REUSEkeyword so that the space is reused for the new file. This usage might occur when, forexample, trying to re-create a control file, as shown in Creating Control Files in OracleASM.

If a reference form is used with the REUSE keyword and the file does not exist, an errorresults.

Example 5-2 is an example of specifying an Oracle ASM file name in a SQLstatement. In this case, it is used in the file creation form.

The tablespace mytblspace is created and comprises one data file of size 200 MBcontained in the disk group data. The data file is set to auto-extensible with anunlimited maximum size. You can use an AUTOEXTEND clause to override this default.

For more examples of the use of Oracle ASM file name in SQL statements, see Creating Database Files in Oracle ASM Using SQL*Plus.

Chapter 5Creating and Referencing Oracle ASM Files in the Database

5-10

Page 184: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 5-2 Using an Oracle ASM File name in a SQL statement

CREATE TABLESPACE mytblspace DATAFILE '+data' SIZE 200M AUTOEXTEND ON;

Moving Data Files Between Disk Groups With ALTER DATABASEYou can use the ALTER DATABASE MOVE DATAFILE SQL statement to move data files betweendisk groups while the database is open and users are accessing the data files.

Example 5-3 shows how you can move a data file from the DATA disk group to the DATA2 diskgroup.

Example 5-3 Moving data files online with ALTER DATABASE MOVE DATAFILE

/* Create a new disk group DATA2 using ASMCA, ASMCMD, or SQL *//* Then create appropriate directories in the DATA2 disk group */

ALTER DISKGROUP data2 ADD DIRECTORY '+DATA2/ORCL';

ALTER DISKGROUP data2 ADD DIRECTORY '+DATA2/ORCL/DATAFILE';

/* Move the EXAMPLE data file in DATA to EXAMPLE_STORAGE in DATA2ALTER DATABASE MOVE DATAFILE '+DATA/ORCL/DATAFILE/EXAMPLE.266.798707687' TO '+DATA2/ORCL/DATAFILE/EXAMPLE_STORAGE';

SELECT SUBSTR(name,1,64) FROM V$DATAFILE; SUBSTR(NAME,1,64)----------------------------------------------------------------+DATA/ORCL/DATAFILE/system.258.798707555+DATA2/ORCL/DATAFILE/example_storage+DATA/ORCL/DATAFILE/sysaux.257.798707491+DATA/ORCL/DATAFILE/undotbs1.260.798707621+DATA/ORCL/DATAFILE/users.259.798707621

See Also:

• Oracle Database Administrator’s Guide for more information about using theALTER DATABASE MOVE DATAFILE SQL statement to move data files

• Oracle Database SQL Language Reference for information about using theALTER DATABASE SQL statement.

• Moving Data Files Between Oracle ASM Disk Groups Using RMAN forinformation about using RMAN to move data files between disk groups

Oracle Database File Mapping for Oracle ASM FilesFor an understanding of I/O performance, you must have detailed knowledge of the storagehierarchy in which files reside.

Oracle Database provides a set of dynamic performance views to show a complete mappingof a file to intermediate layers of logical volumes to actual physical devices. Using thesedynamic views, you can locate the exact disk on which any block of a file resides.

Chapter 5Creating and Referencing Oracle ASM Files in the Database

5-11

Page 185: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Oracle Database communicates with a background process called FMON to manage themapping information. Oracle provides the PL/SQL DBMS_STORAGE_MAP package toinvoke mapping operations that populate the mapping views.

Oracle Database file mapping does not require third party libraries when mappingOracle ASM files. In addition, Oracle Database supports Oracle ASM file mapping onall operating system platforms.

All the examples in this section are run on the Oracle Database instance.

This section contains the following topics:

• Enabling File Mapping With Oracle ASM Files

• Using File Mapping Views With Oracle ASM Files

• Using the DBMS_STORAGE_MAP Package With Oracle ASM Files

See Also:

• Oracle Automatic Storage Management Cluster File SystemAdministrator's Guide for more information about Oracle ACFS andOracle ADVM

• Oracle Database Administrator’s Guide for additional information aboutOracle Database file mapping

Enabling File Mapping With Oracle ASM FilesTo enable file mapping, set the FILE_MAPPING initialization parameter to TRUE. Thedatabase instance does not have to be shut down to set this parameter. You can setthe parameter using the following ALTER SYSTEM statement:

SQL> ALTER SYSTEM SET FILE_MAPPING=TRUE;

Run the appropriate DBMS_STORAGE_MAP mapping procedure.

• In a cold startup scenario, the Oracle Database has just started and no mappingoperation has been invoked yet. You can execute the DBMS_STORAGE_MAP.MAP_ALLprocedure to build the mapping information for the entire I/O subsystemassociated with the database.

For example, the following command builds mapping information and provides for10000 extents:

SQL> EXECUTE DBMS_STORAGE_MAP.MAP_ALL(10000);

• In a warm start scenario where the mapping information has already been built,you have the option to invoke the DBMS_STORAGE_MAP.MAP_SAVE procedure to savethe mapping information in the data dictionary.

This procedure is invoked in DBMS_STORAGE_MAP.MAP_ALL() by default. This forcesall of the mapping information in the SGA to be flushed to disk. TheDBMS_STORAGE_MAP.MAP_SAVE procedure is invoked inDBMS_STORAGE_MAP.MAP_ALL() by default.

Chapter 5Creating and Referencing Oracle ASM Files in the Database

5-12

Page 186: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

After you restart the database, use DBMS_STORAGE_MAP.RESTORE() to restore the mappinginformation into the SGA. If needed, DBMS_STORAGE_MAP.MAP_ALL() can be called to refreshthe mapping information.

Using File Mapping Views With Oracle ASM FilesMapping information generated by DBMS_STORAGE_MAP package is captured in dynamicperformance views. These views include V$MAP_COMP_LIST, V$MAP_ELEMENT,V$MAP_EXT_ELEMENT, V$MAP_FILE, V$MAP_FILE_EXTENT, V$MAP_FILE_IO_STACK,V$MAP_LIBRARY, and V$MAP_SUBELEMENT.

For example, you can view file mappings with V$MAP_FILE.

SQL> SELECT FILE_MAP_IDX, SUBSTR(FILE_NAME,1,45), FILE_TYPE, FILE_STRUCTURE FROM V$MAP_FILE;

FILE_MAP_IDX SUBSTR(FILE_NAME,1,45) FILE_TYPE FILE_STRU------------ --------------------------------------------- ----------- --------- 0 +DATA/ORCL/DATAFILE/system.258.841314095 DATAFILE ASMFILE 1 +DATA/ORCL/DATAFILE/sysaux.257.841314021 DATAFILE ASMFILE 2 +DATA/ORCL/DATAFILE/undotbs1.260.841314161 DATAFILE ASMFILE 3 +DATA/ORCL/DATAFILE/example.266.841314219 DATAFILE ASMFILE 4 +DATA/ORCL/DATAFILE/users.259.841314161 DATAFILE ASMFILE 5 +DATA/ORCL/ONLINELOG/group_3.264.841314209 LOGFILE ASMFILE 6 +FRA/ORCL/ONLINELOG/group_3.259.841314211 LOGFILE ASMFILE 7 +DATA/ORCL/ONLINELOG/group_2.263.841314207 LOGFILE ASMFILE 8 +FRA/ORCL/ONLINELOG/group_2.258.841314207 LOGFILE ASMFILE 9 +DATA/ORCL/ONLINELOG/group_1.262.841314203 LOGFILE ASMFILE 10 +FRA/ORCL/ONLINELOG/group_1.257.841314203 LOGFILE ASMFILE 11 +DATA/ORCL/TEMPFILE/temp.265.841314217 TEMPFILE ASMFILE 12 +DATA/ORCL/CONTROLFILE/current.261.841314199 CONTROLFILE ASMFILE 13 +FRA/ORCL/CONTROLFILE/current.256.841314201 CONTROLFILE ASMFILE

See Also:

Oracle Database Reference for information about dynamic views

Using the DBMS_STORAGE_MAP Package With Oracle ASM FilesYou can use the procedures in the DBMS_STORAGE_MAP PL/SQL package to control mappingoperations. For example, you can use the DBMS_STORAGE_MAP.MAP_OBJECT procedure to buildmapping information for the database object that is specified by object name, owner, andtype. After the DBMS_STORAGE_MAP.MAP_OBJECT procedure is run, then you can create a queryto display the mapping information contained in the MAP_OBJECT view.

SQL> EXECUTE DBMS_STORAGE_MAP.MAP_OBJECT('EMPLOYEES','HR','TABLE');

SQL> SELECT io.OBJECT_NAME o_name, io.OBJECT_OWNER o_owner, io.OBJECT_TYPE o_type, mf.FILE_NAME, me.ELEM_NAME, io.DEPTH, (SUM(io.CU_SIZE * (io.NUM_CU - DECODE(io.PARITY_PERIOD, 0, 0, TRUNC(io.NUM_CU / io.PARITY_PERIOD)))) / 2) o_size FROM MAP_OBJECT io, V$MAP_ELEMENT me, V$MAP_FILE mf WHERE io.OBJECT_NAME = 'EMPLOYEES' AND io.OBJECT_OWNER = 'HR' AND io.OBJECT_TYPE = 'TABLE' AND me.ELEM_IDX = io.ELEM_IDX AND mf.FILE_MAP_IDX = io.FILE_MAP_IDX

Chapter 5Creating and Referencing Oracle ASM Files in the Database

5-13

Page 187: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

GROUP BY io.ELEM_IDX, io.FILE_MAP_IDX, me.ELEM_NAME, mf.FILE_NAME, io.DEPTH, io.OBJECT_NAME, io.OBJECT_OWNER, io.OBJECT_TYPE ORDER BY io.DEPTH; O_NAME O_OWNER O_TYPE FILE_NAME ELEM_NAME DEPTH O_SIZE--------- ------- ------ ----------------------------------------- ---------------- ----- ------EMPLOYEES HR TABLE +DATA/ORCL/DATAFILE/example.266.841314219 +/devices/diskd2 0 64EMPLOYEES HR TABLE +DATA/ORCL/DATAFILE/example.266.841314219 +/devices/diske2 0 64

See Also:

Oracle Database PL/SQL Packages and Types Reference for informationabout the DBMS_STORAGE_MAP package

Managing Alias Names for Oracle ASM File NamesAlias names, or aliases, are intended to provide a more user-friendly means ofreferring to Oracle ASM files, rather than using the system-generated file names.

You can create an alias for a file when you create it in the database, or you can add analias to an existing file using the ADD ALIAS clause of the ALTER DISKGROUP statement.You can create an alias in any system-generated or user-created Oracle ASMdirectory. An alias must include the disk group name; you cannot create an alias at theroot level (+).

This section contains the following sections:

• Adding an Alias Name for an Oracle ASM File Name

• Renaming an Alias Name for an Oracle ASM File Name

• Dropping an Alias Name for an Oracle ASM File Name

• Dropping Files and Associated Aliases from a Disk Group

See Also:

• Oracle Database SQL Language Reference for information about theALTER DISKGROUP statement

• mkalias for information about creating aliases with ASMCMD

Adding an Alias Name for an Oracle ASM File NameUse the ADD ALIAS clause of the ALTER DISKGROUP statement to create an alias namefor an Oracle ASM file name. The alias name must consist of the full directory pathand the alias itself.

Example 5-4 adds a new alias name for a system-generated file name.

Chapter 5Managing Alias Names for Oracle ASM File Names

5-14

Page 188: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 5-4 Adding an alias name for an Oracle ASM file name

ALTER DISKGROUP data ADD ALIAS '+data/orcl/second.dbf' FOR '+data/orcl/datafile/mytable.342.123456789';

Renaming an Alias Name for an Oracle ASM File NameUse the RENAME ALIAS clause of the ALTER DISKGROUP statement to rename an alias for anOracle ASM file name. The old and the new alias names must consist of the full directorypaths of the alias names.

Example 5-5 renames an alias.

Renaming an alias does not update the database reference to the alias.

Example 5-5 Renaming an alias name for an Oracle ASM file name

ALTER DISKGROUP data RENAME ALIAS '+data/orcl/datafile.dbf' TO '+data/payroll/compensation.dbf';

Dropping an Alias Name for an Oracle ASM File NameUse the DROP ALIAS clause of the ALTER DISKGROUP statement to drop an alias for an OracleASM file name. The alias name must consist of the full directory path and the alias itself. Theunderlying file to which the alias refers is unchanged.

Example 5-6 drops an alias.

Example 5-7 fails because it attempts to drop a system-generated file name and this syntaxis not allowed.

Example 5-6 Dropping an alias name for an Oracle ASM file name

ALTER DISKGROUP data DROP ALIAS '+data/payroll/compensation.dbf';

Example 5-7 Dropping an alias name for an Oracle ASM file name

ALTER DISKGROUP data DROP ALIAS '+data/orcl/datafile/mytable.342.123456789';

Dropping Files and Associated Aliases from a Disk GroupYou can delete Oracle ASM files and their associated aliases from a disk group using theDROP FILE clause of the ALTER DISKGROUP statement. You must use a fully qualified file name,or an alias name when specifying the file to delete. The underlying file on the file system isnot dropped when the alias is dropped.

Some reasons why you may want to delete files include:

• A file created using aliases is not an Oracle Managed File. Consequently, it is notautomatically deleted.

• A point-in-time-recovery of a database might restore the database to a time before atablespace was created. The restore does not delete the tablespace, but there is noreference to the tablespace or its data file in the restored database. You could manuallydelete the data file.

In Example 5-8, the alias name for the file is used when deleting both the file and the aliasfrom a disk group.

Chapter 5Managing Alias Names for Oracle ASM File Names

5-15

Page 189: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

In Example 5-9, the Oracle Managed Files (system-generated) file name is used whendropping the file and any associated alias.

Example 5-8 Dropping a file and alias from a disk group using the alias name

ALTER DISKGROUP data DROP FILE '+data/payroll/compensation.dbf';

Example 5-9 Dropping a file and alias from a disk group using the system-generated name

ALTER DISKGROUP data DROP FILE '+data/orcl/datafile/mytable.342.123456789';

Managing Disk Group DirectoriesOracle ASM disk groups contain a system-generated hierarchical directory structurefor storing Oracle ASM files. The system-generated file name that Oracle ASM assignsto each file represents a path in this directory hierarchy. The following is an example ofa system-generated file name:

+data/orcl/CONTROLFILE/Current.256.541956473

The plus sign represents the root of the Oracle ASM file system. The data directory isthe parent directory for all files in the data disk group. The orcl directory is the parentdirectory for all files in the orcl database, and the CONTROLFILE directory contains allcontrol files for the orcl database.

You can create your own directories within this hierarchy to store aliases that youcreate. Thus, in addition to having user-friendly alias names for Oracle ASM files, youcan have user-friendly paths to those names.

This section describes how to use the ALTER DISKGROUP statement to create adirectory structure for aliases. It also describes how you can rename a directory ordrop a directory. This section contains the following topics:

• Creating a Directory

• Renaming a Directory

• Dropping a Directory

Creating a DirectoryUse the ADD DIRECTORY clause of the ALTER DISKGROUP statement to create ahierarchical directory structure for alias names for Oracle ASM files. Use the slash (/)or backslash (\) character to separate components of the directory path. The directorypath must start with the disk group name, preceded by a plus sign (+), followed by anysubdirectory names of your choice.

The parent directory must exist before attempting to create a subdirectory or alias inthat directory. A directory must be created below the disk group level.

Example 5-10 creates a hierarchical directory for disk group data, which can contain,for example, the alias name +data/orcl/control_file1.

Assuming no subdirectory exists under the directory +data/orcl, the SQL statementfails in Example 5-11.

Chapter 5Managing Disk Group Directories

5-16

Page 190: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 5-10 Creating a new directory

ALTER DISKGROUP data ADD DIRECTORY '+data/orcl';

Example 5-11 Creating a new subdirectory

ALTER DISKGROUP data ADD DIRECTORY '+data/orcl/first_dir/second_dir';

Renaming a DirectoryThe RENAME DIRECTORY clause of the ALTER DISKGROUP statement enables you to rename adirectory. System-created directories (those containing system-generated names) cannot berenamed. The root level (disk group name) cannot be renamed.

Example 5-12 renames a directory.

Example 5-12 Renaming a directory

ALTER DISKGROUP data RENAME DIRECTORY '+data/mydir' TO '+data/yourdir';

Dropping a DirectoryYou can delete a directory using the DROP DIRECTORY clause of the ALTER DISKGROUPstatement. You cannot drop a system-created directory. You cannot drop a directorycontaining alias names unless you also specify the FORCE clause.

Example 5-13 deletes a directory along with its contents.

Example 5-13 Dropping a directory

ALTER DISKGROUP data DROP DIRECTORY '+data/yourdir' FORCE;

Accessing Oracle ASM Files with the XML DB Virtual FolderOracle ASM files and directories can be accessed through a virtual folder in the XML DBrepository

. The repository path to the virtual folder is /sys/asm. The folder is virtual because itscontents do not actually reside in the repository; they exist as normal Oracle ASM files anddirectories. For example, /sys/asm provides a means to access and manipulate the OracleASM files and directories with programmatic APIs such as the DBMS_XDB package and withXML DB protocols such as FTP and HTTP/WebDAV. You can also use the ASMCMD cpcommand to copy files.

A typical use for this capability might be to view /sys/asm as a Web Folder in a graphical userinterface (with the WebDAV protocol), and then copy a Data Pump dumpset from an OracleASM disk group to an operating system file system by dragging and dropping.

You must log in as a user other than SYS and you must have been granted the DBA role toaccess /sys/asm with XML DB protocols.

Chapter 5Accessing Oracle ASM Files with the XML DB Virtual Folder

5-17

Page 191: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

For security reasons, FTP is disabled, by default. This is because the IETFFTP protocol specification requires that passwords be transmitted in cleartext. Disabling is done by configuring the FTP server port as zero (0). Toenable FTP, set the ftp-port parameter to the FTP port to use, such as2100.

See Also:

• cp for information about the ASMCMD cp command.

• Inside /sys/asm for additional information about the /sys/asm folder

• Oracle XML DB Developer’s Guide for information about Oracle XMLDB, including additional ways to configure port numbers for the XML DBprotocol servers

• Oracle Database PL/SQL Packages and Types Reference forinformation about the DBMS_XDB package

Inside /sys/asmThe Oracle ASM virtual folder is created by default during XML DB installation. If thedatabase is not configured to use Oracle ASM, the folder is empty and no operationsare permitted on it.

The Oracle ASM virtual folder contains folders and subfolders that follow the hierarchydefined by the structure of an Oracle ASM fully qualified file name. Figure 5-1illustrates an example of this hierarchy, which for simplicity, excludes directoriescreated for aliases.

The folder /sys/asm contains one subfolder for every mounted disk group, and eachdisk group folder contains one subfolder for each database that uses the disk group. Inaddition, a disk group folder might contain files and folders corresponding to aliasescreated by the administrator. Continuing the hierarchy, the database folders contain filetype folders, which contain the Oracle ASM files.

Chapter 5Accessing Oracle ASM Files with the XML DB Virtual Folder

5-18

Page 192: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Figure 5-1 Hierarchical Structure of Oracle ASM Folders in an XML DB Installation

DATA

FIL

ET

EM

PF

ILE

CO

NT

RO

LF

ILE

ON

LIN

EL

OG

CO

NT

RO

LF

ILE

ON

LIN

EL

OG

AR

CH

IVE

LO

G

File�

Typ

es

Data

bases

Dis

k G

rou

ps

HR

MF

GH

RM

FG

DATA

RE

CO

VE

RY

/sys

/asm

The following are usage restrictions on /sys/asm:

• You cannot create hard links to existing Oracle ASM files or directories with APIs such asDBMS_XDB.LINK.

• You cannot rename (move) an Oracle ASM file to another disk group or to a directoryoutside Oracle ASM.

You can use the directory /sys/asm for storing the names of disk groups. You cannot storeother files in this directory. Within the disk group directories under /sys/asm, suchas /sys/asm/DATA, you can only store database files in these sub-directories. Oracle ASMrejects attempts to store non-database files in these directories.

Using DBMS_FILE Transfer Utility for Oracle ASMThe DBMS_FILE_TRANSFER package provides procedures to copy Oracle ASM files within adatabase or to transfer binary files between databases that use Oracle ASM. TheDBMS_FILE_TRANSFER package has the following procedures:

• COPY_FILE—Reads a file from a source directory and creates a copy of the file in adestination directory. The source and destination directories can both be in a local filesystem or in an Oracle ASM disk group. You can also use this procedure to copybetween a local file system and an Oracle ASM disk group; the copy operation is valid ineither direction.

• GET_FILE—Contacts a remote database to read a remote file and then creates a copy ofthe file in the local file system or Oracle ASM disk group.

Chapter 5Using DBMS_FILE Transfer Utility for Oracle ASM

5-19

Page 193: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• PUT_FILE—Reads a local file or Oracle ASM disk group and contacts a remotedatabase to create a copy of the file in the remote file system.

See Also:

Oracle Database PL/SQL Packages and Types Reference for moreinformation about the DBMS_FILE_TRANSFER package

Managing Disk Group TemplatesTemplates are used to set attributes of files created in an Oracle ASM disk group.

When a file is created, redundancy and striping attributes are set for that file based onan explicitly named template or the system template that is the default template for thefile type.

When a disk group is created, Oracle ASM creates a set of default templates for thatdisk group. The set consists of one template for each file type (data file, control file,redo log file, and so on) that is supported by Oracle ASM. For example, a templatenamed ONLINELOG provides the default file redundancy and striping attributes for allredo log files written to Oracle ASM disks. Default template settings depend on thedisk group type. The default template for data files for a normal redundancy disk groupsets two-way mirroring, while the corresponding default template in a high redundancydisk group sets three-way mirroring. You can modify these default templates.

For example, default redundancy for the online redo log files (ONLINELOG template) fora normal redundancy disk group is MIRROR. In Example 4-1, this setting means thatwhen one copy of a redo log file extent is written to a disk in failure groupcontroller1, a mirrored copy of the file extent is written to a disk in failure groupcontroller2. To support the default mirroring of a normal redundancy disk group, atleast two failure groups must be defined.

Table 5-6 lists the default templates and the attributes that are associated to matchingfiles. As the table shows, the initial redundancy value of each default templatedepends on the type of disk group that the template belongs to.

Using clauses of the ALTER DISKGROUP SQL statement, you can add new templates toa disk group, modify existing ones, or drop templates. The reason to add templates isto create the right combination of attributes to meet unique requirements. You can thenreference a template name when creating a file, thereby assigning desired attributesbased on an individual file rather than on the file type.

This section describes how to manage disk group templates under the following topics:

• Template Attributes

• Adding Templates to a Disk Group

• Modifying a Disk Group Template

• Dropping Templates from a Disk Group

• Creating Tablespaces in Oracle ASM: Specifying Attributes with Templates

Chapter 5Managing Disk Group Templates

5-20

Page 194: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Oracle Database SQL Language Reference for information about the ALTERDISKGROUP statement

• Oracle Database Reference for information about the V$ASM_TEMPLATE viewwhich lists all of the templates known to the Oracle ASM instance

Template AttributesTable 5-4 shows the permitted striping attribute values and allocation unit size chunks. Thesevalues correspond to the STRIPE column of V$ASM_TEMPLATE.

Table 5-4 Permitted values for Oracle ASM template striping attribute

Striping Attribute Value Description

FINE Striping in 128 KB chunks.

COARSE Striping in 1 MB chunks.

Table 5-5 shows the permitted redundancy values for Oracle ASM templates. These valuescorrespond to the REDUND column of V$ASM_TEMPLATE.

Table 5-5 Permitted values for Oracle ASM template redundancy attribute

RedundancyAttribute Value

Resulting Mirroring inNormal Redundancy DiskGroup

Resulting Mirroring in HighRedundancy Disk Group

Resulting Mirroring inExternal Redundancy DiskGroup

MIRROR Two-way mirroring Three-way mirroring (Not allowed)

HIGH Three-way mirroring Three-way mirroring (Not allowed)

UNPROTECTED No mirroring (Not allowed) No mirroring

Table 5-6 shows the initial attribute settings for some default templates. The type of mirroringassociated with the Mirroring column for normal, high, and external redundancy disk groupsis specified in Table 5-5. For example, the Mirror column for high redundancy disk groupsdisplays MIRROR in Table 5-6. In Table 5-5, the MIRROR value for high redundancy disk groupscorresponds to Three-way mirroring.

Table 5-6 Oracle ASM system default templates attribute settings

Template Name FileStriping

Mirroring,NormalRedundancyDisk Group

Mirroring,HighRedundancyDisk Group

Mirroring,ExternalRedundancyDisk Group

PrimaryRegion

Mirror Region

ARCHIVELOG COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

ASMPARAMETERFILE COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

AUDIT_SPILLFILES COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

AUTOBACKUP COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

Chapter 5Managing Disk Group Templates

5-21

Page 195: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 5-6 (Cont.) Oracle ASM system default templates attribute settings

Template Name FileStriping

Mirroring,NormalRedundancyDisk Group

Mirroring,HighRedundancyDisk Group

Mirroring,ExternalRedundancyDisk Group

PrimaryRegion

Mirror Region

BACKUPSET COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

CHANGETRACKING COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

CONTROLFILE FINE HIGH MIRROR UNPROTECTED COLD MIRRORCOLD

DATAFILE COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

DATAGUARDCONFIG COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

DUMPSET COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

FLASHBACK COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

FLASHFILE COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

KEY_STORE COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

OCRFILE COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

ONLINELOG COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

PARAMETERFILE COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

TEMPFILE COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

VOTINGFILE COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

XTRANSPORT COARSE MIRROR MIRROR UNPROTECTED COLD MIRRORCOLD

COLD and MIRRORCOLD are the default values and the only permitted values for thePRIMARY_REGION and MIRROR_REGION attributes. These values specify the use of theinner most tracks (closest to spindle) on the disk drive.

Adding Templates to a Disk GroupTo add a template to a disk group, use the ADD TEMPLATE clause of the ALTERDISKGROUP statement.

If the name of your new template is not listed in Table 5-6, then it is not used as adefault template for database file types. To use the template, you must reference itsname when creating a file.

When adding a template to a disk group, the attributes are optional. If no redundancyattribute is specified, then the value defaults to MIRROR for a normal redundancy diskgroup, HIGH for a high redundancy disk group, and UNPROTECTED for an externalredundancy disk group. If you do not specify a striping attribute, then the valuedefaults to COARSE. If you do not specify a value for the primary or mirror regionattributes, then the value defaults to COLD and MIRRORCOLD respectively.

Example 5-14 creates a new template named reliable for the normal redundancydisk group data.

Example 5-15 creates a new template named unreliable that specifies UNPROTECTED(no mirroring) for files.

Chapter 5Managing Disk Group Templates

5-22

Page 196: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

Oracle discourages using unprotected files unless you have implemented hardwaremirroring. The previous example is presented only to further illustrate how theattributes for templates are set.

Example 5-14 Adding a template with high redundancy to a disk group

ALTER DISKGROUP data ADD TEMPLATE reliable ATTRIBUTES (HIGH FINE);

Example 5-15 Adding a template with external redundancy to a disk group

ALTER DISKGROUP data ADD TEMPLATE unreliable ATTRIBUTES (UNPROTECTED);

See Also:

Oracle Database SQL Language Reference for more information about the ALTERDISKGROUP...ADD TEMPLATE command

Modifying a Disk Group TemplateThe MODIFY TEMPLATE clause of the ALTER DISKGROUP statement enables you to modify theattribute specifications of an existing system default or user-defined disk group template.Only specified template attributes are changed. Unspecified properties retain their currentvalue. When you modify an existing template, only new files created by the template reflectthe attribute changes. Existing files maintain their attributes.

Example 5-16 changes the striping attribute specification of the reliable template for diskgroup data.

Example 5-16 Modifying a disk group template

ALTER DISKGROUP data MODIFY TEMPLATE reliable ATTRIBUTES (COARSE);

Dropping Templates from a Disk GroupUse the DROP TEMPLATE clause of the ALTER DISKGROUP statement to drop one or moretemplates from a disk group. You can only drop templates that are user-defined; you cannotdrop system default templates.

Example 5-17 drops the previously created template unreliable from data:

Example 5-17 Dropping a template from a disk group

ALTER DISKGROUP data DROP TEMPLATE unreliable;

Creating Tablespaces in Oracle ASM: Specifying Attributes with TemplatesUse the SQL ALTER SYSTEM and CREATE TABLESPACE statements to create a tablespace thatuses a user-defined template to specify the attributes of the data file.

Chapter 5Managing Disk Group Templates

5-23

Page 197: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 5-18 assumes that the template (mytemplate) has been defined.

Example 5-18 Using a user-defined template to specify attributes

ALTER SYSTEM SET DB_CREATE_FILE_DEST = '+data(mytemplate)';

CREATE TABLESPACE mytblspace;

Chapter 5Managing Disk Group Templates

5-24

Page 198: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

6Using Views to Display Oracle ASMInformation

Dynamic views display important information about Oracle ASM.

This chapter contains information about using dynamic views to display Oracle AutomaticStorage Management (Oracle ASM) information.

• Views Containing Oracle ASM Information

• Viewing Oracle ASM File Access Control Information

See Also:

• Oracle Database Reference for information about all dynamic performanceviews

• Managing Oracle ASM with ASMCMD for ASMCMD ls* commands that displayOracle ASM information.

Views Containing Oracle ASM InformationThe views listed in Table 6-1 provide information about Oracle ASM.

For information about all dynamic performance views that display information about OracleASM, refer to Oracle Database Reference

Note:

The REDUNDANCY_LOWERED column in the V$ASM_FILE view no longer providesinformation about files with reduced redundancy. This column is deprecated, and italways displays a value of U.

Table 6-1 Oracle ASM dynamic views

View Description

V$ASM_ALIAS Contains one row for every alias present in every disk group mountedby the Oracle ASM instance.

V$ASM_ATTRIBUTE Displays one row for each attribute defined. In addition to attributesspecified by CREATE DISKGROUP and ALTER DISKGROUP statements,the view may show other attributes that are created automatically.Attributes are only displayed for disk groups where COMPATIBLE.ASMis set to 11.1 or higher.

6-1

Page 199: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 6-1 (Cont.) Oracle ASM dynamic views

View Description

V$ASM_AUDIT_CLEANUP_JOBS Displays information about the configured audit trail purge jobs.

V$ASM_AUDIT_CONFIG_PARAMS Displays information about the currently configured audit trailproperties.

V$ASM_AUDIT_LAST_ARCH_TS Displays information about the last archive timestamps set for audit trailcleanup or purges.

V$ASM_CLIENT In an Oracle ASM instance, identifies databases using disk groupsmanaged by the Oracle ASM instance.

In an Oracle Database instance, contains information about the OracleASM instance if the database has any open Oracle ASM files.

V$ASM_DBCLONE_INFO In an Oracle ASM instance, shows the relationship between the sourcedatabase, the cloned database, and their file groups.

V$ASM_DISK Contains one row for every disk discovered by the Oracle ASMinstance, including disks that are not part of any disk group.

This view performs disk discovery every time it is queried. Becauseperforming a discovery is very resource intensive, this view is notrecommended for monitoring scripts.

V$ASM_DISK_IOSTAT Displays information about disk I/O statistics for each Oracle ASMclient.

In an Oracle Database instance, only the rows for that instance areshown.

V$ASM_DISK_STAT Contains the same columns as V$ASM_DISK, but to reduce overhead,does not perform a discovery when it is queried. V$ASM_DISK_STATonly returns information about any disks that are part of mounted diskgroups in the storage system.

The V$ASM_DISK_STAT view is recommended for monitoring scripts.

To display information about all disks, use V$ASM_DISK instead.

V$ASM_DISKGROUP Describes a disk group (number, name, size related info, state, andredundancy type).

This view performs disk discovery every time it is queried. Becauseperforming a discovery is very resource intensive, this view is notrecommended for monitoring scripts.

V$ASM_DISKGROUP_STAT Contains the same columns as V$ASM_DISKGROUP, but to reduceoverhead, V$ASM_DISKGROUP_STAT does not perform a discoverywhen it is queried.

The V$ASM_DISKGROUP_STAT view is recommended for monitoringscripts.

To display more complete information about all disks, useV$ASM_DISKGROUP.

V$ASM_ESTIMATE Displays an estimate of the work involved in execution plans for OracleASM disk group rebalance and resync operations.

V$ASM_FILE Contains one row for every Oracle ASM file in every disk groupmounted by the Oracle ASM instance.

V$ASM_FILEGROUP Contains one row for every file group in every disk group mounted bythe Oracle ASM instance.

V$ASM_FILEGROUP_FILE Contains one row for each file associated with a file group in every diskgroup mounted by the Oracle ASM instance.

Chapter 6Views Containing Oracle ASM Information

6-2

Page 200: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 6-1 (Cont.) Oracle ASM dynamic views

View Description

V$ASM_FILEGROUP_PROPERTY Contains one row for every property associated with the file group oreach file type of every file group in every disk group mounted by theOracle ASM instance.

V$ASM_OPERATION In an Oracle ASM instance, contains one row for every active OracleASM long running operation executing in the Oracle ASM instance.

In an Oracle Database instance, contains no rows.

V$ASM_QUOTAGROUP Contains one row for every Oracle Automatic Storage Management(Oracle ASM) quota group discovered by the Oracle ASM instance onthe node.

V$ASM_TEMPLATE Contains one row for every template present in every disk groupmounted by the Oracle ASM instance.

V$ASM_USER Contains the effective operating system user names of connecteddatabase instances and names of file owners.

V$ASM_USERGROUP Contains the creator for each Oracle ASM File Access Control group.

V$ASM_USERGROUP_MEMBER Contains the members for each Oracle ASM File Access Controlgroup.

When querying V$ASM views, the value of the disk group number is not a static value. When adisk group is mounted, a disk group number is chosen. This number may change across diskgroup mounts. A disk group number is not recorded in any persistent structure, but thecurrent value can be viewed in the GROUP_NUMBER column of the V$ASM views.

Example 6-1 Viewing disk group attributes with V$ASM_ATTRIBUTE

This is an example of the use of the V$ASM_ATTRIBUTE and V$ASM_DISKGROUP views. TheCOMPATIBLE.ASM value must be set to 11.1 or higher for the disk group to display in theV$ASM_ATTRIBUTE view output. Attributes that are designated as read-only (Y) can only be setduring disk group creation.

SELECT SUBSTR(dg.name,1,12) AS diskgroup, SUBSTR(a.name,1,24) AS name, SUBSTR(a.value,1,24) AS value, read_only FROM V$ASM_DISKGROUP dg, V$ASM_ATTRIBUTE a WHERE dg.name = 'DATA' AND dg.group_number = a.group_number AND a.name NOT LIKE '%template%';

DISKGROUP NAME VALUE READ_ON------------ ------------------------ ------------------------ -------DATA idp.type dynamic NDATA idp.boundary auto NDATA vam_migration_done false YDATA scrub_metadata.enabled TRUE NDATA scrub_async_limit 1 NDATA content_hardcheck.enable FALSE NDATA access_control.umask 066 NDATA access_control.enabled FALSE NDATA cell.sparse_dg allnonsparse NDATA cell.smart_scan_capable FALSE NDATA compatible.advm 19.0.0.0.0 NDATA compatible.rdbms 19.0.0.0.0 NDATA compatible.asm 19.0.0.0.0 NDATA appliance._partnering_ty GENERIC YDATA au_size 1048576 YDATA content.check FALSE N

Chapter 6Views Containing Oracle ASM Information

6-3

Page 201: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

DATA content.type data NDATA logical_sector_size 512 NDATA sector_size 512 NDATA ate_conversion_done true YDATA preferred_read.enabled FALSE NDATA thin_provisioned FALSE NDATA failgroup_repair_time 24.0h NDATA phys_meta_replicated true YDATA disk_repair_time 12.0h N

Example 6-2 Viewing the compatibility of a disk group withV$ASM_DISKGROUP

This is an example of displaying the compatibility for a disk group with theV$ASM_DISKGROUP view.

SELECT name AS diskgroup, substr(compatibility,1,12) AS asm_compat, substr(database_compatibility,1,12) AS db_compat FROM V$ASM_DISKGROUP;

DISKGROUP ASM_COMPAT DB_COMPAT------------------------------ ------------ ------------DATA 19.0.0.0.0 19.0.0.0.0FRA 19.0.0.0.0 19.0.0.0.0

Example 6-3 Viewing disks in disk groups with V$ASM_DISK

This is an example of the use of the V$ASM_DISK and V$ASM_DISKGROUP views run onan Oracle ASM instance. The example displays the disks associated with a disk group,plus the mount status, state, and failure group of the disks.

SELECT SUBSTR(dg.name,1,16) AS diskgroup, SUBSTR(d.name,1,16) AS asmdisk, d.mount_status, d.state, SUBSTR(d.failgroup,1,16) AS failgroup FROM V$ASM_DISKGROUP dg, V$ASM_DISK d WHERE dg.group_number = d.group_number;

DISKGROUP ASMDISK MOUNT_S STATE FAILGROUP---------------- ---------------- ------- -------- ----------------DATA DATA_0008 CACHED NORMAL DATA_0008DATA DATA_0000 CACHED NORMAL DATA_0000DATA DATA_0004 CACHED NORMAL DATA_0004DATA DATA_0015 CACHED NORMAL DATA_0015DATA DATA_0003 CACHED NORMAL DATA_0003DATA DATA_0012 CACHED NORMAL DATA_0012DATA DATA_0017 CACHED NORMAL DATA_0017DATA DATA_0013 CACHED NORMAL DATA_0013DATA DATA_0007 CACHED NORMAL DATA_0007DATA DATA_0014 CACHED NORMAL DATA_0014DATA DATA_0009 CACHED NORMAL DATA_0009DATA DATA_0001 CACHED NORMAL DATA_0001DATA DATA_0016 CACHED NORMAL DATA_0016DATA DATA_0011 CACHED NORMAL DATA_0011DATA DATA_0005 CACHED NORMAL DATA_0005DATA DATA_0010 CACHED NORMAL DATA_0010DATA DATA_0002 CACHED NORMAL DATA_0002DATA DATA_0006 CACHED NORMAL DATA_0006FRA FRA_0012 CACHED NORMAL FRA_0012FRA FRA_0013 CACHED NORMAL FRA_0013FRA FRA_0007 CACHED NORMAL FRA_0007FRA FRA_0006 CACHED NORMAL FRA_0006FRA FRA_0010 CACHED NORMAL FRA_0010FRA FRA_0000 CACHED NORMAL FRA_0000

Chapter 6Views Containing Oracle ASM Information

6-4

Page 202: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

FRA FRA_0003 CACHED NORMAL FRA_0003...

Example 6-4 Viewing disks in disk groups with V$ASM_DISK_STAT

This is an example of the use of the V$ASM_DISK_STAT and V$ASM_DISKGROUP_STAT views runon an Oracle ASM instance. The example displays the disks associated with a specific diskgroup along with the mount status, state, and various read and write statistics.

SELECT SUBSTR(dgs.name,1,10) AS diskgroup, SUBSTR(ds.name,1,10) AS asmdisk, ds.mount_status, ds.state, ds.reads, ds.writes, ds.read_time, ds.write_time, bytes_read, bytes_written FROM V$ASM_DISKGROUP_STAT dgs, V$ASM_DISK_STAT ds WHERE dgs.group_number = ds.group_number AND dgs.name = 'DATA';

DISKGROUP ASMDISK MOUNT_S STATE READS WRITES READ_TIME WRITE_TIME BYTES_READ BYTES_WRITTEN---------- ---------- ------- ------- ------ ------ --------- ---------- ---------- -------------DATA DATA_0000 CACHED NORMAL 841 10407 1.212218 3.511977 23818240 178369024DATA DATA_0008 CACHED NORMAL 26065 1319 1.592524 .297728 436203520 38358528DATA DATA_0010 CACHED NORMAL 561 868 .794849 .337575 18631680 22584320DATA DATA_0004 CACHED NORMAL 695 10512 1.282711 3.351801 23240704 177246208DATA DATA_0006 CACHED NORMAL 484 1642 1.506733 .45724 19857408 30191616DATA DATA_0016 CACHED NORMAL 583 1028 2.283268 .263629 21012480 17682432DATA DATA_0007 CACHED NORMAL 724 2316 1.259379 .546318 26017792 42283008DATA DATA_0009 CACHED NORMAL 537 757 1.146663 .241434 19893248 20633088DATA DATA_0014 CACHED NORMAL 1049 1464 7.346259 .677313 25378816 27578368DATA DATA_0017 CACHED NORMAL 1440 1326 1.132886 2.541013 25899008 26537984DATA DATA_0013 CACHED NORMAL 714 1391 1.527926 .371432 18169856 22814720DATA DATA_0001 CACHED NORMAL 713 807 .790505 .219565 20406272 28561408DATA DATA_0012 CACHED NORMAL 617 1206 1.016893 3.60425 24477696 25391104DATA DATA_0003 CACHED NORMAL 15567 11500 5.642053 3.328861 266956800 183625728DATA DATA_0015 CACHED NORMAL 642 1357 2.545441 .403455 22179840 24973312DATA DATA_0011 CACHED NORMAL 7585 1685 1.121678 .359123 135217152 37572608DATA DATA_0005 CACHED NORMAL 513 1431 1.007476 .47202 26427392 21344256DATA DATA_0002 CACHED NORMAL 11368 2196 1.209433 .861601 199213056 32090624

Example 6-5 Viewing disk group clients with V$ASM_CLIENT

This is an example of the use of the V$ASM_CLIENT and V$ASM_DISKGROUP views on an OracleASM instance. The example displays disk groups with information about the connecteddatabase client instances.

SELECT dg.name AS diskgroup, SUBSTR(c.instance_name,1,12) AS instance, SUBSTR(c.db_name,1,12) AS dbname, SUBSTR(c.SOFTWARE_VERSION,1,12) AS software, SUBSTR(c.COMPATIBLE_VERSION,1,12) AS compatible FROM V$ASM_DISKGROUP dg, V$ASM_CLIENT c WHERE dg.group_number = c.group_number; DISKGROUP INSTANCE DBNAME SOFTWARE COMPATIBLE------------------------------ ------------ -------- ------------ ------------DATA +ASM +ASM 19.0.0.0.0 19.0.0.0.0DATA orcl orcl 19.0.0.0.0 19.0.0.0.0DATA +ASM asmvol 19.0.0.0.0 19.0.0.0.0FRA orcl orcl 19.0.0.0.0 19.0.0.0.0...

Viewing Oracle ASM File Access Control InformationYou can view information about Oracle ASM File Access Control in the columns of theV$ASM_USER, V$ASM_USERGROUP, V$ASM_USERGROUP_MEMBER, and V$ASM_FILE views.

Chapter 6Viewing Oracle ASM File Access Control Information

6-5

Page 203: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

For more information about Oracle ASM File Access Control, see Managing OracleASM File Access Control for Disk Groups.

Example 6-6 Viewing Oracle ASM File Access Control information with V$ASM_USER

This example shows information about Oracle ASM File Access Control usersdisplayed in the V$ASM_USER view.

SELECT dg.name AS diskgroup, u.group_number, u.user_number, u.os_id, u.os_name FROM V$ASM_DISKGROUP dg, V$ASM_USER u WHERE dg.group_number = u.group_number AND dg.name = 'DATA';

DISKGROUP GROUP_NUMBER USER_NUMBER OS_ID OS_NAME--------------- ------------ ----------- ----- -------DATA 1 1 1001 oracle1DATA 1 2 1002 oracle2DATA 1 3 1003 grid

Example 6-7 Viewing File Access Control information with V$ASM_USERGROUP

This example shows information about Oracle ASM File Access Control user groupsdisplayed in the V$ASM_USERGROUP view.

SELECT dg.name AS diskgroup, ug.group_number, ug.owner_number, u.os_name, ug.usergroup_number, ug.name FROM V$ASM_DISKGROUP dg, V$ASM_USER u, V$ASM_USERGROUP ug WHERE dg.group_number = ug.group_number AND dg.name = 'DATA' AND ug.owner_number = u.user_number;

DISKGROUP GROUP_NUMBER OWNER_NUMBER OS_NAME USERGROUP_NUMBER NAME----------------- ------------ ------------ --------------- ---------------- --------DATA 1 3 grid 1 asm_data

Example 6-8 Viewing File Access Control information with V$ASM_USERGROUP_MEMBER

This example shows information about Oracle ASM File Access Control user groupsand members displayed in the V$ASM_USERGROUP_MEMBER view.

SELECT dg.name AS diskgroup, um.group_number, um.member_number, u.os_name, um.usergroup_number, ug.name FROM V$ASM_DISKGROUP dg, V$ASM_USER u, V$ASM_USERGROUP_MEMBER um, V$ASM_USERGROUP ug WHERE dg.group_number = um.group_number AND dg.group_number = ug.group_number AND dg.group_number = u.group_number AND dg.name = 'DATA' AND um.member_number = u.user_number AND um.usergroup_number = ug.usergroup_number;

DISKGROUP GROUP_NUMBER MEMBER_NUMBER OS_NAME USERGROUP_NUMBER NAME--------------- ------------ ------------- ------------------ ---------------- --------DATA 1 1 oracle1 1 asm_dataDATA 1 2 oracle2 1 asm_data

Example 6-9 Viewing Oracle ASM File Access Control information with V$ASM_FILE

This example shows information about Oracle ASM File Access Control filepermissions displayed in the V$ASM_FILE view.

SELECT dg.name AS diskgroup, a.name, f.permissions, f.user_number, u.os_name, f.usergroup_number, ug.name FROM V$ASM_DISKGROUP dg, V$ASM_USER u, V$ASM_USERGROUP ug, V$ASM_FILE f, V$ASM_ALIAS a WHERE dg.name = 'FRA' AND dg.group_number = u.group_number AND u.group_number = ug.group_number AND ug.group_number = f.group_number AND f.group_number = a.group_number AND f.usergroup_number = ug.usergroup_number AND f.user_number = u.user_number AND f.file_number = a.file_number;

Chapter 6Viewing Oracle ASM File Access Control Information

6-6

Page 204: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

DISKGROUP NAME PERMISSIONS USER_NUMBER OS_NAME USERGROUP_NUMBER NAME--------- ---------------------- ----------- ----------- ------- ---------------- -------DATA USERS.259.685366091 rw-r----- 3 grid 1 asm_fra DATA TEMP.264.685366227 rw-r----- 3 grid 1 asm_fra ...

Chapter 6Viewing Oracle ASM File Access Control Information

6-7

Page 205: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

7Administering Oracle ASM with OracleEnterprise Manager

Oracle Enterprise Manager Cloud Control provides tools for administering Oracle ASM.

This chapter describes how to administer Oracle Automatic Storage Management (OracleASM) with Oracle Enterprise Manager Cloud Control.

This chapter contains the following topics:

• Accessing the Oracle Automatic Storage Management Home Page

• Configuring Oracle ASM Initialization Parameters with Oracle Enterprise Manager

• Managing Oracle ASM Users with Oracle Enterprise Manager

• Managing Disk Groups with Oracle Enterprise Manager

• Managing Oracle ASM File Access Control with Oracle Enterprise Manager

• Managing Directories, Files, and Aliases with Oracle Enterprise Manager

• Managing Disk Group Templates with Oracle Enterprise Manager

• Managing Oracle ASM Filter Driver With Oracle Enterprise Manager

• Monitoring Oracle ASM Performance With Oracle Enterprise Manager

• Backing Up Oracle ASM Files with Oracle Enterprise Manager

• Performing Bad Block Recovery with Oracle Enterprise Manager

• Migrating to Oracle ASM with Oracle Enterprise Manager

• Monitoring Alerts and Incidents With Oracle ASM Support Workbench

• Monitoring Oracle Flex ASM

See Also:

Oracle Enterprise Manager Cloud Control Administrator's Guide

Accessing the Oracle Automatic Storage Management HomePage

All Oracle ASM administration tasks begin with the Oracle Automatic Storage Managementhome page in Oracle Enterprise Manager Cloud Control. The Oracle Automatic StorageManagement home page displays:

• The status of the Oracle ASM instance.

7-1

Page 206: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• A chart that shows the used and free space of each disk group and disk groupinternal usage.

• A list of databases that are serviced by the Oracle ASM instance.

• A list of Oracle Automatic Storage Management Cluster File System (OracleACFS) file systems that are serviced by the Oracle ASM instance.

• A list of other non-Oracle ACFS volumes.

• A list of alerts for the Oracle ASM instance and the host computer.

• Links to the Oracle ASM Performance, Disk Groups, Configuration, Users, andOracle ACFS pages.

To access the Oracle Automatic Storage Management home page on a single-instance system:

1. Log in to Oracle Enterprise Manager Cloud Control.

2. Under the Targets drop down menu at the top of the page, select All Targets.

3. In the lists of targets on the All Targets page, click the target for the Oracle ASMinstance.

4. If prompted for Oracle ASM login credentials, then enter the user SYS, provide theSYS password that was set for the Oracle ASM instance during installation, andconnect as SYSASM. The Oracle Automatic Storage Management home pagedisplays.

For more information about authentication, refer to Authentication for AccessingOracle ASM Instances.

Configuring Oracle ASM Initialization Parameters withOracle Enterprise Manager

You can configure Oracle ASM with the Oracle Enterprise Manager ConfigurationParameters page.

To configure the Oracle ASM instance:

1. Access the Oracle Automatic Storage Management home page.

2. Click the Configuration link at the top of the page to view the ConfigurationParameters page.

3. Update the configuration options on the page as follows:

• Disk Discovery Path (ASM_DISKSTRING initialization parameter)

Enter a string value.

• Auto Mount Disk Groups (ASM_DISKGROUPS initialization parameter)

Enter a string value.

• Rebalance Power (ASM_POWER_LIMIT initialization parameter)

Enter an integer value.

• Preferred Read Failure Groups (Only in Oracle RAC environments)(ASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter)

Chapter 7Configuring Oracle ASM Initialization Parameters with Oracle Enterprise Manager

7-2

Page 207: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Enter a comma-delimited string of values in which each string represents a failuregroup. This parameter is generally used only for clustered Oracle ASM instances.

4. Click Apply to save your changes or click Revert to discard any changes made on thepage.

See Also:

• Accessing the Oracle Automatic Storage Management Home Page forinstructions on accessing the Oracle Automatic Storage Management homepage

• ASM_DISKSTRING for information about the ASM_DISKSTRING initializationparameter

• ASM_DISKGROUPS for information about the ASM_DISKGROUPS initializationparameter

• ASM_POWER_LIMIT for information about the ASM_POWER_LIMIT initializationparameter

• ASM_PREFERRED_READ_FAILURE_GROUPS for information about theASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter

Managing Oracle ASM Users with Oracle Enterprise ManagerYou can manage Oracle ASM users with the Oracle Enterprise Manager Users page

. Access this page by clicking the Users tab that is near the top center of the OracleAutomatic Storage Management home page.

To manage Oracle ASM users:

1. Access the Oracle Automatic Storage Management home page.

2. Click the Users link at the top to view the Users property page.

ASMSNMP is a less privileged user that is primarily used by Oracle Enterprise Manager tomonitor Oracle ASM instances. This account is granted the SYSDBA privilege. ASMSNMP iscreated by Oracle ASM Configuration Assistant (ASMCA) when an Oracle ASM instanceis created.

Click Create to add a new Oracle ASM user. When you add users, Oracle EnterpriseManager displays a Create User page in which you must enter user login credentials thatinclude the user name, password, and password confirmation. You can also grantprivileges to the new user by selecting privileges in the Available Privileges column andclicking the right arrow buttons to move privileges to the Granted Privileges column, ormove the privilege by double clicking it. The available privileges include SYSDBA,SYSOPER, and SYSASM. Click OK to create the user, Cancel to cancel the procedure,or Show SQL to view the SQL that Oracle Enterprise Manager uses to create the user.

3. To edit a user's properties, select the box in the Select column of the user to edit, thenclick Edit. On the Edit User page, modify the password if needed. You can also alter theprivileges that are assigned to the user by selecting the privilege and using the right andleft arrow buttons to move the privilege from the Granted Privileges column to theAvailable Privileges column and vice versa. You can also move the privilege by double

Chapter 7Managing Oracle ASM Users with Oracle Enterprise Manager

7-3

Page 208: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

clicking it. Click OK to edit the user properties, Revert to cancel the procedure, orShow SQL to view the SQL that Oracle Enterprise Manager uses to edit the user'sproperties.

4. To delete an Oracle ASM user, select the box in the Select column for the user todelete, then click Delete. On the confirmation dialog, click Yes to delete the useror No to stop the user deletion procedure.

See Also:

• Accessing the Oracle Automatic Storage Management Home Page forinstructions on accessing the Oracle Automatic Storage Managementhome page

• Creating Oracle ASM Instances with ASMCA for information aboutcreating an Oracle ASM instance with ASMCA

• Authentication for Accessing Oracle ASM Instances for information aboutauthentication for Oracle ASM instances

• Oracle Grid Infrastructure Installation and Upgrade Guide for informationabout installing Oracle ASM

• Oracle Database Installation Guide for information about reviewingdatabase accounts and passwords

Managing Disk Groups with Oracle Enterprise ManagerThis section describes how to manage disk groups under the following topics:

• Creating Disk Groups

• Adding Disks to Disk Groups

• Dropping Disks from Disk Groups

• Bringing Disks Online and Offline

• Dropping Disk Groups

• Monitoring Disk Group Usage

• Mounting and Dismounting Disk Groups

• Administering Advanced Disk Group Properties

• Specifying a Power Limit For Disk Online

• Replacing An Existing Disk With a New Disk

• Setting and Modifying Content Type for the Disk Group

• Setting and Modifying the Failure Group Repair Time

• Running Rebalance on Multiple Disk Groups

• Viewing Rebalance Process Related Data

• Setting and Modifying the Thin Provisioned Disk Group Attribute

• Running the On Demand Scrubbing Process

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-4

Page 209: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• Determining Whether Scrubbing Process Is Running

For more information about managing Oracle ASM disk groups, refer to Administering OracleASM Disk Groups

Creating Disk GroupsYou can create disk groups with Oracle Enterprise Manager.

You can create additional Oracle ASM disk groups to:

• Have disk groups with different redundancy levels (normal, high, or external), dependingon availability requirements and storage system capabilities.

• Separate different classes of storage, such as SCSI drives and SATA drives, into differentdisk groups. Disks in a disk group should have similar size and performancecharacteristics.

• Store the fast recovery area in a separate disk group from the database.

To create a disk group:

1. Access the Oracle Automatic Storage Management home page.

2. Click the Disk Groups link at the top of the page to display the Disk Groups propertypage.

3. If you are not logged in, then the Log In page appears and you should log in as the SYSuser, connecting as SYSASM. Provide the SYS password for the Oracle ASM instance. Thispassword was set up when the Oracle ASM instance was created.

4. Click Create and Oracle Enterprise Manager displays a Create Disk Group page. TheCreate Disk Group page displays a list of Oracle ASM disks that are available to beadded to a disk group. This includes disks with a header status of CANDIDATE,PROVISIONED, or FORMER, and so on.

5. To display not only disks that are available to be added to a disk group, but all OracleASM disks, including disks that belong to a disk group (header status = MEMBER), selectAll Disks from the Select Member Disks list.

The page is re-displayed with the complete list of Oracle ASM disks that were discoveredby the Oracle ASM instance.

6. Enter the disk name, select a redundancy type (high, normal, or external), and optionally,you can enter a failure group name.

7. Select disks as follows:

• Select the box to the left of each disk to be included in the new disk group.

• Optionally, you can enter a disk name, the size of the disk for Oracle ASM to use,and the failure group name.

• To force the inclusion of a disk in the disk group, select the Force Usage box for thatdisk.

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-5

Page 210: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Caution:

Selecting the Force Usage box causes the disk to be added to thenew disk group even if the disk belongs to another disk group andhas valid database data. The existing data is then lost. You must becertain that you are selecting a disk that can legitimately be added tothe disk group.

8. Specify a Disk Compatibility value for the disk group to enable your system touse the latest Oracle ASM features.

Note:

You cannot reverse the setting of a disk group compatibility value.

9. Click OK to create the disk group or click Cancel to stop the disk group creationoperation. You can also click Show SQL to show the SQL statements that the diskgroup creation operation uses.

See Also:

• Accessing the Oracle Automatic Storage Management Home Page forinstructions on accessing the Oracle Automatic Storage Managementhome page

• Creating Disk Groups for information about using the FORCE option whencreating disk groups

• Configuring Disk Group Compatibility Attributes for information aboutconfiguring disk group compatibility attributes

• Disk Group Compatibility for information about disk group compatibilityattributes

• Creating Disk Groups for more information about creating disk groups

Adding Disks to Disk GroupsYou can add disks to disk groups with Oracle Enterprise Manager.

You can add disks to a disk group to increase the storage space in a disk group. If youadd multiple disks in a single operation, then Oracle ASM rebalances the disk group toevenly distribute the data on all disks, including the newly added disks.

You can control the power of a rebalance operation with the setting of the RebalancePower. The higher the number, the faster the rebalance operation completes. Lowernumbers cause rebalancing to take longer, but consume fewer processing and I/Oresources. This leaves these resources available for the database. The default valueof 1 minimizes disruption to the database.

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-6

Page 211: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

A value of 0 blocks the rebalance operation. Manual or automatic rebalance can then occurlater. You might want to postpone rebalancing until there are fewer demands on thedatabase, or when you have completed all of your disk group changes.

To add one or more disks to a disk group:

1. Access the Oracle Automatic Storage Management home page.

2. Click the Disk Groups link to display the Disk Groups property page.

3. If the Oracle ASM Login page appears, then log in as the SYS user, connecting as SYSASM.Provide the SYS password for the Oracle ASM instance. This password was set up whenthe Oracle ASM instance was created.

4. Click a link in the Name column to select the disk group to which you want to add disks.The Disk Group page appears, displaying a list of disks that are in the disk group.

5. Click Add and Oracle Enterprise Manager displays the Add Disks page. This pagedisplays a list of Oracle ASM disks that are available to be added to the disk group. Thisincludes disks with the header status of CANDIDATE, PROVISIONED, or FORMER, and so on.

6. To display not only disks that are available to be added to a disk group, but all of theOracle ASM disks, including disks that belong to a disk group (header status = MEMBER),select All Disks from the Select Member Disks drop-down list on the right hand side ofthe page. Oracle Enterprise Manager re-displays the page with the complete list ofOracle ASM disks that were discovered by the Oracle ASM instance.

7. Optionally change the rebalance power by selecting a value from the Rebalance Powerlist.

8. Select disks as follows:

• Check the box to the left of each disk to be added to the disk group.

• To force the inclusion of a disk in the disk group, select the Force Reuse box in theright-most column.

Caution:

The Force Reuse box causes the disk to be added to the disk group even ifthe disk belongs to another disk group and has valid database data. Theexisting data is then lost. You must be certain that you are selecting a diskthat can legitimately be added to the disk group.

• Optionally enter an Oracle ASM disk name for each disk. Oracle ASM provides aname if you do not.

9. Click OK to add the selected disks.

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-7

Page 212: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Accessing the Oracle Automatic Storage Management Home Page forinstructions on accessing the Oracle Automatic Storage Managementhome page

• Manually Rebalancing Disk Groups and Tuning Rebalance Operationsfor information about controlling rebalance operations

• ASM_POWER_LIMIT for information about rebalance power settingsand the ASM_POWER_LIMIT initialization parameter

• Adding Disks to a Disk Group for an example of using the FORCE option

• Altering Disk Groups for more information about modifying disk groupproperties

Bringing Disks Online and OfflinePerform the following procedures to bring a disk online or offline:

1. Access the Oracle Automatic Storage Management home page.

See Accessing the Oracle Automatic Storage Management Home Page forinstructions.

2. Click the Disk Groups link at the top of the page to view the Disk Groups page.

Click the name of a disk in the Name column and Oracle Enterprise Managerdisplays the General page for the disk group to modify.

3. To bring a disk online, select the disk to bring online and click Online. If you bringa disk online, then Oracle ASM performs the following:

• Oracle ASM performs the online operation on the selected disks. You canselect one or more or disks, or all of the disks to bring online. If you select allof the disks, then Oracle uses the ALL keyword for this operation. Otherwise,only the selected disks are affected by the online operation.

• During the online process, Oracle Enterprise Manager first places a disk intoonline mode to accommodate write operations. Then Oracle EnterpriseManager resynchronizes stale data on the disk with the current data until thedisk is fully online for read operations; this is the Oracle ASM fast mirrorresync feature.

• You can also choose the By Failure Group view to perform this operation on aselected disk group. In this case, Oracle uses the SQL for disks in failuregroup.

• You can also select a disk that is online, but Oracle Enterprise Managerignores that selection and only brings disks online that were previously offline.

• Click Yes on the Oracle Enterprise Manager Confirmation dialog to beginbringing the disk online or click No to cancel the operation. You can also clickShow SQL to review the SQL that Oracle Enterprise Manager uses for theonline operation.

4. To take a disk offline, select the disk to take offline and click Offline. If you bring adisk offline, then Oracle ASM performs the following:

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-8

Page 213: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• Depending on how much data is stale, the operation may require additional time tocomplete. You can monitor the operation's progress using the Pending Operationslink from the Disk Group home page.

• The value that you set for Rebalance Power using ASM_POWER_LIMIT must be a wholenumber. The text on the page describes how the value of Rebalance Power affectsthe fast mirror resync operation. If the ASM_POWER_LIMIT is set to 0, then Oracle ASMdoes not perform automatic rebalance. For information about rebalance powersettings and the ASM_POWER_LIMIT initialization parameter, refer to"ASM_POWER_LIMIT".

• By default, the Rebalance Power value uses the value of the ASM_POWER_LIMITinitialization parameter.

• Oracle Enterprise Manager displays an Offline Confirmation page and the text on thispage explains that after Oracle Enterprise Manager takes the selected disks offline,the Oracle ASM instance waits for the time interval that is specified by the value thatyou have set for the DISK_REPAIR_TIME initialization parameter before Oracle ASMdrops the disks. During the disk repair time period, you can repair the disks and thenplace them back online. For each disk that you successfully place online, the pendingdrop operation is canceled and a resynchronization operation begins.

• If you have set DISK_REPAIR_TIME to a large value, for example, greater than oneday, then this increases the possibility of data loss. This is because the files in thedisk group are protected with a lower degree of redundancy during this period.

Click Yes on the Oracle Enterprise Manager Conformation dialog to begin the offlineprocessing or click No to stop the operation. You can also click Show SQL to see theSQL that Oracle Enterprise Manager uses for the offline operation.

Dropping Disks from Disk GroupsYou can drop disks from disk groups with Oracle Enterprise Manager.

When you drop a disk from a disk group, Oracle ASM rebalances the disk group by movingall of the file extents from the dropped disk to other disks in the disk group. Oracle ASM thenreleases the disk and you can then add the disk to another disk group or use it for otherpurposes. You can drop one or more disks in a single operation. You can also optionally setrebalance power for the drop operation. The following is a list of possible reasons fordropping a disk:

• A disk is starting to fail and you must replace it

• To upgrade a disk

• To reallocate the disk to a different disk group or reallocate the disk to a different storagesystem

Note:

Dropping disks from a disk group only logically deletes the disks from the diskgroup. It does not delete the disk contents. However, the contents are lost when youadd the disk to a new disk group.

To drop one or more disks from a disk group:

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-9

Page 214: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

1. Access the Oracle Automatic Storage Management home page.

2. Click the Disk Groups link to display the Disk Groups property page.

3. If the Oracle Automatic Storage Management Login page appears, log in as theSYS user, connecting as SYSASM. Provide the SYS password for the Oracle ASMinstance. This password was set up when the Oracle ASM instance was created.

4. Click a link in the Name column to select the disk group that contains the disks tobe dropped.

The Disk Group page appears.

5. Under the Member Disks heading, in the Select column, select the boxes for thedisks that you plan to drop, and then click Remove.

A confirmation page appears.

6. To change the rebalance power, or to set the FORCE option for dropping disks, dothe following:

a. Click Show Advanced Options.

b. Optionally select the Force option or select a rebalance power in theRebalance Power list.

Note:

You might need the FORCE option if Oracle ASM cannot read from or writeto the disk.

7. Click Yes to drop the disks.

The Disk Group page returns, and displays a state of DROPPING for each diskbeing dropped.

8. Refresh the page until the dropped disks no longer appear in the disk group.

Caution:

You cannot reuse or disconnect the dropped disks until the drop andrebalance operations are complete. Operations are complete when thedropped disks no longer appear in the disk group.

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-10

Page 215: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Accessing the Oracle Automatic Storage Management Home Page forinstructions about accessing the Oracle Automatic Storage Management homepage

• Dropping Disks from Disk Groups for information about using the FORCE optionwhen dropping disk groups

• Dropping Disks from Disk Groups for more information about dropping disks

Dropping Disk GroupsWhen you drop a disk group, you delete the disk group optionally with all of its files. Youcannot drop a disk group if any of its database files are open. Oracle ASM deletes all of thedisk group contents only if you specify the including contents option. After dropping a diskgroup, you can add its member disks to other disk groups or use them for other purposes.

One reason to drop a disk group is to change the redundancy level (normal, high, orexternal). Because you cannot change the redundancy of a disk group, you must drop thedisk group and then re-create it with the proper redundancy. In this case, you must back up ormove disk group data before you drop the disk group.

To drop a disk group:

1. Access the Oracle ASM home page.

See "Accessing the Oracle Automatic Storage Management Home Page" for instructions.

2. Click the Disk Group tab to display the Disk Groups page.

3. If the Oracle ASM Login page appears, log in as the SYS user, connecting as SYSASM.Provide the SYS password for the Oracle ASM instance. This password was set up whenthe Oracle ASM instance was created.

4. Click the box in the Select column to select a disk group that you plan to drop.

5. Click Delete and the confirmation page appears.

6. To delete the disk group even if it still contains files, click Show Advanced Options andensure that the Including Contents option is selected. If the disk group contains filesand the Including Contents option is not selected, then you cannot drop the disk group.

7. To delete a disk group that belongs to a disk group that you cannot mount, use the FORCEoption in the Advanced Options confirmation dialog. The FORCE option applies to theDISMOUNTED disk group only. This option enables you to delete a disk header and mark itas FORMER.

Caution:

Use extreme care when using the FORCE option because the Oracle ASMinstance does not verify whether the disk group is used by any other OracleASM instance before Oracle ASM deletes the disk group.

8. On the confirmation page, click Yes.

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-11

Page 216: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

For more information about dropping disks, see "Dropping Disk Groups".

Monitoring Disk Group UsagePerform the following procedures to monitor disk group usage:

To view Oracle ASM disk group usage and free space:

1. Access the Oracle Automatic Storage Management home page.

See "Accessing the Oracle Automatic Storage Management Home Page" forinstructions.

2. Click the Disk Groups link to view the Disk Groups property page.

3. If the Oracle ASM Login page appears, then log in as the SYS user, connecting asSYSASM. Provide the SYS password that was set up for Oracle ASM when theOracle ASM instance was created.

The Disk Group list page displays all of the disk groups and their space usageinformation.

The Usable Free column displays the space in megabytes that is available in the diskgroup. The values in this column consider the redundancy level of the disk group, andexclude the space that the disk group reserves for restoring full redundancy for all filesin the disk group after a disk failure.

For more information, see "Managing Capacity in Disk Groups" and "Views ContainingOracle ASM Disk Group Information"

Mounting and Dismounting Disk GroupsUse the FORCE option to mount a disk group when there are missing disks or missingfailure groups. The FORCE option corrects configuration errors, such as incorrect valuesfor ASM_DISKSTRING, without incurring unnecessary rebalance operations. Disk groupsmounted with the FORCE option have one or more disks offline if the disks were notavailable at the time of the mount. You must take corrective action to restore thosedevices before the time set with the DISK_REPAIR_TIME value expires. Failing to restoreand put those disks back online within the disk repair time frame results in Oracle ASMautomatically removing the disks from the disk group. This would then require arebalance operation to restore redundancy for all of the files in the disk group. Performthe following procedures to mount a disk with the FORCE option:

1. From the Oracle ASM home page click the Disk Groups tab.

2. Select the disk group that has a disk that you must repair and click Dismount.Click OK on the Dismount confirmation dialog. The State column of the DiskGroup home page should show the Status as DISMOUNTED.

3. Perform any needed repairs to the disk in the disk group.

4. Click the box in the Select column next to the disk that you plan to force mount,then click Mount.

5. On the Disk Mount Confirmation dialog, click the Show Advanced Options link.

6. On the Mount Force Confirmation dialog, select the Force option and click Yes.You can also click No to cancel the mount force operation and Show SQL toreview the SQL that Oracle Enterprise Manager uses to perform the mount forceoperation.

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-12

Page 217: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Administering Advanced Disk Group PropertiesThis section explains how to administer advanced disk group properties.

Perform the following steps to change the values for disk group attributes that can be alteredafter the disk group has been created.

1. On the Automatic Storage Disk Group List page, click a disk group name and OracleEnterprise Manager displays the Disk Group home page.

2. Click Edit under the Advanced Attributes section.

The topics contained in this section are:

• Configuring Disk Group Compatibility Attributes

• Configuring Disk Repair Time

• Configuring Smart Scan Compatibility

• Configuring File Access Control

Configuring Disk Group Compatibility AttributesSpecify a Disk Compatibility value for the disk group to enable your system to use the latestOracle ASM features.

Note:

You cannot reverse the setting of a disk group compatibility value.

• ASM Compatibility

Specify the value that is the minimum software version required for an Oracle ASMinstance to mount this disk group.

• Database Compatibility

Specify a value that must be less than or equal to the Oracle ASM compatibility. This isthe minimum software version that is required for a database instance to use the files inthe disk group. If the database compatibility value that you use is greater than the OracleASM compatibility, then Oracle Enterprise Manager displays an error.

Note:

You cannot modify the database compatibility for an Oracle ASM cluster that isin a rolling migration state.

• ASM Volume

Specify a value that is 11.2 or greater to use the Oracle ASM Dynamic Volume Manager(Oracle ADVM) functionality. The ASM compatibility of the disk group must be set to 11.2or greater to enable Oracle ADVM. Also, the Oracle ADVM volume drivers must beloaded in the supported environment.

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-13

Page 218: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

For information about disk group compatibility attributes, see "Disk GroupCompatibility".

Configuring Disk Repair TimeSpecify a time period that is long enough for you to repair a disk in the disk group.

For information about disk group repair time, see "Oracle ASM Fast Mirror Resync".

Configuring Smart Scan CompatibilitySpecify to disable or enable smart scan compatibility for the disk group.

This attribute is only applicable to Oracle Exadata storage.

See Also:

Oracle Exadata documentation for information about theCELL.SMART_SCAN_CAPABLE attribute

Configuring File Access ControlSpecify to disable or enable Oracle ASM File Access Control. If Oracle ASM FileAccess Control is enabled, then specify the default permissions for newly created filesin the disk group.

For information about Oracle ASM File Access Control, see "Managing Oracle ASMFile Access Control for Disk Groups".

Specifying a Power Limit For Disk OnlineTo specify a power limit for disk online, follow these steps:

1. Access the Oracle Automatic Storage Management home page.

2. Select the Disk Groups tab. The Disk Groups page is displayed.

3. Select a disk group. The Disk Group page appears and shows all Member Disksthat belong to the disk group in the Member Disks table.

4. Select a disk, then click Online. The online confirmation page is displayed with theadvance option to specify a power limit.

5. Specify the Power Limit, then click Submit. The disk is set to online with thespecified power limit.

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-14

Page 219: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Accessing the Oracle Automatic Storage Management Home Page forinstructions about accessing the Oracle ASM home page

• Manually Rebalancing Disk Groups for information about the power option inrebalancing a disk group

• ASM_POWER_LIMIT for information about the ASM_POWER_LIMIT initializationparameter

Replacing An Existing Disk With a New DiskTo replace an existing disk with a new disk, follow these steps:

1. Access the Oracle Automatic Storage Management home page.

See "Accessing the Oracle Automatic Storage Management Home Page" for instructions.

2. Click the Disk Group tab. The Disk Group page displays.

3. Select a Disk Group. The Disk Group page appears which shows all Member Disks thatbelong to the disk group.

4. Select an offline disk to replace. The Replace Disks page is displayed.

Select a new disk of size equal to or greater than the original disk being replaced toensure the same level of data protection.

5. Select a new disk and then specify the options, such as Rebalance Power, and then clickOK. The disk is then replaced. Rebalance operations redistribute data evenly across alldrives. Oracle ASM automatically rebalances a disk group whenever disks are added ordropped. To manually rebalance all disk groups, you must specify the Rebalance Power.Higher values use more I/O bandwidth and complete rebalance more quickly. Lowervalues cause rebalance to take longer, but use less I/O bandwidth. Values range from 0to 1024.

For additional information about replacing a disk, refer to "Replacing Disks in Disk Groups".

Setting and Modifying Content Type for the Disk GroupTo set and modify the content type for a disk group, follow these steps:

1. Access the Oracle Automatic Storage Management home page.

See "Accessing the Oracle Automatic Storage Management Home Page" for instructions.

2. Click the Disk Groups tab. The Disk Group page displays.

3. Click Create. In the Disk Resync Attributes section of the Create Disk Group page, youcan select the value Recovery, Data or System from the Content Type drop-down list.The attribute can be set only if the ASM compatibility is greater than or equal to 12.1.0.0.

4. To edit the content type for an existing disk group, navigate to the Disk Group home pageby clicking the disk group in the Disk Groups table. The Disk Group home page displays.

5. Click Edit in the Advanced Attribute Section. The Edit Advanced Attributes for DiskGroup page appears. In the Disk Resync Attributes section, select from the valuesRecovery, Data, or System from the Content Type drop-down list.

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-15

Page 220: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

For information about the CONTENT.TYPE disk group attribute, refer to"CONTENT.TYPE".

Setting and Modifying the Failure Group Repair TimeTo set and modify the Failure Group Repair Time, follow these steps:

1. Access the Oracle Automatic Storage Management home page.

See "Accessing the Oracle Automatic Storage Management Home Page" forinstructions.

2. Click the Disk Groups tab. The Disk Groups page displays.

3. Click Create. Specify the repair time for the Failure Group in the CandidateMember Disks table.

4. To edit an existing Failure Group repair time, from the Disk Group page choose theDisk Group for the repair time you want to modify. The Disk Group page appears.

5. In the Advanced Attributes section, click Edit. The Edit Advanced Attributes forDisk Group page displays.

6. In the Disk Resync Attributes section, modify the Failure Group Repair Time,then click OK. The failure Group Repair Time applies to all the failure groups in thedisk group except those containing only one disk. This value overrides the diskrepair time and is overridden by the actual value provided when a disk is takenoffline.

For additional information about setting and modifying the failure group repair time,refer to "Oracle ASM Fast Mirror Resync".

Running Rebalance on Multiple Disk GroupsEnterprise Manager enables you to rebalance on multiple disk groups and distributethe data copy across other member instances in the cluster. To run rebalance onmultiple disk groups, follow these steps:

1. Access the Oracle Automatic Storage Management home page.

See "Accessing the Oracle Automatic Storage Management Home Page" forinstructions.

2. Click the Disk Group tab. The Disk Group page displays.

3. Select multiple disk groups then click Rebalance. The Rebalance Disk GroupsConfirmation page appears where you can set the Rebalance Power by displayingAdvanced Options.

4. Set the Rebalance Power value, then click OK. The command to rebalance issubmitted.

For additional information about rebalancing disk groups, refer to "ManuallyRebalancing Disk Groups".

Viewing Rebalance Process Related DataTo view rebalance process-related data, including the number of participatinginstances on the Pending Operations page, follow these steps:

1. Access the Oracle Automatic Storage Management home page.

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-16

Page 221: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See "Accessing the Oracle Automatic Storage Management Home Page" for instructions.

2. Click the Disk Group tab. The Disk Groups page displays.

3. Click a Disk Group link. The Disk Group home page General section displays the numberof Pending Operations as a link to the Pending Operations page.

4. Click the link. Information on the rebalance process, along with details on the number ofparticipating instances, are displayed.

For additional information about rebalancing disk groups, refer to "Tuning RebalanceOperations".

Setting and Modifying the Thin Provisioned Disk Group AttributeTo set and modify the thin-provisioned disk group attribute, follow these steps:

1. Access the Oracle Automatic Storage Management home page.

See "Accessing the Oracle Automatic Storage Management Home Page" for instructions.

2. Click the Disk Groups tab. The Disk Groups page is displayed.

3. Click the Disk Group that contains the Thin Provisioned attribute you want to change. TheDisk Group page displays.

4. In the Advance Attributes section, click Edit. The Edit Advanced Attributes for Disk Grouppage displays.

5. In the Thin Provisioning section, select True or False from the Thin Provisioned fielddrop-down list. If thin provisioning is enabled, the disk space not in use can be returnedto the array. This attribute can be set only if the ASM compatibility is greater than or equalto 12.1.0.0.

For information about the THIN_PROVISIONED disk group attribute, refer to"THIN_PROVISIONED".

Running the On Demand Scrubbing ProcessTo run the On Demand scrubbing process, follow these steps:

1. Access the Oracle Automatic Storage Management home page.

See "Accessing the Oracle Automatic Storage Management Home Page" for instructions.

2. Click the Disk Group tab. The Disk Group page is displayed.

3. Click Scrub. The Scrub Disk Group page is displayed where you can use advancedoptions such as repair, power level, wait and force. You can also use the scrub action ondisks and files.

4. Provide the advance option and click OK. A background process is initiated that scrubsthe disk group.

For additional information about scrubbing disk groups, refer to "Scrubbing Disk Groups".

Determining Whether Scrubbing Process Is RunningTo determine whether the scrubbing process is running, follow these steps:

1. Access the Oracle Automatic Storage Management home page.

See "Accessing the Oracle Automatic Storage Management Home Page" for instructions.

Chapter 7Managing Disk Groups with Oracle Enterprise Manager

7-17

Page 222: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

2. Click the Disk Group tab. The Disk Group page displays.

3. Click a Disk Group link. The Disk Group General Section displays a PendingOperation link if a scrubbing process is ongoing.

4. Click the link. Details on the scrubbing process are displayed.

Managing Oracle ASM File Access Control with OracleEnterprise Manager

You can manage Oracle ASM File Access Control with Oracle Enterprise ManagerIntegration for Oracle ASM File Access Control.

To manage Oracle ASM File Access Control:

1. Access the Oracle Automatic Storage Management home page.

See "Accessing the Oracle Automatic Storage Management Home Page" forinstructions.

2. Click the Disk Groups link to display the Disk Groups property page.

3. Click a link in the Name column to select a disk group.

4. Click the Access Control tab to display the Access Control page.

On this page, you can add, remove, or replace users from a user group and createor delete user groups. You can also modify the ownership or permission of files.

To access files in a disk group, operating system users must be granted accessprivileges to the disk group. After granted access privileges, users can be addedas members of groups. The operating system user who owns the oracle binary forthe database instance is automatically added and cannot be removed.

Oracle ASM File Access Control operations on this page are available when thefiles are open.

For more information about Oracle ASM File Access Control, see "Managing OracleASM File Access Control for Disk Groups".

Managing Directories, Files, and Aliases with OracleEnterprise Manager

You can manage directories, files, and aliases with the Files tab of the OracleEnterprise Manager Disk Group page.

To manage Oracle ASM files:

1. Access the Oracle Automatic Storage Management home page.

See "Accessing the Oracle Automatic Storage Management Home Page" forinstructions.

2. Click the Disk Groups link to display the Disk Groups property page.

3. Click a link in the Name column to select a disk group.

4. Click the Files tab to display the Files page.

Chapter 7Managing Oracle ASM File Access Control with Oracle Enterprise Manager

7-18

Page 223: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

5. Click the icons to left on the folders to expand or contract the folders. When you expandthe folders, you can drill down to individual files.

6. You can select a file with the Select box, then click Rename to rename the file, click Editto change the properties of a file, or click Delete to remove a file. You can click the nameof a file to display the properties page.

For more information about managing Oracle ASM files, directories, and aliases, see Administering Oracle ASM Files, Directories, and Templates.

Managing Disk Group Templates with Oracle EnterpriseManager

You can manage disk group templates with the Templates tab of the Disk Group page.

To manage Oracle ASM templates:

1. Access the Oracle Automatic Storage Management home page.

2. Click the Disk Groups link to display the Disk Groups property page.

3. Click a link in the Name column to select a disk group.

4. Click the Templates tab to display the Templates page.

5. You can click Create to add a new template, click Edit to change a page, or click Deleteto remove a template.

If you click Create, then the Create Template page displays and you can enter a name inthe Template Name field. You can also specify a redundancy level or striped granularity.

see Also:

• Accessing the Oracle Automatic Storage Management Home Page forinstructions about accessing the Oracle ASM home page

• Managing Disk Group Templates for more information about disk grouptemplates

Managing Oracle ASM Filter Driver With Oracle EnterpriseManager

You can manage Oracle ASM Filter Driver with Oracle Enterprise Manager.

This section contains the following sections:

• Discovering ASM Filter Driver Disks

• Provisioning ASM Filter Driver Disks

• Releasing ASM Filter Driver Disks

For more information about managing Oracle ASM Filter Driver, refer to "AdministeringOracle ASM Filter Driver".

Chapter 7Managing Disk Group Templates with Oracle Enterprise Manager

7-19

Page 224: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Discovering ASM Filter Driver DisksTo discover disks for Oracle ASM Filter Driver follow these steps:

1. From Targets menu, select All Targets.

2. On the All Targets page, select any target of type Automatic StorageManagement.

3. On the target home page, from Automatic Storage Management menu, selectConfiguration Parameters.

4. On the Configuration page, click Manage Disk Provisioning. The ASM FilterDriver Page is displayed.

5. On the Disks available for Provisioning table, click Discover to discover additionalOracle ASM disks.

6. In the Discover Disks dialog box, enter additional discovery paths from where youwould like to provision disks. If you are providing more than one path, then ensurethat the values are separated by a comma.

For example, '/dev/','/tmp'.

7. Click Ok.

In the Disks available for Provisioning table, all the disks available in the discoverypaths are listed.

Provisioning ASM Filter Driver DisksTo provision a set of disks for Oracle ASM Filter Driver, follow these steps:

1. From Targets menu, select All Targets.

2. On the All Targets page, select any target of type Automatic StorageManagement.

3. On the target home page, from Automatic Storage Management menu, selectConfiguration Parameters.

4. On the Configuration page, click Manage Disk Provisioning. The ASM FilterDriver Page is displayed.

5. From the Disks available for Provisioning table, select one or more disks, thenclick Provision.

6. The Provision Disks dialog box lists all the disks that were selected forprovisioning. You can update the Label info if you want, then click OK.

After provisioning, the Oracle ASM disks appear in the Provisioned Disks table. Thesedisks display with their new label. For example, if you select /dev/loop3 to beprovisioned with a label LOOP3, then after provisioning the disk displays as AFD:LOOP3in the Provisioned Disks table.

After the disks are provisioned, they become eligible to be managed by the OracleASM Filter Driver.

Chapter 7Managing Oracle ASM Filter Driver With Oracle Enterprise Manager

7-20

Page 225: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Releasing ASM Filter Driver DisksTo release the disks currently managed by Oracle ASM Filter Driver, follow these steps:

1. From Targets menu, select All Targets.

2. On the All Targets page, select any target of type Automatic Storage Management.

3. On the target home page, from Automatic Storage Management menu, selectConfiguration Parameters.

4. On the Configuration page, click Manage Disk Provisioning. The ASM Filter DriverPage is displayed.

5. From the Provisioned Disks table, select one or more disks, then click Release.

6. In the Release Provisioned Disks dialog box, click Yes to release the disks

After the disks are released, they are removed from the Provisioned Disks table. Theyinstead appear in the Disks available for provisioning table as a candidate eligible to beprovisioned.

Monitoring Oracle ASM Performance With Oracle EnterpriseManager

This section describes how to perform the following performance-related Oracle ASMadministrative tasks:

• Monitoring General Oracle ASM Performance

• Checking Disk Group Integrity

Monitoring General Oracle ASM PerformanceYou can monitor Oracle ASM performance with the Oracle Enterprise Manager Performancepage.

To monitor Oracle ASM performance:

1. Access the Oracle Automatic Storage Management home page.

See "Accessing the Oracle Automatic Storage Management Home Page" for instructions.

2. Click the Performance link to view the Performance property page.

3. Determine the view and refresh rate of the performance graphs with the View andRefresh options. Click Refresh to manually refresh the graphs. The refresh option hasthe following two intervals:

• Manual refresh: manual, 15 second interval, 30 second interval

• Historical data: Last 24 hours, last 7 days, last 31 days

For more information, refer to "Performance and Scalability Considerations for DiskGroups".

Chapter 7Monitoring Oracle ASM Performance With Oracle Enterprise Manager

7-21

Page 226: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Checking Disk Group IntegrityWhen you check the integrity of Oracle ASM disk groups, Oracle Enterprise Managerperforms consistency checks on all of the disk group metadata. If Oracle ASM detectserrors, then Oracle ASM stores information about errors in the alert log. To check diskgroups, perform the following steps:

1. From the Disk Groups page, select a disk group in the list and click Check.

A confirmation dialog for the check disk group operation displays.

2. Select Check Without Repair to record information about disk groupinconsistencies in the alert log. In this operation, Oracle ASM does not resolve theerrors. Select Check And Repair to attempt to repair errors that Oracle EnterpriseManager identifies during the disk group consistency check.

3. Click Yes to start the disk group check operation or No to cancel it. You can alsoselect Show SQL to review the SQL statements that the disk group checkoperation uses. Click OK to run the check operation as a command. To schedule ajob, click Schedule Job. Optionally, you can modify or reenter the job name anddescription. Also provide host credentials and enter the scheduling options byselecting Immediately or Later and modifying the date and time as needed. ClickOK to schedule the job or Cancel to terminate the job creation process.

Backing Up Oracle ASM Files with Oracle EnterpriseManager

Oracle recommends that you use RMAN to back up files managed by Oracle ASM.

You can also back up your Oracle ASM managed files by performing a files relatedoperation using the following procedures:

1. Create an alias.

2. Create a directory.

3. Delete the alias and directory.

4. Rename the alias and directory.

See Also:

• Performing Oracle ASM Data Migration with RMAN for information aboutmigrating data with RMAN

• Oracle Database 2 Day DBA for information about the procedures forusing RMAN

• Oracle Database Backup and Recovery User’s Guide for additionalinformation about RMAN

Chapter 7Backing Up Oracle ASM Files with Oracle Enterprise Manager

7-22

Page 227: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Performing Bad Block Recovery with Oracle Enterprise ManagerThe procedures that you use in Oracle Enterprise Manager to perform bad block recoverycorrespond to the steps that you could manually perform with the remap command using theOracle ASM Command utility (ASMCMD). Use the following procedures to perform bad blockrecovery:

1. Access the Oracle Automatic Storage Management home page.

See "Accessing the Oracle Automatic Storage Management Home Page" for instructions.

2. Click the Disk Groups link at the top of the page.

3. If you are not logged in, then the Log In page appears and you should log in as the SYSuser, connecting as SYSASM. Provide the SYS password for the Oracle ASM instance.This password was set up when the Oracle ASM instance was created.

4. Click a disk group name and Oracle Enterprise Manager displays the disk group homepage for that disk group.

5. Click a box in the Select column to the left of a disk in which to recover bad blocks, thenclick Recover Bad Blocks.

Note:

You can only recover bad blocks for disk groups that you have configured withnormal or high redundancy; you cannot use this feature for disk groups that youhave configured with external redundancy.

Migrating to Oracle ASM with Oracle Enterprise ManagerThis section explains how to use Oracle Enterprise Manager to migrate your databasestorage to use Oracle ASM.

Perform the following steps to migrate to Oracle ASM:

1. At the top of the Oracle Enterprise Manager Database Instance home page, click theAdministration pull down list and select Migrate to Oracle ASM.

2. You may need to set credentials for the database, Oracle ASM, and host.

If prompted for database login credentials, then enter the user SYS, provide the SYSpassword that was set for the Oracle Database instance during installation, and connectas SYSDBA.

If prompted for Oracle ASM login credentials, then enter the user SYS, provide the SYSpassword that was set for the Oracle ASM instance during installation, and connect asSYSASM. For more information about authentication, see "Authentication for AccessingOracle ASM Instances".

3. On the Migrate Database To ASM: Migration Options Page, which is the first step in afour-step process, verify the information about the files that you plan to migrate to OracleASM. If the target database is in ARCHIVELOG mode, then you could perform online oroffline migration by selecting the corresponding option. Otherwise, using offline migrationis the default. If you perform an online migration, then you can suspend the migration by

Chapter 7Performing Bad Block Recovery with Oracle Enterprise Manager

7-23

Page 228: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

selecting the check box next to Suspend Migration Job Before SwitchingDatabase To ASM.

Additionally, you can enter an e-mail address to which Oracle Enterprise Managersends a message to notify you about the suspension. By default on this page, theRecovery-related Files option is selected. Deselect this option if you do not want touse it. Also verify the entry for the initialization parameter file. Lastly, theParallelize File Copy Operations option is selected by default. Deselect this ifyou do not want Oracle Enterprise Manager to perform copy operations in parallel.Click Next when you complete your selections on this page and Oracle EnterpriseManager displays the Migrate Database To ASM: Disk Group Options page.

4. On the Disk Group Options page under Database Area, verify the location whereOracle ASM should create data files, temporary files, redo log files, and controlfiles. Also verify the fast recovery area where Oracle ASM should create therecovery-related files such as archived redo log files, backup files, and so on. Alsounder fast recovery area, the option for Setup fast recovery area without MigratingRecovery-related Files is selected by default. If needed, change the selection tomigrate the files. Click Next when you complete your selections on the Disk GroupOptions page.

5. If you chose to use a fast recovery area and Oracle Enterprise Manager displays awarning that the available space on the disk group is less than the specified fastrecovery area size for the migration, then you can either continue by clicking Yes,or click No to stop the operation and modify your storage.

6. When you continue, Oracle Enterprise Manager displays the Schedule page onwhich you can specify a job name and a date and time for the migration job tobegin. Click Next when you have configured your desired settings.

7. Oracle Enterprise Manager displays the Review page on which you can review allof your selections before beginning your migration operation. To expand thetablespace details and review them, click the plus (+) sign next to Tablespacesand Files To Be Migrated. Click Back to modify any of your selections or SubmitJob to begin the migration. Click Cancel to cancel the operation.

Note:

If your migration job fails, then do not start your database until youcomplete a recovery operation. Otherwise, you may corrupt yourdatabase.

8. After you submit your job, Oracle Enterprise Manager should display aconfirmation dialog indicating that the migration job was successful. Click ViewStatus on the confirmation dialog to examine the progress of your migration job.

After the migration job has completed, the Oracle ASM links on the Oracle EnterpriseManager page may not display immediately. You may need to wait for the links todisplay after a subsequent refresh.

Chapter 7Migrating to Oracle ASM with Oracle Enterprise Manager

7-24

Page 229: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Monitoring Alerts and Incidents With Oracle ASM SupportWorkbench

Oracle Enterprise Manager provides Support Workbench to monitor Oracle ASM alerts andincidents.

To access Support Workbench, select Diagnostics > Support Workbench under theAutomatic Storage Management target menu at the top of the page.

On the Oracle ASM Support Workbench page Problems tab you can view information aboutcurrent and past problems. You also have options to view additional details and create apackage that you can send to Oracle Support Services.

Support Workbench guides you through the packaging process as follows:

1. To create a package, select an incident and click Package on the Support WorkbenchProblems page. The Support Workbench Select packaging mode page of the wizarddisplays.

2. On the Select packaging mode page, select either the Quick or Custom packagingmode.

3. Depending on the packaging mode chosen, you are presented with various entry fieldsand options as you click Next through the wizard.

The wizard guides you through the packaging process using a series of steps thatinclude:

• Viewing and editing the contents of the package

• Viewing and editing the manifest of the package

• Adding additional diagnostic details

• Scheduling the generation and uploading of the package

On the Support Workbench Checker Findings tab, you can view and edit information aboutpackages created for problems on the Support Workbench Packages tab. You can alsocheck findings on the Checker Findings tab.

See Also:

Oracle Database Administrator's Guide for information about viewing problems withOracle Enterprise Manager Support Workbench

Monitoring Oracle Flex ASMOracle Enterprise Manager provides functionality to monitor your Oracle Flex ASMconfiguration.

• On the Oracle Flex ASM home page, you can view and administer components of theOracle Flex ASM configuration.

• On the Oracle Flex ASM Members page, you can view all the members of the OracleFlex ASM configuration.

Chapter 7Monitoring Alerts and Incidents With Oracle ASM Support Workbench

7-25

Page 230: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• On the Oracle Flex ASM Topology page, you can view the topology of the OracleFlex ASM configuration.

For information about Oracle Flex ASM, refer to "Managing Oracle Flex ASM".

Chapter 7Monitoring Oracle Flex ASM

7-26

Page 231: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

8Performing Oracle ASM Data Migration withRMAN

Recovery Manager (RMAN) provides tools to migrate data to and from Oracle ASM.

This chapter describes how to migrate data into and out of Oracle Automatic StorageManagement (Oracle ASM) storage with Recovery Manager (RMAN).

This chapter includes the following topics:

• Overview of Oracle ASM Data Migration

• Preparing to Migrate the Database to Oracle ASM Using RMAN

• Migrating the Database to Oracle ASM Using RMAN

• Migrating a Database from Oracle ASM to Alternative Storage

• Moving Data Files Between Oracle ASM Disk Groups Using RMAN

The procedures in this chapter cover an Oracle ASM standalone environment on a Linuxplatform. File locations and procedures may be different for different Oracle configurationsand on other operating system platforms.

See Also:

• Oracle Database Backup and Recovery User's Guide for complete informationabout using RMAN

• Operating system-specific documentation for migrating data in and out ofOracle ASM on specific platforms

• Oracle Clusterware Administration and Deployment Guide for information aboutmanaging and migrating Oracle Cluster Registry and voting files

• Oracle Real Applications Cluster Administration and Deployment Guide formigrating data in and out of Oracle ASM in an Oracle RAC configuration

• Articles at My Oracle Support (https://support.oracle.com) for informationabout gathering and backing up Oracle ASM and Oracle ACFS metadata in aformatted manner, such as HTML format

Overview of Oracle ASM Data MigrationThis section explains the basic concepts and tasks involved in migrating data to and fromOracle ASM.

This section includes the following topics:

• Purpose of Oracle ASM Data Migration

8-1

Page 232: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

• Basic Concepts of Oracle ASM Data Migration

• Basic Steps of Data Migration to Oracle ASM Using RMAN

Purpose of Oracle ASM Data MigrationAlternatives to Oracle ASM storage include file systems, raw disks, and SANconfigurations. Oracle ASM includes numerous benefits over these storagealternatives, including performance optimization, redundancy protection, and loadbalancing. You do not need a third-party Logical Volume Manager because OracleASM manages disks for you. Oracle Real Application Clusters (Oracle RAC)databases benefit from Oracle ASM because it provides ready-made shared storage.

If a database currently uses a storage system other than Oracle ASM, then you canmigrate all or part of the database into Oracle ASM, thereby simplifying databaseadministration. You can also migrate a fast recovery area to Oracle ASM.

Native operating system commands such as Linux cp or Windows COPY cannot write orread files in Oracle ASM storage. Because RMAN can read and write Oracle ASMfiles, you can use RMAN to copy data files into and out of Oracle ASM storage orbetween Oracle ASM disk groups. This technique is useful if you must store backupson user-managed disks.

Basic Concepts of Oracle ASM Data MigrationYou can migrate data to Oracle ASM with RMAN even if you are not using RMAN asyour primary backup tool. The migration requires one RMAN database backup.

If you have sufficient disk space to hold the entire database both in Oracle ASM andalternative storage systems, then you can move a database directly into Oracle ASM.If you do not have sufficient storage, then you can back the database up to tape,create an Oracle ASM disk group that uses old disk space, and restore the databasefrom tape to Oracle ASM.

After you set the location of the new recovery area, existing backups remain in the oldrecovery area and count against the total disk quota of the recovery area. Thebackups are deleted from the old recovery area when space is needed. Thesebackups are usable by RMAN. It is not necessary to move legacy backups to the newOracle ASM recovery area unless you need disk space. To free space consumed byfiles in the old recovery area, you can back them up to tape or migrate them to theOracle ASM recovery area.

Note:

A foreign archived redo log is a log received by a logical standby databasefor a LogMiner session. Foreign archived redo logs cannot be migrated.Unlike normal archived logs, foreign archived logs have a different internaldatabase identifier (DBID). For this reason, they cannot be backed up orrestored on a logical standby database.

Migrating a database from Oracle ASM to an alternative storage system is similar tomigration from an alternative storage system to Oracle ASM. The primary change is tomodify each step to refer to file locations in the alternative storage system.

Chapter 8Overview of Oracle ASM Data Migration

8-2

Page 233: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Basic Steps of Data Migration to Oracle ASM Using RMANThis section discusses the process of migrating the entire database and fast recovery areafrom alternative storage to Oracle ASM using RMAN.

The fast recovery area is an optional disk location that you can use to store recovery-relatedfiles such as control file and online redo log copies, archived redo log files, flashback logs,and RMAN backups. Oracle Database and RMAN manage the files in the fast recovery areaautomatically. You can specify the disk quota, which is the user-specified maximum size ofthe fast recovery area. When the disk quota is reached, Oracle automatically deletes files thatare no longer needed.

Flashback logs are Oracle-generated logs used to perform flashback database operations.The database can only write flashback logs to the fast recovery area. Flashback logs arewritten sequentially and are not archived. They cannot be backed up to disk.

To migrate the entire database and fast recovery area from alternative storage to OracleASM, perform the following steps:

1. Back up the database and server parameter file, and disable Oracle FlashbackDatabase.

The Oracle Flashback Database option returns the entire database to a prior consistentSystem Change Number (SCN) with the FLASHBACK DATABASE command in RMAN orSQL. A database flashback is different from traditional media recovery because it doesnot involve the restore of physical files, instead restoring your current data files to paststates using saved images of changed data blocks. This feature uses flashback logs andarchived redo logs.

This step is described in Preparing to Migrate the Database to Oracle ASM Using RMAN.

2. Restore files to Oracle ASM, recover the database, and optionally migrate the fastrecovery area to Oracle ASM.

This step is described in Migrating the Database to Oracle ASM Using RMAN.

To migrate files from Oracle ASM to alternative storage, see Migrating a Database fromOracle ASM to Alternative Storage.

Preparing to Migrate the Database to Oracle ASM Using RMANThis section explains how to prepare the database for migration. This section makes thefollowing assumptions:

• You want to migrate the database to two Oracle ASM disk groups: +DATA for the databaseand +FRA for the fast recovery area.

• The database to be migrated to Oracle ASM storage is named mydb.

To prepare the database for Oracle ASM migration:

1. If the COMPATIBLE initialization parameter setting for the database is less than 11.0.0,then make any read-only transportable tablespaces read/write.

Read-only transportable tablespaces cannot be migrated because RMAN cannot backthem up.

2. If the database is a physical standby database, and if managed recovery is started, thenstop managed recovery.

Chapter 8Preparing to Migrate the Database to Oracle ASM Using RMAN

8-3

Page 234: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

A physical standby database is a copy of a production database that you can usefor disaster protection.

For example, connect SQL*Plus to the database with SYSBACKUP privileges (ratherthan SYSDBA privileges) to enforce the separation of duty security model, and runthe following statement to stop managed recovery:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

Keep this terminal window open.

3. Copy the server parameter file or initialization parameter file to a temporarylocation.

The following example uses an operating system utility to copy the serverparameter file:

$ cp spfileMYDB.ora orig_spfileMYDB.ora

4. In a new terminal window, start RMAN session and connect as TARGET to thedatabase to be migrated. Optionally, connect to a recovery catalog. Connect withSYSBACKUP privileges to enforce the separation of duty security model.

5. Back up the data files to the Oracle ASM disk group.

The following example uses a RUN command to make a level 0 incremental backupand allocates four channels to increase the backup speed. A level 0 incrementalbackup is an RMAN incremental backup that backs up all data blocks in the datafiles being backed up. An incremental backup at level 0 is identical in content to afull backup, but unlike a full backup the level 0 backup is considered a part of theincremental backup strategy.

An incremental backup is a RMAN backup in which only modified blocks arebacked up. Incremental backups are classified by level. A level 0 incrementalbackup performs the same function as a full backup in that they both back up allblocks that have ever been used. The difference is that a full backup does notaffect blocks backed up by subsequent incremental backups, whereas anincremental backup affects blocks backed up by subsequent incremental backups.

A full backup is a non-incremental RMAN backup. Full does not refer to how muchof the database is backed up, but to the fact that the backup is not incremental.Consequently, you can make a full backup of one data file.

Increase or decrease this number accordingly. The format clause specifies +DATA,which is the name of the Oracle ASM disk group to be used for storing thedatabase.

RUN{ ALLOCATE CHANNEL dev1 DEVICE TYPE DISK; ALLOCATE CHANNEL dev2 DEVICE TYPE DISK; ALLOCATE CHANNEL dev3 DEVICE TYPE DISK; ALLOCATE CHANNEL dev4 DEVICE TYPE DISK; BACKUP AS COPY INCREMENTAL LEVEL 0 DATABASE FORMAT '+DATA' TAG 'ORA_ASM_MIGRATION';}

6. If block change tracking is enabled for the database, then optionally make a level 1incremental backup that you can use later to recover the database copy.

Chapter 8Preparing to Migrate the Database to Oracle ASM Using RMAN

8-4

Page 235: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Block change tracking is a database option that causes Oracle to track data file blocksaffected by each database update. The tracking information is stored in a block changetracking file. When block change tracking is enabled, RMAN uses the record of changedblocks from the change tracking file to improve incremental backup performance by onlyreading those blocks known to have changed, instead of reading data files in theirentirety.

The following example makes an incremental level 1 copy of the level 0 backup createdin the previous step:

RUN{ ALLOCATE CHANNEL dev1 DEVICE TYPE DISK; ALLOCATE CHANNEL dev2 DEVICE TYPE DISK; ALLOCATE CHANNEL dev3 DEVICE TYPE DISK; ALLOCATE CHANNEL dev4 DEVICE TYPE DISK; BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'ORA_ASM_MIGRATION' DATABASE;}

7. If the database is in ARCHIVELOG mode, and if the database is open, then archive theonline logs.

The following example uses the SQL command to archive the current redo logs:

RMAN> SQL "ALTER SYSTEM ARCHIVE LOG CURRENT";

8. If the database instance is currently using a server parameter file, then back it up.

The following example backs up the server parameter file:

RMAN> BACKUP AS BACKUPSET SPFILE;

9. If block change tracking is enabled, then disable it.

The following command disables block change tracking:

RMAN> SQL "ALTER DATABASE DISABLE BLOCK CHANGE TRACKING";

10. If Flashback Database is enabled, then disable it and drop any guaranteed restore points.

Note:

If you are not migrating the fast recovery area, then skip this step.

Disabling Oracle Flashback Database is necessary because you cannot migrateflashback logs to Oracle ASM. The following command disables Flashback Database:

RMAN> SQL "ALTER DATABASE FLASHBACK OFF";

The following command drops the guaranteed restore point named Q106:

RMAN> SQL "DROP RESTORE POINT Q106";

11. Shut down the database consistently.

The following command shuts down the database:

RMAN> SHUTDOWN IMMEDIATE;

Chapter 8Preparing to Migrate the Database to Oracle ASM Using RMAN

8-5

Page 236: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Migrating the Database to Oracle ASM Using RMANThe following procedure is intended to minimize database downtime. The steps differslightly depending on whether you are migrating a primary or standby database. Theprocedure makes the same assumptions described in Preparing to Migrate theDatabase to Oracle ASM Using RMAN. If you are not migrating the recovery area toOracle ASM, then you must modify some steps, which are noted.

Note:

The following procedure switches between SQL*Plus and RMAN, so keep aterminal window open for each utility.

To migrate the database to Oracle ASM:

1. Follow the steps in Preparing to Migrate the Database to Oracle ASM UsingRMAN.

2. Restore or create a server parameter file in Oracle ASM storage.

The steps depend on whether the database is using a server parameter file:

• If the database is using a server parameter file, then restore it to the OracleASM disk group with the following commands, where sid is the SID of theinstance:

RMAN> STARTUP MOUNT;RMAN> RESTORE SPFILE TO '+DATA/spfilesid.ora';RMAN> SHUTDOWN IMMEDIATE;

• If the database is not using a server parameter file, then create one in OracleASM. Run the CREATE SPFILE command in SQL*Plus as follows, where sid isthe SID of the database:

SQL> CREATE SPFILE='+DATA/spfilesid.ora' FROM PFILE='?/dbs/initsid.ora';

3. Set Oracle Managed Files initialization parameters to Oracle ASM locations.

Note:

If you are not migrating the fast recovery area, then do not change theDB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE initializationparameter settings. However, you must setDB_CREATE_ONLINE_LOG_DEST_n parameter to an Oracle ASM location formigration of the online redo logs.

Set the DB_CREATE_FILE_DEST and optional DB_CREATE_ONLINE_LOG_DEST_ninitialization parameters to Oracle ASM disk groups. If the database uses arecovery area, then change the recovery area location to the Oracle ASM diskgroup. Also, change the recovery area size.

Chapter 8Migrating the Database to Oracle ASM Using RMAN

8-6

Page 237: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Run commands in SQL*Plus as shown in the following example. The example assumesthat the size of the fast recovery area is 100 GB and specifies the disk group +FRA for thefast recovery area.

SQL> STARTUP FORCE NOMOUNT;SQL> ALTER SYSTEM SET DB_CREATE_FILE_DEST='+DATA' SID='*';SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=100G SID='*';SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='+FRA' SID='*';

4. Set the CONTROL_FILES initialization parameter to Oracle ASM locations.

If you are migrating the fast recovery area, then enter the following commands inSQL*Plus to restart the database instance and set the control file locations to disk groups+DATA and +FRA:

SQL> STARTUP FORCE NOMOUNT;SQL> ALTER SYSTEM SET CONTROL_FILES='+DATA','+FRA' SCOPE=SPFILE SID='*';

If you are not migrating the fast recovery area, then enter the following commands inSQL*Plus to restart the database instance and set the control file locations to disk group+DATA:

SQL> STARTUP FORCE NOMOUNT;SQL> ALTER SYSTEM SET CONTROL_FILES='+DATA','+DATA' SCOPE=SPFILE SID='*';

5. Migrate the control file to Oracle ASM and mount the control file.

Switch to the RMAN terminal to restore the control file. In the following example,original_cf_name is a control file name in the initialization parameter file beforemigration:

RMAN> STARTUP FORCE NOMOUNT;RMAN> RESTORE CONTROLFILE FROM 'original_cf_name';RMAN> ALTER DATABASE MOUNT;

6. Migrate the data files to Oracle ASM.

Use RMAN to switch to the database copy that you created in step "Back up the data filesto the Oracle ASM disk group" in Preparing to Migrate the Database to Oracle ASMUsing RMAN. The switch renames all the data files to files on Oracle ASM disk groups.Afterward, recover the database. If incremental backups were taken, then RMAN appliesthem during recovery. For example, enter the following commands at the RMAN prompt:

SWITCH DATABASE TO COPY;RUN{ ALLOCATE CHANNEL dev1 DEVICE TYPE DISK; ALLOCATE CHANNEL dev2 DEVICE TYPE DISK; ALLOCATE CHANNEL dev3 DEVICE TYPE DISK; ALLOCATE CHANNEL dev4 DEVICE TYPE DISK; RECOVER DATABASE;}

7. If the database uses block change tracking or Flashback Database, then enable thesefeatures.

Note:

If you are not migrating the recovery area, then you do not enable FlashbackDatabase unless you had disabled it previously.

Chapter 8Migrating the Database to Oracle ASM Using RMAN

8-7

Page 238: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

For example, enter the following statements in SQL*Plus:

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '+DATA';SQL> ALTER DATABASE FLASHBACK ON;

8. Place the database in its normal operation mode.

The normal operational mode depends on whether the database is a primary orstandby database:

• If the database is a primary database, then open it as follows:

SQL> ALTER DATABASE OPEN;

• If the database is a standby database, then resume managed recovery modeas follows:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE;

9. Drop the tempfiles and re-create them in Oracle ASM.

Use SQL*Plus to re-create the tempfiles. In the following example, the name of thetempfile in the original storage is tempfile_name. The name of the temporarytablespace is temp_tbs_name.

SQL> ALTER DATABASE TEMPFILE 'tempfile_name' DROP;SQL> ALTER TABLESPACE temp_tbs_name ADD TEMPFILE;

10. Migrate the online redo log files.

If this is a primary database, then add new log group members in Oracle ASM anddrop the old members. You can use the following PL/SQL script to migrate theonline redo log groups into an Oracle ASM disk group. The PL/SQL scriptassumes that the Oracle Managed Files initialization parameters specified in step"Set Oracle Managed Files initialization parameters to Oracle ASM locations" in Migrating the Database to Oracle ASM Using RMAN are set.

11. Optionally, migrate backups and copies in the old fast recovery area to OracleASM as follows:

a. If foreign archived logs exists in the recovery area, then you cannot migratethem to Oracle ASM. Run the following command at the RMAN prompt:

RMAN> DELETE ARCHIVELOG ALL;

b. Back up archived redo log files, backup sets, and data file copies to OracleASM. For example, run the following command at the RMAN prompt:

RUN{ ALLOCATE CHANNEL dev1 DEVICE TYPE DISK; ALLOCATE CHANNEL dev2 DEVICE TYPE DISK; ALLOCATE CHANNEL dev3 DEVICE TYPE DISK; ALLOCATE CHANNEL dev4 DEVICE TYPE DISK;

BACKUP AS COPY ARCHIVELOG ALL DELETE INPUT; BACKUP BACKUPSET ALL DELETE INPUT; BACKUP AS COPY DATAFILECOPY ALL DELETE INPUT;}

Example 8-1 Migrating the online redo logs

SET SERVEROUTPUT ON;DECLARE CURSOR rlc IS SELECT GROUP# GRP, THREAD# THR, BYTES, 'NO' SRL

Chapter 8Migrating the Database to Oracle ASM Using RMAN

8-8

Page 239: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

FROM V$LOG UNION SELECT GROUP# GRP, THREAD# THR, BYTES, 'YES' SRL FROM V$STANDBY_LOG ORDER BY 1; stmt VARCHAR2(2048);BEGIN FOR rlcRec IN rlc LOOP IF (rlcRec.srl = 'YES') THEN stmt := 'ALTER DATABASE ADD STANDBY LOGFILE THREAD ' || rlcRec.thr || ' SIZE ' || rlcRec.bytes; EXECUTE IMMEDIATE stmt; stmt := 'ALTER DATABASE DROP STANDBY LOGFILE GROUP ' || rlcRec.grp; EXECUTE IMMEDIATE stmt; ELSE stmt := 'ALTER DATABASE ADD LOGFILE THREAD ' || rlcRec.thr || ' SIZE ' || rlcRec.bytes; EXECUTE IMMEDIATE stmt; BEGIN stmt := 'ALTER DATABASE DROP LOGFILE GROUP ' || rlcRec.grp; DBMS_OUTPUT.PUT_LINE(stmt); EXECUTE IMMEDIATE stmt; EXCEPTION WHEN OTHERS THEN EXECUTE IMMEDIATE 'ALTER SYSTEM SWITCH LOGFILE'; EXECUTE IMMEDIATE 'ALTER SYSTEM CHECKPOINT GLOBAL'; EXECUTE IMMEDIATE stmt; END; END IF; END LOOP;END;/

Migrating a Database from Oracle ASM to Alternative StorageMigrating a database from Oracle ASM to an alternative storage system is essentially thereverse of the migration to Oracle ASM. Modify the steps in Preparing to Migrate theDatabase to Oracle ASM Using RMAN and Migrating the Database to Oracle ASM UsingRMAN as follows:

• If the procedure specifies Oracle Managed Files locations, then alter the procedure touse locations in alternative storage.

• If the FORMAT clause of the BACKUP command specifies an Oracle ASM location, thenchange the backup format to an alternative storage location.

• If a file name used in a SQL statement is an Oracle ASM location, then change it to a filename in the alternative storage location.

Moving Data Files Between Oracle ASM Disk Groups UsingRMAN

You may want to move an active data file in an ARCHIVELOG mode database from one OracleASM disk group to another. You can use RMAN BACKUP AS COPY to copy the data file to thenew disk group and SET NEWNAME and SWITCH commands to rename the data file in the controlfile.

Chapter 8Migrating a Database from Oracle ASM to Alternative Storage

8-9

Page 240: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

You can also use the ALTER DATABASE MOVE DATAFILE. SQL statement to move datafiles. For information about moving data files online with ALTER DATABASE MOVEDATAFILE, refer to Moving Data Files Between Disk Groups With ALTER DATABASE.

For this scenario using RMAN, assume that you are using disk groups DATA andUSERDATA and you want to move the data file users.261.689589837 to disk groupUSERDATA. Ensure that ARCHIVELOG mode is enabled for the database before beginningthe procedure to move data files.

To move a data file from one Oracle ASM disk group to another disk group using theRMAN BACKUP AS COPY procedure with the SET NEWNAME and SWITCH commands,perform the following steps.

1. Start RMAN and connect to the target database.

For example:

$ rmanRMAN> CONNECT TARGET SYS@orcltarget database Password: XXXXXXXXXconnected to target database: ORCL (DBID=1217369048)

2. Generate a report that shows the names of the data files.

Run the following REPORT command after connecting RMAN to the targetdatabase. Note the data file name of the file to be moved.

For example:

RMAN> REPORT SCHEMA;

Report of database schema for database with db_unique_name ORCL List of Permanent Datafiles===========================File Size(MB) Tablespace RB segs Datafile Name---- -------- -------------- ------- ------------------------1 740 SYSTEM *** +DATA/orcl/datafile/system.258.6895897372 570 SYSAUX *** +DATA/orcl/datafile/sysaux.259.6895897853 55 UNDOTBS1 *** +DATA/orcl/datafile/undotbs1.260.6895898314 5 USERS *** +DATA/orcl/datafile/users.261.689589837

List of Temporary Files=======================File Size(MB) Tablespace Maxsize(MB) Tempfile Name---- -------- -------------- ----------- --------------------1 20 TEMP 32767 +DATA/orcl/tempfile/temp.262.689589851

3. Back up the data file to the new Oracle ASM disk group.

Run the BACKUP AS COPY command to back up the data file on DATA to USERDATA.

For example:

RMAN> BACKUP AS COPY DATAFILE "+DATA/orcl/datafile/users.261.689589837" FORMAT "+USERDATA";

Starting backup at 16-JUN-09allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=51 device type=DISKchannel ORA_DISK_1: starting datafile copy

Chapter 8Moving Data Files Between Oracle ASM Disk Groups Using RMAN

8-10

Page 241: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

input datafile file number=00004 name=+DATA/orcl/datafile/users.261.689589837output file name=+USERDATA/orcl/datafile/users.256.689682663 tag=TAG20090616T103101 RECID=13 STAMP=689682663channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01Finished backup at 16-JUN-09

You could also specify the data file by the data file number and data file type.

For example:

BACKUP AS COPY DATAFILE 4 FORMAT "+USERDATA";

4. Offline the data file that you intend to move to a new disk group.

Run the following SQL command in the RMAN client. Use two single quotation marksaround the name of the data file, not double quotation marks.

For example:

RMAN> SQL "ALTER DATABASE DATAFILE ''+DATA/orcl/datafile/users.261.689589837'' OFFLINE";

sql statement: ALTER DATABASE DATAFILE ''+DATA/orcl/datafile/users.261.689589837'' OFFLINE

5. Point the control file to the newly created copy of the data file.

Run the SWITCH...TO COPY command in the RMAN client. The TO COPY option of SWITCHswitches the data file to the most recent copy of the data file.

For example:

RMAN> SWITCH DATAFILE "+DATA/orcl/datafile/users.261.689589837" TO COPY;

datafile 4 switched to datafile copy "+USERDATA/orcl/datafile/users.256.689682663"

The output of this command displays the new name of the data file.

6. Recover the renamed data file.

Run the RECOVER command in the RMAN client.

For example:

RMAN> RECOVER DATAFILE "+USERDATA/orcl/datafile/users.256.689682663";

Starting recover at 16-JUN-09using channel ORA_DISK_1starting media recoverymedia recovery complete, elapsed time: 00:00:01Finished recover at 16-JUN-09

7. Bring the data file online.

Run the SQL command in the RMAN client. Use two single quotation marks around thename of the data file, not double quotation marks.

For example:

RMAN> SQL "ALTER DATABASE DATAFILE ''+USERDATA/orcl/datafile/users.256.689682663'' ONLINE";

Chapter 8Moving Data Files Between Oracle ASM Disk Groups Using RMAN

8-11

Page 242: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

sql statement: ALTER DATABASE DATAFILE ''+USERDATA/orcl/datafile/users.256.689682663'' ONLINE

8. Delete the data file copy from the original Oracle ASM disk group.

In this scenario, +DATA/orcl/datafile/users.261.689589837 is the original datafile in DATA. Because you issued SET NEWNAME and SWITCH commands for this datafile, the original file is now recorded in the RMAN repository as a data file copy.Run a DELETE command in the RMAN client to remove this file.

For example:

RMAN> DELETE DATAFILECOPY "+DATA/orcl/datafile/users.261.689589837";

released channel: ORA_DISK_1allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=51 device type=DISKList of Datafile Copies=======================Key File S Completion Time Ckp SCN Ckp Time ------- ---- - --------------- ---------- ---------------14 4 A 16-JUN-09 864471 16-JUN-09 Name: +DATA/orcl/datafile/users.261.689589837 Tag: TAG20090615T084217

Do you really want to delete the above objects (enter YES or NO)? ydeleted datafile copydatafile copy file name=+DATA/orcl/datafile/users.261.689589837 RECID=14 STAMP=689683255Deleted 1 objects

Chapter 8Moving Data Files Between Oracle ASM Disk Groups Using RMAN

8-12

Page 243: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

9Managing Oracle ASM With ASMCA

Oracle ASM Configuration Assistant (ASMCA) provides utilities for managing Oracle ASM.

Oracle ASM Configuration Assistant (ASMCA) supports installing and configuring OracleASM instances, Oracle ASM disk groups, Oracle ASM Dynamic Volume Manager (OracleADVM) volumes, and Oracle Automatic Storage Management Cluster File System (OracleACFS) file systems. In addition, you can use the ASMCA command-line interface.

This chapter discusses the following topics:

• Getting Started With the ASMCA GUI Tool

• Managing Instances and Disk Groups With ASMCA

• ASMCA Command-Line Interface

See Also:

Oracle Automatic Storage Management Cluster File System Administrator's Guidefor information about managing Oracle ACFS and Oracle ADVM with ASMCA

Note:

Some ASMCA functionality and menu options are only available in specificenvironments, such as an Oracle RAC configuration. For details about a specificASMCA page, access the online help provided with the Help button.

Getting Started With the ASMCA GUI ToolTo start ASMCA, enter asmca at a command prompt inside the Oracle Grid Infrastructurehome. For example:

$ asmca

The GUI tool displays and attempts to connect to the Oracle ASM instance identified with theOracle system identifier (SID) set to +ASM.

If ASMCA detects an Oracle ASM instance that is not running, then ASMCA prompts whetheryou want to start the instance.

To start the command-line ASMCA, see ASMCA Command-Line Interface.

9-1

Page 244: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

Some ASMCA functionality and menu options are only available in specificenvironments, such as an Oracle RAC configuration. For details about aspecific ASMCA page, access the online help provided with the Help button.

Managing Instances and Disk Groups With ASMCAThis section contains the following topics:

• Creating Oracle ASM Instances with ASMCA

• Managing Disk Groups with ASMCA

Note:

Some ASMCA functionality and menu options are only available in specificenvironments, such as an Oracle RAC configuration. For details about aspecific ASMCA page, access the online help provided with the Help button.

Note:

On Solaris and AIX, if you shut down the database instance using theSHUTDOWN ABORT command, volume device files are not removed.

Creating Oracle ASM Instances with ASMCAOracle ASM Configuration Assistant enables you to create an Oracle ASM instance ifthe Oracle ASM instance is not found on the host.

On the Create ASM page, you enter the SYS password for the administrator of theOracle ASM instance and the password for the ASMSNMP user that can monitor thisOracle ASM instance. ASMSNMP is a less privileged user that is primarily used tomonitor Oracle ASM instances.

You can select the listener with which to register this Oracle ASM instance. Click ASMParameters to update the initialization parameters for the Oracle ASM instance.

When you can click ASM Parameters in the Create ASM page, you can updateinitialization parameters for an Oracle ASM instance on the Oracle ASM ConfigurationAssistant page.

Chapter 9Managing Instances and Disk Groups With ASMCA

9-2

Page 245: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Initialization Parameters for Oracle ASM Instances for information about OracleASM instance initialization parameters

• Oracle Grid Infrastructure Installation and Upgrade Guide for information aboutinstalling Oracle ASM

• Oracle Database Installation Guide for information about reviewing databaseaccounts and passwords

Managing Disk Groups with ASMCAOracle ASM Configuration Assistant enables you to configure or create Oracle ASM diskgroups with the Configure ASM Disk Groups tab.

The disk group tab displays selected details about the disk group, such as name, size, freespace, usable space, redundancy level, and state of the disk group.

You can right click a selected disk group in the screen to display the configuration optionsmenu. The menu options enable you to:

• Add disks to and drop disks from the disk group

• Add, drop, and list quota groups.

• Add, drop, and move file groups.

• Edit the disk group attributes

• Manage templates for the disk group

• Create an Oracle ACFS file system on the disk group for database use

• Mount and dismount the disk group

• Drop the disk group

• Drop and clear Oracle ASM Filter Driver labels.

There are additional options for creating a disk group, mounting all disk groups, anddismounting all disk groups.

Oracle ASM Configuration Assistant enables you to create an Oracle ASM disk group byclicking Create on the Oracle ASM Configuration Assistant disk group page.

On the Create Disk Group page, you can enter a name for the disk group, select theredundancy level, change the disk discovery path to locate disks in a different directory,identify the disks to be in the disk group, enter a name for a failure group, and specify if thefailure group is a quorum type.

A quorum failure group is a special type of failure group and disks in these failure groups donot contain user data and a quorum failure group is not considered when determiningredundancy requirements with respect to user storage. However, a quorum failure groupcounts when mounting a disk group.

If Oracle ASM Filter Driver has been configured for your system, you can add Oracle ASMFilter Driver labels to disks or clear Oracle ASM Filter Driver labels from disks.

Chapter 9Managing Instances and Disk Groups With ASMCA

9-3

Page 246: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

You can choose to show advanced options when creating a disk group. The advancedoptions section enables you to set additional options, such as disk group compatibilitysettings and allocation unit (AU) size. When you are finished with the create disk groupspecifications, click OK.

Note:

The disk group compatibility settings can only be advanced. You cannotrevert to a lower compatibility setting after you advance the disk groupcompatibility settings.

Note:

The values for Free (GB) and Usable (GB) space are 0 if the disk group typeis FLEX or EXTEND. The 0 value in this case means no value is given, not azero amount in for Free (GB) and Usable (GB) space.

See Also:

• Storing Oracle Cluster Registry and Voting Files in Oracle ASM DiskGroups for information about quorum failure groups

• Administering Oracle ASM Filter Driver for information about Oracle ASMFilter Driver

• Disk Group Compatibility and Overview of Disk Group Compatibility forinformation about disk group compatibility attributes and advancing diskgroup compatibility

• Oracle ASM Disk Discovery and ASM_DISKSTRING for informationabout disk discovery

• Administering Oracle ASM Disk Groups for more information aboutmanaging disk groups

• Oracle Database Reference for descriptions of disk group informationdisplayed in the V$ASM_DISKGROUP view

ASMCA Command-Line InterfaceThe ASMCA command-line interface provides non-GUI support for configuring OracleASM instances, Oracle ASM disk groups, volumes, and Oracle ACFS.

• Running ASMCA Command-Line

• ASMCA Commands for Instances and Disk Groups

Chapter 9ASMCA Command-Line Interface

9-4

Page 247: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Running ASMCA Command-LineThe syntax for running the ASMCA command-line tool is:

asmca -silent command_name [options]

Table 9-1 contains the options available with the asmca command-line tool.

See Also:

Oracle Automatic Storage Management Cluster File System Administrator's Guidefor information about managing Oracle ACFS and Oracle ADVM with ASMCAcommands

Table 9-1 Options for the ASMCA command-line tool

Option Description

-silent Specifies to run asmca in command-line mode.

command_name Specifies the command to run. The command can be any of thefollowing:

-configureASM-configureParameter-createDiskGroup-editDiskGroupAttributes-addDisk-createFileGroups-dropFileGroups—createQuotaGroups-dropQuotaGroups-createVolume-createACFS-createACFSSnapshot-dropACFSSnapshot

See ASMCA Commands for Instances and Disk Groups.

options Specifies the options to run for a command. The options vary bycommand. See the individual commands described in ASMCACommands for Instances and Disk Groups for the available options.

The following list describes the options that are common for multiplecommands.

• -help

Displays help for running ASMCA in silent mode.• -asmsnmpPassword asmsnmp_password

The Oracle ASM monitor user (ASMSNMP) password. This isoptional and only required when creating and migrating an OracleASM instance.

• -sysAsmPassword sysasm_password

The SYSASM password for Oracle ASM instance. This option isrequired.

Chapter 9ASMCA Command-Line Interface

9-5

Page 248: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The following is an example of the -help option.

$ asmca -helpasmca [-silent] [-sysAsmPassword <SYS user password>] [-asmsnmpPassword <ASMSNMP password>] {<command> <options>}Please refer to the manual for details.You can enter one of the following commands:...

ASMCA Commands for Instances and Disk GroupsThis section describes the commands that can be run with ASMCA command-line tomanage Oracle ASM objects.

• Configure an Oracle ASM Instance

• Configure Parameters for a Specified Instance

• Create a Disk Group

• Add a Disk to a Disk Group

• Edit Oracle ASM Disk Group Attributes

• Create Oracle ASM File Groups

• Drop Oracle ASM File Groups

• Create Oracle ASM Quota Groups

• Drop Oracle ASM Quota Groups

Configure an Oracle ASM Instance-configureASM configures or creates an Oracle ASM instance.

Syntax

asmca -silent -configureASM [-sysAsmPassword sysasm_password ] [-asmsnmpPassword asm_monitor_password ] [ { -param paramname=paramvalue , ... } ] [ { -diskString discovery_path { -diskGroupName diskgroup { -disk disk_path [-diskName disk] | -diskList disk_list [-diskSize disk_size_MB] [-failuregroup failure_group] [-force|-noforce] [-quorum|-noquorum] } [-redundancy { HIGH | NORMAL | EXTERNAL } ] } ] [-au_size value] [-compatible.asm value ] [-compatible.rdbms value ] [-compatible.advm value ] } { -executeRootScript {MANUAL|ROOT|SUDO} | [-rootPassword root_password ] | [-sudoUser sudo_user] [-sudoUserPassword sudo_user_password] } [-asmNetworks asm_network]

Table 9-2 contains the options available with the -configureASM command.

Chapter 9ASMCA Command-Line Interface

9-6

Page 249: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 9-2 Options for the -configureASM command

Option Description

-param paramname=paramvalue , ... Specifies a list of initialization parameters with values forthe Oracle ASM instance.

-diskString discovery_path Specifies the Oracle ASM discovery string for locatingdisks.

-diskGroupName diskgroup Specifies the name of the Oracle ASM disk group tocreate.

-disk disk_path Specifies the full path of the disk device.

-diskName disk Specifies a user-supplied disk name.

-diskList disk_list Specifies a comma-delimited list of disk names to beadded to the disk group.

-diskSize disk_size_MB Specifies the size of the disk to use for Oracle ASMstorage.

-failuregroup failure_group Specifies the failure group name.

-force | -noforce Specifies where to force the use of the disk.

-quorum | -noquorum Specifies a quorum or standard failure group.

-redundancy { HIGH | NORMAL | EXTERNAL} Specifies the redundancy setting for the Oracle ASMdisk group.

-au_size Specifies the allocation unit size (1,2,4,8,16,32,64)

-compatible.asm Specifies the attribute setting.

-compatible.rdbms Specifies the attribute setting.

-compatible.advm Specifies the attribute setting.

-executeRootScript {MANUAL|ROOT|SUDO}

Executes the root script.

Specify MANUAL for a manual run, ROOT for the rootpassword, or SUDO for the sudo password.

-rootPassword root_password Specifies the password of the root user.

-sudoUser sudo_user -sudoUserPasswordsudo_user_password

Runs sudo as the specified user with the specifiedpassword.

-asmNetworks asm_network Specifies a comma separated list of Oracle ASMnetworks. Each network is specified in the form"interface_name/subnet".

If not specified, then the existing private network is usedas the Oracle ASM network.

The following are additional parameters used for an Oracle Flex ASM configuration whenOracle Cluster Registry (OCR) is in Network Attached Storage (NAS): -executeRootScript,-rootPassword, -sudoUser -sudoUserPassword, and -asmNetworks

For additional options that are common to multiple commands, see Table 9-1.

Examples

To configure an Oracle ASM instance:

Chapter 9ASMCA Command-Line Interface

9-7

Page 250: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 9-1 Using asmca -silent -configureASM

asmca -silent -configureASM -diskString '/devices/disk*' –sysAsmPassword my_sysasm_password -asmsnmpPassword my_asmsnmp_passwd

Configure Parameters for a Specified Instance-configureParameter modifies the parameters of the specified target instance.

Syntax

asmca -silent -configureParameter [-target {ASM|IOS|APX|ALL} ] [{-param paramname=paramvalue , ... }] [-sysAsmPassword sysasm_password ]

Table 9-3 contains the options available with the -configureParameter command.

Table 9-3 Options for the -configureParameter command

Option Description

-target {ASM|IOS|APX|ALL} Specifies the target instance of the command. If notarget is specified, the default is the Oracle ASMinstance.

-param paramname=paramvalue , ... Specifies a list of initialization parameters withvalues for the Oracle ASM instance.

For additional options that are common to multiple commands, see Table 9-1.

Examples

To configure parameters for a specified target instance:

Example 9-2 Using asmca -silent -configureParameter

asmca -silent -configureParameter –param asm_power_limit=3 –sysAsmPassword my_sysasm_password

Create a Disk Group-createDiskGroup creates disk groups in an Oracle ASM instance.

Syntax

asmca -silent -createDiskGroup [ -diskString discovery_path ] { -diskGroupName diskgroup { -disk disk_path [-diskName disk] | -diskList disk_list [-diskSize disk_size_MB] [-failuregroup failure_group]

Chapter 9ASMCA Command-Line Interface

9-8

Page 251: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

[-force|-noforce] [-quorum|-noquorum] } [ -redundancy { HIGH | NORMAL | EXTERNAL } ] } ] [-au_size value] [-compatible.asm value ] [-compatible.rdbms value ] [-compatible.advm value ] } [-sysAsmPassword sysasm_password ]

Table 9-4 contains the options available with the -createDiskGroup command.

Table 9-4 Options for the -createDiskGroup command

Option Description

-diskString discovery_path Specifies the Oracle ASM discovery string for locatingdisks.

-diskGroupName diskgroup Specifies the name of the Oracle ASM disk group tocreate.

-disk disk_path Specifies the full path of the disk device.

-diskName disk Specifies a user-supplied disk name.

-diskList disk_list Specifies a comma-delimited list of disk names to beadded to the disk group.

-diskSize disk_size_MB Specifies the size of the disk to use for Oracle ASMstorage.

-failuregroup failure_group Specifies the failure group name.

-force | -noforce Specifies where to force the use of the disk.

-quorum | -noquorum Specifies a quorum or standard failure group.

-redundancy { HIGH | NORMAL | EXTERNAL} Specifies the redundancy setting for the Oracle ASM diskgroup.

-au_size Specifies the allocation unit size (1,2,4,8,16,32,64)

-compatible.asm Specifies the attribute setting.

-compatible.rdbms Specifies the attribute setting.

-compatible.advm Specifies the attribute setting.

For additional options that are common to multiple commands, see Table 9-1.

For information about disk group compatibility attributes, see Disk Group Compatibility.

Examples

To create disk groups in an Oracle ASM instance:

Example 9-3 Using asmca -silent -createDiskGroup

$ asmca -silent -createDiskGroup -diskGroupName mynewdg -disk '/devices/diske*' -disk '/devices/diskk*' -redundancy NORMAL -au_size 64 -compatible.asm '19.0.0.0.0' -compatible.rdbms '19.0.0.0.0' -compatible.advm '19.0.0.0.0'

Chapter 9ASMCA Command-Line Interface

9-9

Page 252: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

DiskGroup mynewdg created successfully.

Edit Oracle ASM Disk Group Attributes-editDiskGroupAttributes updates the Oracle ASM disk group attributes.

Syntax and Description

-editDiskGroupAttributes (-diskGroupName disk_group) (-attribute value)

The following table contains the options available with the —editDiskGroupAttributescommand.

Table 9-5 Options for the -editDiskGroupAttributes command

Option Description

-diskGroupName diskgroup Specifies the name of the Oracle ASM disk group tocreate.

-attribute value Specifies the name and assigned value of anattribute.

Add a Disk to a Disk Group-addDisk add disks to an existing disk group in an Oracle ASM instance.

Syntax

asmca -silent -addDisk [ -diskString discovery_path ] {-diskGroupName diskgroup {-disk disk_path [-diskName disk] | -diskList disk_list [-diskSize disk_size_MB] [-failuregroup failure_group] [-force|-noforce] [-quorum|-noquorum] } [-sysAsmPassword sysasm_password ]

Table 9-6 contains the options available with the -addDisk command.

Table 9-6 Options for the -addDisk command

Option Description

-diskString discovery_path Specifies the Oracle ASM discovery string forlocating disks.

-diskGroupName diskgroup Specifies the name of the Oracle ASM disk group toupdate.

-diskList disk_list Specifies a comma-delimited list of disk names to beadded to the disk group.

Chapter 9ASMCA Command-Line Interface

9-10

Page 253: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 9-6 (Cont.) Options for the -addDisk command

Option Description

-diskSize disk_size_MB Specifies the size of the disk to use for Oracle ASMstorage.

-failuregroup failure_group Specifies the failure group name.

-force | -noforce Specifies where to force the use of the disk.

-quorum | -noquorum Specifies a quorum or standard failure group.

For additional options that are common to multiple commands, see Table 9-1.

Examples

To add disks to an existing disk group:

Example 9-4 Using asmca -silent -addDisk

asmca -silent -addDisk -diskGroupName mynewdg -disk '/devices/diskl1' -disk '/devices/diskl2'

Disks added successfully to diskgroup mynewdg.

Create Oracle ASM File Groups-createFileGroups creates Oracle ASM file groups.

Syntax and Description

-createFileGroups (-diskGroupName disk_group) (-fileGroupNames file_group_name_list) (-fileGroupUsages file_group_usages_list) (-fileGroupUsageIDs file_group_usagesID_list)

The following table contains the options available with the —createFileGroups command.

Table 9-7 Options for the -createFileGroups command

Option Description

-diskGroupName disk_group Specifies the name of the Oracle ASM disk group.

-fileGroupNamesfile_group_name_list

Specifies a comma-delimited list of file group names tobe added to the disk group.

-fileGroupUsagesfile_group_usages_list

Specifies a comma-delimited list of file group usagestrings to be processed.

-fileGroupUsagesIDsfile_group_usagesID_list

Specifies a comma-delimited list of file group usage IDsto be processed.

Chapter 9ASMCA Command-Line Interface

9-11

Page 254: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Drop Oracle ASM File Groups-dropFileGroups drops Oracle ASM file groups.

Syntax and Description

-dropFileGroups (-diskGroupName disk_group) (-fileGroupNames file_group_name_list)

The following table contains the options available with the —dropFileGroupscommand.

Table 9-8 Options for the -dropFileGroups command

Option Description

-diskGroupName disk_group Specifies the name of the Oracle ASM disk group tocreate.

-fileGroupNamesfile_group_name_list

Specifies a comma-delimited list of file group namesto be dropped.

Create Oracle ASM Quota Groups—createQuotaGroups creates Oracle ASM quota groups.

Syntax and Description

-createQuotaGroups (-diskGroupName disk_group) (-quotaGroupNames quota_group_name_list) (-quotaGroupSizes quota_group_size_list)

The following table contains the options available with the —createQuotaGroupscommand.

Table 9-9 Options for the -createQuotaGroups command

Option Description

-diskGroupName disk_group Specifies the name of the Oracle ASM disk group.

-quotaGroupNamesquota_group_name_list

Specifies a comma-delimited list of quota groupnames to be added to the disk group.

-quotaGroupSizesquota_group_size_list

Specifies a comma-delimited list of quota groupsizes to be processed.

Drop Oracle ASM Quota Groups-dropQuotaGroups drops Oracle ASM quota groups.

Chapter 9ASMCA Command-Line Interface

9-12

Page 255: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Syntax and Description

-dropQuotaGroups (-diskGroupName disk_group) (-quotaGroupNames quota_group_names_list)

The following table contains the options available with the —dropQuotaGroups command.

Table 9-10 Options for the -dropQuotaGroups command

Option Description

-diskGroupName disk_group Specifies the name of the Oracle ASM disk group.

-quotaGroupNamesquota_group_name_list

Specifies a comma-delimited list of quota group namesto be dropped.

Chapter 9ASMCA Command-Line Interface

9-13

Page 256: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

10Managing Oracle ASM with ASMCMD

Oracle Automatic Storage Management (Oracle ASM) Command-Line Utility (ASMCMD)provides commands for managing Oracle ASM.

This chapter describes the Oracle Automatic Storage Management (Oracle ASM) Command-Line Utility (ASMCMD). This chapter contains the following topics:

• About ASMCMD

• ASMCMD Instance Management Commands

• ASMCMD Client Cluster Management Commands

• ASMCMD Oracle ASM Filter Driver Management Commands

• ASMCMD Audit Files Management Commands

• ASMCMD File Management Commands

• ASMCMD Disk Group Management Commands

• ASMCMD File Group Management Commands

• ASMCMD Template Management Commands

• ASMCMD File Access Control Commands

See Also:

Oracle Automatic Storage Management Cluster File System Administrator's Guidefor information about ASMCMD commands to manage Oracle ADVM volumes

Note:

Oracle does not recommend using identifiers for Oracle Database object namesthat must be quoted. While the use of quoted identifiers may be valid as names insome command-line tools or in SQL statements, such as CREATE DISKGROUP"1DATA", the names may not be valid when using other tools that manage the object.For more information about naming Oracle Database objects, refer to OracleDatabase SQL Language Reference.

ASMCMD Audit Files Management CommandsThis document describes the ASMCMD Oracle ASM audit files management commands.

The following table provides a summary of ASMCMD audit files management commands.

10-1

Page 257: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

NOT_SUPPORTED

Command Description

audcleanaudittrail Deletes the audit files of the specified audit trail type.

audclearproperty Clears the value for the specified audit property.

audcleartimestamp Clears the last archive timestamp set by “audsettimestamp” command.

audcreatejob Creates a purge job for specified audit trail type.

auddropjob Drops the specified audit purge job.

audsetdebug Sets the tracing to the specified debug level.

audsetjobinterval Sets the job interval for the specified audit purge job.

audsetjobstatus Sets the status of the specified purge job to either “enable” or “disable”state.

audsetproperty Sets the value of specified audit property for given audit trail type.

audsettimestamp Sets the last archive timestamp for specified audit trail type.

audshowtimestamp Displays the last archive timestamps set by "audsettimestamp"command.

lsaudcleanupjobs Displays the configured audit trail purge jobs.

lsaudconfigparams Displays the configured audit trail properties for the given audit trailtype.

audcleanaudittrailPurpose

Deletes the audit files of the specified audit trail type. The command will delete thefiles based on Last Archive Timestamp set using “audsettimestamp" command, if --useTimestamp option is specified. Else, it will delete all the files that are not beingactively written to.

Syntax and Description

audcleanaudittrail {--os|--uni} [--useTimestamp]

Options for the audcleanaudittrail command

Table 10-2 Options for the audcleanaudittrail command

Option Description

--os Cleans up audit files of OS audit trail type.

--uni Cleans up audit files of Unified audit trail type.

--useTimestamp If specified, uses last archive timestamp in cleaning up the auditrecords.

Examples

The following are examples of audcleanaudittrail command.

Chapter 10ASMCMD Audit Files Management Commands

10-2

Page 258: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

In the example below, the audit files of OS audit trail type that are older than the timestampspecified by "audsettimestamp" command will be deleted.

Example 10-1 Using the ASMCMD audcleanaudittrail command

ASMCMD> audcleanaudittrail --os --useTimestamp

In the example below, the audit files of Unified audit trail type that are older than thetimestamp specified by "audsettimestamp" command will be deleted

Example 10-2 Using the ASMCMD audcleanaudittrail command

ASMCMD> audcleanaudittrail --uni --useTimestamp

audclearpropertyPurpose

Clears the value for the specified audit property. When --use_def argument is used, thevalue of the property is set to its respective default value.

Syntax and Description

audclearproperty {--file_max_size|--file_max_age} [--use_def] {--os|--uni}

Options for the audclearproperty command

Table 10-3 Options for the audclearproperty command

Option Description

--file_max_size Maximum audit file size

Note:

For more details, see AdministeringOracle ASM audit trail

--file_max_age Maximum audit file age

Note:

For more details, see AdministeringOracle ASM audit trail

--use_def Resets or sets the value back to default value.

--os Clears property of OS audit trail type.

--uni Clears property of Unified audit trail type.

Chapter 10ASMCMD Audit Files Management Commands

10-3

Page 259: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

The default value for the age of an audit file is 5 Days and the default valuefor the size of an audit file is 10 MB.

Examples

The following are examples of audclearproperty command.

The example below sets the file_max_size property for the audit files of OS audit trailtype to its default value.

Example 10-3 Using the ASMCMD audclearproperty command

ASMCMD> audclearproperty --file_max_size --use_def --os

The example below specifies to clear the file_max_age property for the audit files ofUnified audit trail type. In other words, it sets file_max_age property to zero.

Example 10-4 Using the ASMCMD audclearproperty command

ASMCMD> audclearproperty --file_max_age --uni

audcleartimestampPurpose

Clears the last archive timestamp set by audsettimestamp.

Syntax and Description

audcleartimestamp {--os --inst <instancenumber> |--uni}

Options for the audcleartimestamp command

Table 10-4 Options for the audcleartimestamp command

Option Description

--os Clears the last archive timestamp set for OS audit trail type.

--uni Clears the last archive timestamp set for Unified audit trail type.

--inst<instancenumber>

Instance number

Examples

The following are examples of audcleartimestamp command.

The example below clears the last archive timestamp set for instance number 1 of OSaudit trail type.

Example 10-5 Using the ASMCMD audcleartimestamp command

ASMCMD> audcleartimestamp --os --inst 1

The example below clears the last archive timestamp set for Unified audit trail type.

Chapter 10ASMCMD Audit Files Management Commands

10-4

Page 260: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 10-6 Using the ASMCMD audcleartimestamp command

ASMCMD> audcleartimestamp --uni

audcreatejobPurpose

Creates a purge job for specified audit trail type. The purge job runs at a frequency specifiedby --int and purges the audit files.

Syntax and Description

audcreatejob --name <job_name> --int <purge_int> {--os | --uni} [--use_ts]

Options for the audcreatejob command.

Table 10-5 Options for the audcreatejob command

Option Description

--name <job_name> Name of the purge job

--int <purge_int> Purge interval in hours

--os Purge job for OS audit trail type

--uni Purge job for Unified audit trail type

--use_ts When specified, the purge will be based on the last archive timestampset by audsettimestamp command.

Examples

The following are examples for audcreatejob command.

The example below creates a job called OSAUD_PURGE with purge interval 10 hours for OSaudit trail type and the job will use the timestamp, set earlier using audsettimestamp, whilepurging audit files (since --use_ts is specified).

Example 10-7 Using the ASMCMD audcreatejob command

ASMCMD> audcreatejob --name OSAUD_PURGE --int 10 --os --use_ts

The example below creates a job called OSAUD_NOTS with purge interval 10 hours for OS audittrail type and the job will NOT use the timestamp, set earlier using audsettimestamp, whilepurging audit files (since --use_ts is NOT specified).

Example 10-8 Using the ASMCMD audcreatejob command

ASMCMD> audcreatejob --name OSAUD_NOTS --int 10 –os

auddropjobPurpose

Drops the specified audit purge job. This command does not require any audit trail typeinformation.

Chapter 10ASMCMD Audit Files Management Commands

10-5

Page 261: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Syntax and Description

auddropjob --name <job_name>

Options for the auddropjob command.

Table 10-6 Options for the auddropjob command

Option Description

--name <job_name> Name of the purge job

Examples

The following drops the audit purge job OSAUD_PURGE.

Example 10-9 Using the ASMCMD auddropjob command

ASMCMD> auddropjob --name OSAUD_PURGE

audsetdebugPurpose

Sets the tracing to the specified debug level.

Syntax and Description

audsetdebug {--debug | --error}

Options for the audsetdebug command.

Table 10-7 Options for the audsetdebug command

Option Description

--debug Dumps all debug information into the traces.

--error Dumps only error information into the traces.

Note:

The default debug level is "error".

Examples

The following example sets the debug level to "debug".

Example 10-10 Using the ASMCMD audsetdebug command

ASMCMD> audsetdebug --debug

Chapter 10ASMCMD Audit Files Management Commands

10-6

Page 262: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

audsetjobintervalPurpose

Sets the job interval for the specified audit purge job.

Syntax and Description

audsetjobinterval --name <job_name> --int <interval>

Options for the audsetjobinterval command.

Table 10-8 Options for the audsetjobinterval command

Option Description

--name <job_name> Name of audit purge job

--int <interval> Interval in hours

Examples

The following example sets the interval of audit cleanup job OSAUD_PURGE to 10 hours.

Example 10-11 Using the ASMCMD audsetjobinterval command

ASMCMD> audsetjobinterval --name OSAUD_PURGE --int 10

audsetjobstatusPurpose

Sets the status of the specified purge job to enabled or disabled state.

Syntax and Description

audsetjobstatus --name <job_name> {--disable | --enable}

Options for the audsetjobstatus command.

Table 10-9 Options for the audsetjobstatus command

Option Description

--name <job_name> Audit purge job name

--enable/--disable Enables or disables the given job.

Note:

Audit purge job, when disabled, will not purge audit files periodically.

Chapter 10ASMCMD Audit Files Management Commands

10-7

Page 263: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Examples

The following example disables the audit job OSAUD_PURGE.

Example 10-12 Using the ASMCMD audsetjobstatus command

ASMCMD> audsetjobstatus --name OSAUD_PURGE --disable

audsetpropertyPurpose

Sets the value of specified audit property for given audit trail type.

Syntax and Description

audsetproperty {--file_max_size | --file_max_age } --val <value> {--os | --uni}

Options for the audsetproperty command.

Table 10-10 Options for the audsetproperty command

Option Description

--file_max_size Maximum size of the audit file

Note:

The value for file_max_sizeproperty must be in range[1,2000000] KB.

--file_max_age Maximum age of the audit file

Note:

The value for file_max_ageproperty must be in range [1, 497]days.

--val <value> Value of the property

--os Sets property for OS audit trail type.

--uni Sets property for Unified audit trail type.

Examples

The following are examples of the audsetproperty command.

The example below sets the file_max_size property for the audit files of OS audit trailtype audit file to 10 KB.

Chapter 10ASMCMD Audit Files Management Commands

10-8

Page 264: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 10-13 Using the ASMCMD audsetproperty command

ASMCMD> audsetproperty --file_max_size --val 10 --os

The example below sets the file_max_age property for the audit files of Unified audit trailtype to 10 Days.

Example 10-14 Using the ASMCMD audsetproperty command

ASMCMD> audsetproperty --file_max_age --val 10 --uni

audsettimestampPurpose

Sets the last archive timestamp for specified audit trail type. This timestamp will be used bythe audit purge job and audcleanaudittrail command, if they are configured with --useTimestamp option. In case of OS audit trail type, instance number is required.

Syntax and Description

audsettimestamp {--os|--uni} [--inst <id>] <timestamp>

Options for the audsettimestamp command.

Table 10-11 Options for the audsettimestamp command

Option Description

--os Last archive timestamp for OS audit trail type

--uni Last archive timestamp for Unified audit trail type

--inst <id> Instance number

<timestamp> Timestamp

Examples

The following example sets the last archive timestamp of OS audit trail type in instancenumber 1.

Example 10-15 Using the ASMCMD audsettimestamp command

ASMCMD> audsettimestamp --os --inst 1 22-AUG-2012 07:48:53

audshowtimestampPurpose

Displays the last archive timestamp set using "audsettimestamp" command.

Syntax and Description

audshowtimestamp [{--os|--uni}] [-g]

Options for the audshowtimestamp command.

Chapter 10ASMCMD Audit Files Management Commands

10-9

Page 265: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-12 Options for audshowtimestamp command

Option Description

--os Displays last archive timestamp set for OS audit trail type.

--uni Displays last archive timestamp set for Unified audit trail type.

-g Displays clusterwide timestamp information.

Examples

The following are examples of the audshowtimestamp command.

The example below displays the last archive timestamp set for OS audit trail type.

Example 10-16 Using the ASMCMD audshowtimestamp command

ASMCMD> audshowtimestamp --os

The example below displays the clusterwide timestamp information for OS audit trailtype.

Example 10-17 Using the ASMCMD audshowtimestamp command

ASMCMD> audshowtimestamp --os -g

See Also:

• Database Reference for V$ASM_AUDIT_LAST_ARCH_TS

lsaudcleanupjobsPurpose

Displays the configured audit trail purge jobs.

Syntax and Description

lsaudcleanupjobs [--os |--uni]

Options for the lsaudcleanupjobs command.

Table 10-13 Options for lsaudcleanupjobs command

Option Description

--os Displays only the purge job configured for OS audit trail type.

--uni Displays only the purge job configured for Unified audit trail type.

Chapter 10ASMCMD Audit Files Management Commands

10-10

Page 266: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

lsaudcleanupjobs displays the purge jobs configured for both OS and Unified audittrail types, when no audit trail option is provided.

Examples

The following example queries audit cleanup jobs configured for OS audit trail type.

Example 10-18 Using the ASMCMD lsaudcleanupjobs command

ASMCMD> lsaudcleanupjobs --os

See Also:

• Database Reference for V$ASM_AUDIT_CLEANUP_JOBS

lsaudconfigparamsPurpose

Displays the configured audit trail properties for the given audit trail type.

Syntax and Description

lsaudconfigparams [{--os|--uni}]

Options for the lsaudconfigparams command.

Table 10-14 Options for lsaudconfigparams command

Option Description

--os Displays only the audit trail properties of OS audit trail type.

--uni Displays only the audit trail properties of unified audit trail type.

Note:

lsaudconfigparams displays the audit configuration properties for both OS andUnified audit trail type, when no audit trail type option is provided.

Examples

The following example queries audit configuration parameters for OS audit trail type.

Example 10-19 Using the ASMCMD lsaudconfigparams command

ASMCMD> lsaudconfigparams --os

Chapter 10ASMCMD Audit Files Management Commands

10-11

Page 267: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Database Reference for V$ASM_AUDIT_CONFIG_PARAMS

About ASMCMDASMCMD is a command-line utility that you can use to manage Oracle ASMinstances, disk groups, file access control for disk groups, files and directories withindisk groups, templates for disk groups, and volumes.

You can run the ASMCMD utility in either interactive or noninteractive mode.

This section contains the following topics:

• Types of ASMCMD Commands

• About Oracle ASM Files, File Names, Directories, and Aliases

• Preparing to Run ASMCMD

• Running ASMCMD in Interactive Mode

• Running ASMCMD in Noninteractive Mode

• Getting Help

Types of ASMCMD CommandsThe types of ASMCMD commands are listed in Table 10-15.

Table 10-15 Types of ASMCMD commands

Category Commands

Oracle ASM instance management For a list of commands, refer to ASMCMD InstanceManagement Commands

Oracle ASM client cluster For a list of commands, refer to ASMCMD Client ClusterManagement Commands

Oracle ASM Filter Driver management For a list of commands, refer to ASMCMD Oracle ASMFilter Driver Management Commands

Oracle ASM Audit Files management For a list of commands, refer to ASMCMD Audit FilesManagement Commands

Oracle ASM file management For a list of commands, refer to ASMCMD FileManagement Commands

Oracle ASM disk group management For a list of commands, refer to ASMCMD Disk GroupManagement Commands

Oracle ASM file group management For a list of commands, refer to ASMCMD File GroupManagement Commands

Oracle ASM template management For a list of commands, refer to ASMCMD TemplateManagement Commands

Oracle ASM file access control For a list of commands, refer to ASMCMD File AccessControl Commands

Chapter 10About ASMCMD

10-12

Page 268: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

Oracle Automatic Storage Management Cluster File System Administrator's Guidefor information about ASMCMD commands to manage Oracle ADVM volumes

About Oracle ASM Files, File Names, Directories, and AliasesASMCMD works with Oracle ASM files, directories, and aliases. Before using ASMCMD, youshould understand how these common computing concepts apply to the Oracle ASMenvironment.

This section contains the following topics:

• System-Generated File Name or Fully Qualified File Name

• Directory

• Alias

• Absolute Path and Relative Path

• Wildcard Characters

System-Generated File Name or Fully Qualified File NameEvery file created in Oracle ASM gets a system-generated file name, otherwise known as afully qualified file name. This is similar to a complete path name in a local file system.

Oracle ASM generates file names according to the following scheme:

+diskGroupName/databaseName/fileType/fileTypeTag.fileNumber.incarnation

An example of a fully qualified file name is the following:

+data/orcl/CONTROLFILE/Current.256.541956473

In the previous fully qualified file name, data is the disk group name, orcl is the databasename, CONTROLFILE is the file type, and so on.

Only the slash (/) is supported by ASMCMD. File Names are not case sensitive, but are caseretentive. If you type a path name as lowercase, ASMCMD retains the lowercase.

For more information about Oracle ASM file names, refer to Fully Qualified File Name Form.

DirectoryAs in other file systems, an Oracle ASM directory is a container for files, and an Oracle ASMdirectory can be part of a tree structure of other directories. The fully qualified file namerepresents a hierarchy of directories in which the plus sign (+) represents the root directory. Ineach disk group, Oracle ASM automatically creates a directory hierarchy that corresponds tothe structure of the fully qualified file names in the disk group. The directories in this hierarchyare known as system-generated directories.

ASMCMD enables you to move up and down in this directory hierarchy with the cd (changedirectory) command. The ASMCMD ls (list directory) command lists the contents of thecurrent directory, while the pwd command prints the name of the current directory.

Chapter 10About ASMCMD

10-13

Page 269: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

When you start ASMCMD, the current directory is set to root (+). For an Oracle ASMinstance with two disk groups, for example, data and fra, entering an ls commandwith the root directory as the current directory produces the following output:

ASMCMD> lsdata/fra/

The following example demonstrates navigating the Oracle ASM directory tree (refer tothe fully qualified file name shown previously):

ASMCMD> cd +data/orcl/CONTROLFILEASMCMD> lsCurrent.256.541956473Current.257.541956475

You can create your own directories as subdirectories of the system-generateddirectories using the ASMCMD mkdir command. The directories that you create canhave subdirectories, and you can navigate the hierarchy of both system-generateddirectories and user-created directories with the cd command.

The following example creates the directory mydir under orcl in the disk group data:

ASMCMD> mkdir +data/orcl/mydir

Note:

The directory orcl is a system-generated directory. The contents of datarepresent the contents of disk group data.

If you start ASMCMD with the -p flag, then ASMCMD shows the current directory aspart of its prompt. See Including the Current Directory in the ASMCMD Prompt.

ASMCMD [+] > cd data/orclASMCMD [+data/orcl] >

ASMCMD retains the case of the directory that you entered.

AliasAliases are file names that are references or pointers to system-generated file names.However, aliases are user-friendly names. Aliases are similar to symbolic links in UNIXor Linux computers. You can create aliases to simplify Oracle ASM file nameadministration. You can create aliases with the mkalias ASMCMD command or a SQLALTER DISKGROUP command.

An alias has at a minimum the disk group name as part of its complete path. You cancreate aliases at the disk group level or in any system-generated or user-createdsubdirectory. The following are examples of aliases:

+data/ctl1.f+data/orcl/ctl1.f+data/mydir/ctl1.f

If you run the ASMCMD ls (list directory) with the -l flag, each alias is listed with thesystem-generated file to which the alias refers.

Chapter 10About ASMCMD

10-14

Page 270: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

ctl1.f => +data/orcl/CONTROLFILE/Current.256.541956473

For more information about aliases, refer to Alias Oracle ASM File Name Forms.

Absolute Path and Relative PathWhen you run an ASMCMD command that accepts a file name or directory name as anargument, you can use the name as either an absolute path or a relative path.

An absolute path refers to the full path of a file or directory. An absolute path begins with aplus sign (+) followed by a disk group name, followed by subsequent directories in thedirectory tree. The absolute path includes directories until the file or directory of interest isreached. A complete system-generated file name, otherwise known as the fully qualified filename, is an example of an absolute path to a file.

Using an absolute path enables the command to access the file or directory regardless ofwhere the current directory is set. The following rm command uses an absolute path for thefile name:

ASMCMD [+] > rm +data/orcl/datafile/users.259.555341963

The following cd command uses an absolute path to the directory.

ASMCMD [+data/mydir] > cd +data/orcl/CONTROLFILE

A relative path includes only the part of the file name or directory name that is not part of thecurrent directory. That is, the path to the file or directory is relative to the current directory.

In the following example, the rm command operates on the file undotbs1.272.557429239,which in this case is a relative path. ASMCMD appends the current directory to the commandargument to obtain the absolute path to the file. In this example this is +data/orcl/DATAFILE/undotbs1.272.557429239.

ASMCMD [+] > cd +dataASMCMD [+data] > cd orcl/DATAFILEASMCMD [+data/orcl/DATAFILE] > lsEXAMPLE.269.555342243SYSAUX.257.555341961SYSTEM.256.555341961UNDOTBS1.258.555341963UNDOTBS1.272.557429239USERS.259.555341963ASMCMD [+data/orcl/DATAFILE] > rm undotbs1.272.557429239

Paths to directories can also be relative. You can go up or down the hierarchy of the currentdirectory tree branch by providing a directory argument to the cd command whose path isrelative to the current directory.

In addition, you can use the pseudo-directories "." and ".." rather than a directory name. The"." pseudo-directory is the current directory. The ".." pseudo-directory is the parent directoryof the current directory.

The following example demonstrates how to use relative directory paths and pseudo-directories:

ASMCMD [+data/orcl] > cd DATAFILEASMCMD [+data/orcl/DATAFILE] >cd ..ASMCMD [+data/orcl] >

Chapter 10About ASMCMD

10-15

Page 271: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Wildcard CharactersThe wildcard characters * and % match zero or more characters anywhere within anabsolute or relative path, which saves typing of the full directory or file name. The twowildcard characters behave identically. There are various ASMCMD commands thataccept wildcards, such as cd, du, find, ls, lsattr, lsdg, lsdsk, lsgrp, lsusr, and rm.

If a wildcard pattern matches only one directory when using wildcard characters withcd, then cd changes the directory to that destination. If the wildcard pattern matchesmultiple directories, then ASMCMD does not change the directory but instead returnsan error.

If you are running ASMCMD commands in noninteractive mode, then with mostoperating systems you must enclose the wildcard characters in quotes. For moreinformation, refer to Running ASMCMD in Noninteractive Mode.

Example 10-20 illustrates the use of wildcards.

Example 10-20 Using wildcards with ASMCMD commands

ASMCMD [+] > cd +data/orcl/*FILEASMCMD-08005: +data/orcl/*FILE: ambiguous

ASMCMD [+] > cd +data/orcl/C*ASMCMD [+data/orcl/CONTROLFILE] >

ASMCMD [+] > ls +fra/orcl/A%2009_07_13/2009_07_14/

ASMCMD [+] > ls +fra/orcl/ARCHIVELOG/2009%

+fra/orcl/ARCHIVELOG/2009_07_13/:thread_1_seq_3.260.692103543thread_1_seq_4.261.692108897thread_1_seq_5.262.692125993thread_1_seq_6.263.692140729thread_1_seq_7.264.692143333 +fra/orcl/ARCHIVELOG/2009_07_14/:thread_1_seq_8.271.692158265thread_1_seq_9.272.692174597

ASMCMD [+] > ls data/orcl/*

+data/orcl/CONTROLFILE/:Current.260.692103157

+data/orcl/DATAFILE/:EXAMPLE.265.692103187SYSAUX.257.692103045SYSTEM.256.692103045UNDOTBS1.258.692103045USERS.259.692103045

+data/orcl/ONLINELOG/:group_1.261.692103161group_2.262.692103165group_3.263.692103169

Chapter 10About ASMCMD

10-16

Page 272: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

+data/orcl/PARAMETERFILE/:spfile.266.692103315

+data/orcl/TEMPFILE/:TEMP.264.692103181spfileorcl.ora

Preparing to Run ASMCMDYou should review the information in this topic before running the ASMCMD utility.

You can run the ASMCMD utility in either interactive or noninteractive mode. Before runningASMCMD, review the items in the following list.

• Log in to the host which contains the Oracle ASM instance that you plan to administer.

You must log in as a user that has SYSASM or SYSDBA privileges through operatingsystem authentication. The SYSASM privilege is the required connection to administerthe Oracle ASM instance.

• To connect to the Oracle ASM instance, run ASMCMD that is located in the binsubdirectory of the Oracle Grid Infrastructure home (Oracle ASM home).

Connect as SYSASM, the default connection, to administer an Oracle ASM instance.

Ensure that the ORACLE_HOME and ORACLE_SID environment variables to refer to theOracle ASM instance. Depending on your operating system, you might have to set otherenvironment variables to properly connect to the Oracle ASM instance.

Ensure that the bin subdirectory of your Oracle Grid Infrastructure home is in your PATHenvironment variable.

The default value of the Oracle ASM SID for a single-instance database is +ASM. InOracle Real Application Clusters environments, the default value of the Oracle ASM SIDon any node is +ASMnode#.

• To use most of the ASMCMD commands, ensure that the Oracle ASM instance is startedand the Oracle ASM disk groups are mounted.

If the Oracle ASM instance is not running, ASMCMD runs only those commands that donot require an Oracle ASM instance. The commands include startup, shutdown, lsdsk,help, and exit. If you attempt to run other ASMCMD commands, an error messagedisplays.

• You can connect to the database instance as SYSDBA by running ASMCMD that islocated in the bin directory of the Oracle Database home.

Ensure that the ORACLE_HOME and ORACLE_SID environment variables to refer to thedatabase instance. Depending on your operating system, you might have to set otherenvironment variables to properly connect to the database instance.

You must include the --privilege option to connect as SYSDBA.

With this connection, there is a limited set of operations that can be run.

When administering disk groups, Oracle recommends that you run ASMCMD from thedatabase home of the database instance that is the owner of the files in the disk group.

Chapter 10About ASMCMD

10-17

Page 273: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Authentication for Accessing Oracle ASM Instances for more informationabout authentication for accessing Oracle ASM instances

• Specifying the Type of Connection for more information about specifyingconnection options

• The SYSDBA Privilege for Managing Oracle ASM Components for moreinformation about permissions and connections

• Oracle Database Administrator’s Guide for more information aboutsetting environment variables

• Oracle Database Administrator’s Guide for information about operatingsystem authentication

Running ASMCMD in Interactive ModeThe interactive mode of the ASMCMD utility provides a shell-like environment whereyou are prompted to enter ASMCMD commands.

This section contains the following topics:

• Syntax for Starting ASMCMD

• Running ASMCMD without Any Options

• Specifying the Type of Connection

• Specifying the Verbose Mode

• Including the Current Directory in the ASMCMD Prompt

• Displaying the ASMCMD Version Number

Syntax for Starting ASMCMDThe syntax for starting ASMCMD in interactive mode is:

asmcmd [-V]asmcmd [--nocp] [-v {errors|warnings|normal|info|debug}] [--privilege connection_type ] [-p] [--inst instance_name] [--discover]

Table 10-16 summarizes the ASMCMD options.

Table 10-16 ASMCMD interactive options

Option Description

-V Displays the version of ASMCMD and then exits.

--nocp Disables connection pooling. For information about connectionpooling, refer to Oracle Database Administrator's Guide.

Chapter 10About ASMCMD

10-18

Page 274: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-16 (Cont.) ASMCMD interactive options

Option Description

-v display_level Displays additional information with some commands to helpusers diagnose problems and writes to a message file whenlogging is required. normal is the default if the display level isnot specified.

--privilegeconnection_type

Specifies the privilege to connect as when accessing an OracleASM or database instance. Can be either SYSASM or SYSDBA.The default is SYSASM and is used when administering theOracle ASM instance.

-p Displays the current directory in the prompt.

--inst instance_name Specifies to connect to a specific Oracle ASM instance.

--discover Uses the discovery string obtained from listener, not from theORACLE_SID environmental variable.

The ORACLE_HOME and ORACLE_SID environment variables determine the instance to whichASMCMD connects. ASMCMD establishes a bequeath connection in the same manner asSQLPLUS / AS SYSASM which requires the user to be a member of the OSASM group.

When Oracle Flex ASM is enabled, ASMCMD connects to any one of the Oracle ASMinstances running in the cluster. The connection to the Oracle ASM instance does not dependon the ORACLE_HOME and ORACLE_SID environment variables. The ASMCMD alert log showswhich instance ASMCMD is connected to. If you want to connect to a specific Oracle ASMinstance, then use the --inst option.

ASMCMD can be started with multiple options. For example:

asmcmd -p -v info

For the majority of the examples in this chapter, ASMCMD was started with the -p option.

Running ASMCMD without Any OptionsTo run ASMCMD in interactive mode without any options:

1. Enter the following at the operating system command prompt:

asmcmd

Oracle displays an ASMCMD command prompt as follows:

ASMCMD>

2. Enter an ASMCMD command and press Enter. The command runs and displays itsoutput, if any, and then ASMCMD prompts for the next command.

3. Continue entering ASMCMD commands until you have completed the tasks.

4. Enter the exit or quit command to exit ASMCMD.

Specifying the Type of ConnectionYou can specify the --privilege option to choose the type of connection, either SYSASM orSYSDBA. The default value is SYSASM and is used when administering an Oracle ASM instance.Connect as SYSDBA when connecting to the database instance.

Chapter 10About ASMCMD

10-19

Page 275: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

For example:

$ asmcmd --privilege sysasm

Specifying the Verbose ModeYou can specify the -v option with the asmcmd command to display additionalinformation with some commands to help users diagnose problems as shown in thefollowing example:

$ asmcmd -v debug

When there is a message that must be logged during asmcmd operations, the messageis written to the alert.log file or the trace.trc file.

The alert.log file is created or updated when asmcmd is started with the -v errors, -vwarnings, or -v normal display level. The trace.trc file is created or updated whenasmcmd is started with the -v info or -v debug display level.

By default, the alert.log is file created in the $ORACLE_BASE/diag/asmcmd/user_username/hostname/alert/ directory. By default, the trace.trc file is created inthe $ORACLE_BASE/diag/asmcmd/user_username/hostname/trace/ directory.

Under certain circumstances, $ORACLE_BASE and $ORACLE_HOME can be set to overridethe default locations of the alert.log and trace.trc files.

Including the Current Directory in the ASMCMD PromptYou can specify the -p option with the asmcmd command to include the currentdirectory in the ASMCMD prompt as shown in the following example:

$ asmcmd -pASMCMD [+] > cd dataASMCMD [+data] >

Displaying the ASMCMD Version NumberYou can specify the -V option when starting asmcmd to display the asmcmd versionnumber. After displaying the version number, asmcmd immediately exits.

For example:

$ asmcmd -V asmcmd version 19.0.0.0.0

Running ASMCMD in Noninteractive ModeIn noninteractive mode, you run a single ASMCMD command by including thecommand and command options on the command line when invoking ASMCMD.ASMCMD runs the command, generates output if any, and then exits. Thenoninteractive mode is especially useful for running scripts.

On most operating systems, wildcard characters must be enclosed in quotes whenrunning ASMCMD commands in noninteractive mode.

Chapter 10About ASMCMD

10-20

Page 276: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

To run ASMCMD in noninteractive mode where command is any valid ASMCMD command andoptions is a list of command options, at the command prompt enter the following:

asmcmd command options

In noninteractive mode, ASMCMD returns the codes listed in Table 10-17.

Table 10-17 ASMCMD return codes

Type Return Code Description

General 0 No issues for the command.

General 1 Internal error.

General 255 or -1 External user error as returned by a command.

lsdsk 0 Results include member disks only.

lsdsk 1 Results include candidate disks only.

lsdsk 2 Results include both member and candidate disks.

Example 10-21 shows how to run ASMCMD in the noninteractive mode. The first commandruns the ls command to list the disk groups for the Oracle ASM instance. The secondcommand redirects the output of the lsod command to the my_lsod_test file. The thirdcommand runs lsdsk using a pattern with a wildcard character to list specific disks in thedata disk group. Note that wildcard characters must be enclosed in quotes when runningASMCMD in noninteractive mode on most operating systems.

Example 10-22 raises an error with an incorrect disk group name and the return code equal(255) is displayed.

Example 10-23 shows an example of ASMCMD commands run in noninteractive mode insidea script.

Example 10-21 Running ASMCMD commands in noninteractive mode

$ asmcmd ls -lState Type Rebal NameMOUNTED NORMAL N DATA/MOUNTED NORMAL N FRA/

$ asmcmd lsod --suppressheader -G data > my_lsod_test

$ asmcmd lsdsk -G data '/devices/diska*'Path/devices/diska1/devices/diska2/devices/diska3

Example 10-22 Displaying a return code when running ASMCMD in noninteractivemode

$ asmcmd ls -l datASMCMD-08001: diskgroup 'dat' does not exist or is not mounted

$ echo $?255

Chapter 10About ASMCMD

10-21

Page 277: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 10-23 Running ASMCMD commands in a script

#!/bin/shfor ((i = 1; i <=3; i++)) do asmcmd lsdsk -G data '/devices/diska'$idone

$ ./asmcmd_test_scriptPath/devices/diska1Path/devices/diska2Path/devices/diska3

Getting HelpType help at the ASMCMD prompt or as a command in noninteractive mode to viewgeneral information about ASMCMD and a list of available ASMCMD commands.

You can type help command to display help text for a specific command, includingusage information about how to run the command with its options.

The following is an example of the use of the help command.

Example 10-24 Displaying ASMCMD help text

ASMCMD [+] > help startup startup [--nomount] [--restrict] [--pfile <pfile.ora>] Start the ASM instance. [--nomount] specifies the nomount option. [--restrict] start the instance in restricted mode. [--pfile <pfile.ora>] specifies the location of the pfile.

ASMCMD Instance Management CommandsThis topic provides a summary of the ASMCMD instance management commands.

Some commands in this section affect the Grid Plug and Play (GPnP) profile, which isa resource in a clustered configuration. In an Oracle Restart configuration, the profileis actually located in a resource attribute, not the Grid Plug and Play (GPnP) profile.However, the functionality of the commands is the same for both configurations.

Note:

After a change has been made to the location of the password file, thefollowing SQL statement should be executed to flush the password filemetadata cache.

SQL> ALTER SYSTEM FLUSH PASSWORDFILE_METADATA_CACHE

The location of the password file can be changed by running orapwd, or theASMCMD pwcopy, pwcreate, pwdelete, pwmove, or pwset command.

Chapter 10ASMCMD Instance Management Commands

10-22

Page 278: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

Oracle Grid Infrastructure Installation and Upgrade Guide for your operating systemfor information about installing and configuring Oracle Grid Infrastructure

Table 10-18lists the Oracle ASM instance management commands with brief descriptions.

Table 10-18 Summary of ASMCMD instance management commands

Command Description

dsget Retrieves the discovery diskstring value that is used by the Oracle ASMinstance and its clients.

dsset Sets the disk discovery diskstring value that is used by the Oracle ASMinstance and its clients.

lsct Lists information about current Oracle ASM clients.

lsop Lists the current operations on a disk group or Oracle ASM instance.

lspwusr Lists the users from an Oracle ASM password file.

orapwusr Adds, drops, or changes an Oracle ASM password user.

pwcopy Copies a password file to the specified location.

pwcreate Creates a password file at the specified location.

pwdelete Deletes a password file at the specified location.

pwget Returns the location of the password file.

pwmove Moves the location of the password file.

pwset Sets the location of the password file.

showclustermode Displays the current mode of the Oracle ASM cluster.

showclusterstate Displays the current state of the cluster.

showpatches Lists the patches applied to the Oracle Grid Infrastructure home.

showversion Displays the Oracle ASM cluster release and software patch levels.

shutdown Shuts down an instance.

spbackup Backs up an Oracle ASM SPFILE.

spcopy Copies an Oracle ASM SPFILE.

spget Retrieves the location of the Oracle ASM SPFILE.

spmove Moves an Oracle ASM SPFILE.

spset Sets the location of the Oracle ASM SPFILE.

startup Starts up an instance.

dsgetPurpose

Retrieves the discovery diskstring value that is used by the Oracle ASM instance and itsclients.

Chapter 10ASMCMD Instance Management Commands

10-23

Page 279: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Syntax and Description

dsget [ --normal | --parameter | --profile [-f] ]

The syntax options for the dsget command are described in Table 10-19.

Table 10-19 Options for the dsget command

Option Description

--normal Retrieves the discovery string from the Grid Plug and Play(GPnP) profile and the one that is set in the Oracle ASMinstance. It returns one row each for the profile and parametersetting. This is the default setting.

--parameter Retrieves the ASM_DISKSTRING parameter setting of the OracleASM instance.

--profile [-f] Retrieves the discovery string from the GPnP profile. If -f isspecified with --profile, dsget retrieves the discovery stringfrom the local GPnP profile.

Example

The following example uses dsget to retrieve the current discovery diskstring valuefrom the GPnP profile and the ASM_DISKSTRING parameter.

Example 10-25 Using the ASMCMD dsget command

ASMCMD [+] > dsgetprofile: /devices1/disk*parameter: /devices2/disk*

dssetPurpose

Sets the discovery diskstring value that is used by the Oracle ASM instance and itsclients.

The specified diskstring must be valid for existing mounted disk groups. The updatedvalue takes effect immediately.

Syntax and Description

dsset [ --normal | --parameter | --profile [-f] ] diskstring

The syntax options for the dsset command are described in Table 10-20.

Chapter 10ASMCMD Instance Management Commands

10-24

Page 280: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-20 Options for the dsset command

Option Description

--normal Sets the discovery string in the Grid Plug and Play (GPnP) profile andin the Oracle ASM instance. The update occurs after the Oracle ASMinstance has successfully validated that the specified discovery stringhas discovered all the necessary disk groups and voting files. Thiscommand fails if the instance is not using a server parameter file(SPFILE).

This is the default setting.

--parameter Specifies that the diskstring is updated in memory after validating thatthe discovery diskstring discovers all the current mounted disk groupsand voting files. The diskstring is not persistently recorded in eitherthe SPFILE or the GPnP profile.

--profile [-f] Specifies the discovery diskstring that is pushed to the GPnP profilewithout any validation by the Oracle ASM instance, ensuring that theinstance can discover all the required disk groups. The update isguaranteed to be propagated to all the nodes that are part of thecluster.

If -f is specified with --profile, the specified diskstring is pushed tothe local GPnP profile without any synchronization with other nodes inthe cluster. This command option updates only the local profile file.This option should only be used for recovery. The command fails if theOracle Clusterware stack is running.

diskstring Specifies the value for the discovery diskstring.

For information about disk discovery and the discovery diskstring, see Oracle ASM DiskDiscovery.

Example

The following example uses dsset to set the current value of the discovery diskstring in theGPnP profile.

Example 10-26 Using the ASMCMD dsset command

ASMCMD [+] > dsset /devices1/disk*,/devices2/disk*

lsctPurpose

Lists information about current Oracle ASM clients from the V$ASM_CLIENT view. A client, suchas Oracle Database or Oracle ASM Dynamic Volume Manager (Oracle ADVM), uses diskgroups that are managed by the Oracle ASM instance to which ASMCMD is currentlyconnected.

Syntax and Description

lsct [--suppressheader] [-g] disk_group

The following table lists the options for the lsct command.

Chapter 10ASMCMD Instance Management Commands

10-25

Page 281: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-21 Options for the lsct command

Option Description

-g Selects from the GV$ASM_CLIENT view. GV$ASM_CLIENT.INST_ID isincluded in the output.

--suppressheader Suppresses column headings.

disk_group Specifies the disk group.

Client information is only listed for the specified disk group.

Example

The following example displays information about the clients that are accessing thedata disk group.

Example 10-27 Using the ASMCMD lsct command

ASMCMD [+] > lsct dataDB_Name Status Software_Version Compatible_version Instance_Name Disk_Group+ASM CONNECTED 19.0.0.0.0 19.0.0.0.0 +ASM DATAasmvol CONNECTED 19.0.0.0.0 19.0.0.0.0 +ASM DATAorcl CONNECTED 19.0.0.0.0 19.0.0.0.0 orcl DATA

lsopPurpose

Lists the current operations on a disk group in an Oracle ASM instance.

Syntax and Description

lsop

lsop displays information from the V$ASM_OPERATION view.

Example

The following are examples of the lsop command. The examples list operations on thedisk groups of the current Oracle ASM instance.

Example 10-28 Using the ASMCMD lsop command

ASMCMD [+] > lsopGroup_Name Dsk_Num State PowerDATA REBAL WAIT 2

ASMCMD [+] > lsopGroup_Name Dsk_Num State Power FRA REBAL REAP 3

Chapter 10ASMCMD Instance Management Commands

10-26

Page 282: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

lspwusrPurpose

List the users from the local Oracle ASM password file.

Syntax and Description

lspwusr [--suppressheader]

Table 10-22 lists the options for the lspwusr command.

Table 10-22 Options for the lspwusr command

Option Description

--suppressheader Suppresses column headers from the output.

Examples

The following is an example of the lspwusr example. The example lists the current users inthe local Oracle ASM password file.

Example 10-29 Using the ASMCMD lspwusr command

ASMCMD [+] > lspwusrUsername sysdba sysoper sysasm SYS TRUE TRUE TRUE ASMSNMP TRUE FALSE FALSE

orapwusrPurpose

Add, drop, or modify an Oracle ASM password file user.

Syntax and Description

orapwusr { --add | --modify | --delete | grant {sysasm|sysdba|sysoper} | --revoke {sysasm|sysdba|sysoper} } user

Table 10-23 lists the options for the orapwusr command.

Table 10-23 Options for the orapwusr command

Option Description

--add Adds a user to the password file. Also prompts for a password.

--modify Changes the password for the specified user.

--delete Drops a user from the password file.

--grant role Sets the role for the user. The options are sysasm, sysdba, andsysoper.

--revoke role Removes the role for the user. The options are sysasm, sysdba, andsysoper.

Chapter 10ASMCMD Instance Management Commands

10-27

Page 283: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-23 (Cont.) Options for the orapwusr command

Option Description

user Name of the user to add, drop, or modify.

orapwusr attempts to update passwords on all nodes in a cluster. This commandrequires the SYSASM privilege to run. A user logged in as SYSDBA cannot change itspassword using this command.

Examples

The following is an example of the orapwusr command. This example adds the hruserto the Oracle ASM password file.

Example 10-30 Using the ASMCMD orapwusr command

ASMCMD [+] > orapwusr --add hruser

pwcopyPurpose

Copies an Oracle ASM or database instance password file to the specified location.

Syntax and Description

pwcopy [--asm |--dbuniquename string] source destination [-f]

Table 10-24 lists the options for the pwcopy command.

Table 10-24 Options for the pwcopy command

Option Description

--asm The --asm option associates the password file with the OracleASM instance that ASMCMD is logged into.

--dbuniquename string The --dbuniquename string option identifies the databaseunique name associated with the password file.

source The source value identifies the location where the existingpassword file is located.

destination The destination value identifies the location where you wantto copy the password file.

-f The —f option enables the password file to be copied without anychecks.

pwcopy copies a password file from one disk group to another, from the operatingsystem to a disk group, or from a disk group to the operating system. If the —f option isspecified, then the password file can be copied to the same disk group.

Either –-asm or --dbuniquename is required to identify a CRSD resource. When either–-asm or --dbuniquename is included in the pwcopy command, the target file is set tothe current password file.

Chapter 10ASMCMD Instance Management Commands

10-28

Page 284: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The compatible.asm disk group attribute must be set to 12.1 or higher for the disk groupwhere the password is to be copied.

The SYSASM or SYSDBA privilege is required to manage the Oracle ASM and databasepassword files.

Example

The following example copies an Oracle ASM password file in one disk group to a differentdisk group. Because the pwcopy command includes the --asm option, the target file (+fra/orapwasm_new) is set to the current password file.

Example 10-31 Using the ASMCMD pwcopy command

ASMCMD [+] > pwcopy --asm +DATA/orapwasm +FRA/orapwasm_newcopying +DATA/orapwasm -> +FRA/orapwasm_new

pwcreatePurpose

Note:

Do not use pwcreate to create a new Oracle ASM password file when Oracle ASMis configured in a cluster. If the Oracle ASM password file is inaccessible in a clusterconfiguration, you must restore the password file using an available backup ratherthan create a new file. For articles about recreating a shared Oracle ASM passwordfile in a cluster, such as document 1929673.1, refer to articles at My Oracle Support(https://support.oracle.com).

Creates an Oracle ASM or Oracle Database instance password file at the specified location.

Syntax and Description

pwcreate { --asm |--dbuniquename string } [-f] [--format format] file_path [sys_password]

Table 10-25 lists the options for the pwcreate command.

Table 10-25 Options for the pwcreate command

Option Description

--asm Associates the password file with the Oracle ASM instance thatASMCMD is logged into.

--dbuniquename string Specifies the Oracle Database unique name associated with thepassword file.

-f Forces a deletion of the existing password file and creates a newpassword file.

--format format Specifies the format in which the password is created. Values are 12and 12.2. If not specified, then 12.2 is the default value.

file_path Specifies the location where the password file is created.

Chapter 10ASMCMD Instance Management Commands

10-29

Page 285: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-25 (Cont.) Options for the pwcreate command

Option Description

sys_password Specifies the initial SYS password. If this option is omitted, then theyou are prompted for the password.

pwcreate creates a password file in the disk group specified by file_path . The initialSYS password is specified by sys_password.

Either –-asm or --dbuniquename is required. The compatible.asm disk group attributemust be set to 12.1 or higher for the disk group where the password is to be located.

The SYSASM or SYSDBA privilege is required to manage the Oracle ASM and databasepassword files.

For additional information, refer to Managing a Shared Password File in a Disk Group.

Example

The following example creates an Oracle Database password file in an Oracle ASMdisk group.

Example 10-32 Using the ASMCMD pwcreate command

ASMCMD [+] > pwcreate –-dbuniquename orcl '+data/ORCL/orapwdb'Enter password for SYS:

pwdeletePurpose

Deletes an Oracle ASM or database instance password file.

Syntax and Description

pwdelete { --asm |--dbuniquename string | file_path }

Table 10-26 lists the options for the pwdelete command.

Table 10-26 Options for the pwdelete command

Option Description

--asm The --asm option associates the password file with the OracleASM instance that ASMCMD is logged into.

--dbuniquename string The --dbuniquename string option identifies the databaseunique name associated with the password file.

file_path The file_path value identifies the location where the passwordfile is located.

pwdelete deletes the specified password file. Either –-asm or --dbuniquename isrequired to identify a CRSD resource and to remove the password location from theCRSD resource.

Chapter 10ASMCMD Instance Management Commands

10-30

Page 286: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The SYSASM or SYSDBA privilege is required to manage the Oracle ASM and databasepassword files.

Example

The following example deletes the specified password file from a disk group.

Example 10-33 Using the ASMCMD pwdelete command

ASMCMD [+] > pwdelete +FRA/orapwasm_bak

pwgetPurpose

Returns the location of the password file for the Oracle ASM or database instance.

Syntax and Description

pwget { --asm | --dbuniquename string }

Table 10-27 lists the options for the pwget command.

Table 10-27 Options for the pwget command

Option Description

--asm The --asm option associates the password file with the Oracle ASMinstance that ASMCMD is logged into.

--dbuniquename string The --dbuniquename string option identifies the database uniquename associated with the password file.

pwget returns the location of the password file for the Oracle ASM instance identified by –-asm or the database instance identified by --dbuniquename.

The SYSASM or SYSDBA privilege is required to manage the Oracle ASM and databasepassword files.

Example

The following example returns the location of the Oracle ASM password file.

Example 10-34 Using the ASMCMD pwget command

ASMCMD [+] > pwget --asm+DATA/orapwasm

pwmovePurpose

Moves an Oracle ASM or database instance password file to the specified location.

Syntax and Description

pwmove { --asm | --dbuniquename string } source destination [-f]

Chapter 10ASMCMD Instance Management Commands

10-31

Page 287: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-28 lists the options for the pwmove command.

Table 10-28 Options for the pwmove command

Option Description

--asm The --asm option associates the password file with the OracleASM instance that ASMCMD is logged into.

--dbuniquename string The --dbuniquename string option identifies the databaseunique name associated with the password file.

source The source value identifies the location where the existingpassword file is located.

destination The destination value identifies the location where you wantto move the password file.

-f The —f option clears the password file for any associatedresource and the new file is registered.

pwmove moves a password file from one disk group to another, from the operatingsystem to a disk group, or from a disk group to the operating system. If the —f option isspecified, then a password file can be moved to a file in the same disk group.

Either –-asm or --dbuniquename is required to identify a CRSD resource.

The compatible.asm disk group attribute must be set to 12.1 or higher for the diskgroup where the password is to be moved.

The SYSASM or SYSDBA privilege is required to manage the Oracle ASM and databasepassword files.

Example

The following example moves a password file from one disk group to another diskgroup.

Example 10-35 Using the ASMCMD pwmove command

ASMCMD [+] > pwmove --asm +FRA/orapwasm_bak +DATA/orapwasmmoving +FRA/orapwasm_bak -> +DATA/orapwasm

pwsetPurpose

Sets the location of the password file for an Oracle ASM or database instance.

Syntax and Description

pwset { --asm | --dbuniquename string } file_path

Table 10-29 lists the options for the pwset command.

Chapter 10ASMCMD Instance Management Commands

10-32

Page 288: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-29 Options for the pwset command

Option Description

--asm The --asm option associates the password file with the Oracle ASMinstance that ASMCMD is logged into.

--dbuniquename string The --dbuniquename string option identifies the database uniquename associated with the password file.

file_path The file_path value identifies the location where the password fileis located.

pwset sets the location of the password file for an Oracle ASM or database instance to thevalue specified by file_path. Either --dbuniquename or –-asm is required to identify a CRSDresource.

The SYSASM or SYSDBA privilege is required to manage the Oracle ASM and databasepassword files.

Example

The following example sets the location of the Oracle ASM password file in a disk group.

Example 10-36 Using the ASMCMD pwset command

ASMCMD [+] > pwset --asm +DATA/orapwasm

showclustermodePurpose

Displays the current mode of the Oracle ASM cluster.

Syntax and Description

showclustermode

showclustermode displays the mode that the Oracle ASM cluster is currently in. The possiblereturn values are ASM cluster : Flex mode enabled or ASM cluster : Flex mode disabled.

Example

The following example shows the use of the showclustermode command.

Example 10-37 Using the ASMCMD showclustermode command

ASMCMD [+] > showclustermodeASM cluster : Flex mode disabled

showclusterstatePurpose

Displays the current state of the cluster.

Chapter 10ASMCMD Instance Management Commands

10-33

Page 289: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Syntax and Description

showclusterstate

showclusterstate displays the state that the Oracle ASM cluster is currently in. Thepossible values returned are Normal, In Rolling Patch, or In Rolling Upgrade mode.

Example

This example shows the use of the showclusterstate command.

Example 10-38 Using the ASMCMD showclusterstate command

ASMCMD [+] > showclusterstate

showpatchesPurpose

Lists the patches applied on the Oracle Grid Infrastructure home.

Syntax and Description

showpatches [-l]

The following table lists the options for the showpatches command.

Table 10-30 Options for the showpathches command

Option Description

—l Displays all details about the patches.

showpatches lists the patches that have been applied to the Oracle Grid Infrastructurehome.

Example

This example shows the use of the showpatches command.

Example 10-39 Using the ASMCMD showpatches command

ASMCMD [+] > showpatches -lOracle ASM release patch level is [0] and no patches have been applied on the local node. The release patch string is [18.1.0.0.0].

showversionPurpose

Displays the patch levels of the Oracle ASM cluster release and software.

Syntax and Description

showversion [[[--releasepatch] [--softwarepatch]] | [--active]]

The following table lists the options for the showversion command.

Chapter 10ASMCMD Instance Management Commands

10-34

Page 290: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-31 Options for the showversion command

Option Description

--releasepatch Displays the cluster level patch version.

Use asmcmd showversion --active instead.

--softwarepatch Displays the patch level on the local node.

Use asmcmd showpatches -l instead.

--active Displays the active version and active patch level

showversion displays the Oracle ASM cluster release and software patch levels. The releaseand software patch options may differ depending whether the Oracle ASM or Oracle GridInfrastructure home is being patched.

Note:

The releasepatch and softwarepatch options may be different when the OracleGrid Infrastructure or Oracle ASM home is being patched. When in normal mode,the options should be same. When there is no Oracle ASM instance connected,release patch information is not displayed.

Example

This example shows the use of the showversion command.

Example 10-40 Using the ASMCMD showversion command

ASMCMD [+] > showversion --activeOracle ASM active version on the cluster is [19.0.0.0.0]. The cluster upgrade state is [NORMAL]. The cluster active patch level is [0].

shutdownPurpose

Shuts down an instance.

Syntax and Description

shutdown [--target target_instance] [--normal | --abort|--immediate ]

Table 10-32 lists the options for the shutdown command.

Table 10-32 Options for the shutdown command

Option Description

--target target_instance Specify the target instance. The value of target_instance could beeither Oracle ASM (ASM), IOServer (IOS), or Oracle ASM proxy (APX)instance.

--normal Shut down normal. This is the default action.

Chapter 10ASMCMD Instance Management Commands

10-35

Page 291: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-32 (Cont.) Options for the shutdown command

Option Description

--abort Shut down stopping all existing operations.

--immediate Shut down immediately.

The default target instance is determined by the ORACLE_SID environmental variable.The default action is a normal shutdown.

Oracle strongly recommends that you shut down all database instances that use theOracle ASM instance and dismount all file systems mounted on Oracle ASM DynamicVolume Manager (Oracle ADVM) volumes before attempting to shut down the OracleASM instance with the --abort option.

For more information about shutting down an Oracle ASM instance, see "AboutShutting Down an Oracle ASM Instance".

Example

The following are examples of the shutdown command. The first example performs ashut down of the Oracle ASM instance with normal action. The second exampleperforms a shut down with immediate action. The third example performs a shut downthat stops all existing operations.

Example 10-41 Using the ASMCMD shutdown command

ASMCMD [+] > shutdown --target ASM --normal

ASMCMD [+] > shutdown --target ASM --immediate

ASMCMD [+] > shutdown --target ASM --abort

spbackupPurpose

Backs up an Oracle ASM SPFILE to a backup file.

Syntax and Description

spbackup source destination

Table 10-33 lists the options for the spbackup command.

Table 10-33 Options for the spbackup command

Option Description

source Specifies the source file name.

destination Specifies the destination file.

spbackup should be used when you want to make single or multiple backups of anSPFILE in the same or a different disk group without creating an SPFILE in the targetdisk group.

Chapter 10ASMCMD Instance Management Commands

10-36

Page 292: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note the following about the use of spbackup:

• spbackup can back up an Oracle ASM SPFILE from a disk group to a disk group or to anoperating system file.

• spbackup can back up an Oracle ASM SPFILE from an operating system file to a diskgroup.

• spbackup can back up an Oracle ASM SPFILE when the SPFILE is being used by anopen Oracle ASM instance.

• spbackup can make multiple backups of an Oracle ASM SPFILE in the same disk group.

spbackup does not affect the GPnP profile. The backup file that is created is not a special filetype and is not identified as an SPFILE. This backup file cannot be copied with spcopy. Tocopy this backup file to and from a disk group, use the ASMCMD cp command.

To make a copy of a backup file in a disk group that is identified as an SPFILE file:

1. Use the ASMCMD cp command to copy the backup file from the disk group to anoperating system file. See "cp".

2. Use the ASMCMD spcopy command to copy the operating system file to a disk group.See "spcopy".

Example

The following are examples of the spbackup command. The first example backs up theSPFILE in the data disk group. The second example backs up the SPFILE from the data diskgroup to the fra disk group.

Example 10-42 Using the ASMCMD spbackup command

ASMCMD> spbackup +DATA/asm/asmparameterfile/registry.253.721810181 +DATA/spfileBackASM.bak

ASMCMD> spbackup +DATA/asm/asmparameterfile/registry.253.721810181 +FRA/spfileBackASM.bak

spcopyPurpose

Copies an Oracle ASM SPFILE from the source location to an SPFILE in the destinationlocation.

Syntax and Description

spcopy [-u] source destination

Table 10-34 lists the options for the spcopy command.

Table 10-34 Options for the spcopy command

Option Description

-u Updates the Grid Plug and Play (GPnP) profile.

source Specifies the source file name.

destination Specifies the destination.

Chapter 10ASMCMD Instance Management Commands

10-37

Page 293: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note the following about the use of spcopy:

• spcopy can copy an Oracle ASM SPFILE from a disk group to a different diskgroup or to an operating system file.

• spcopy can copy an Oracle ASM SPFILE from an operating system file to a diskgroup.

• spcopy can copy an Oracle ASM SPFILE when the SPFILE is being used by anopen Oracle ASM instance.

• spcopy cannot make multiple copies of an Oracle ASM SPFILE in the same diskgroup. You can use spbackup for that purpose.

To update the GPnP profile, include the -u option with spcopy. You can also use spsetto update the GPnP profile if spcopy is run without the -u option.

After copying the SPFILE and updating the GPnP profile, you must restart the instancewith the SPFILE in the new location to use that SPFILE. When the Oracle ASMinstance is running with the SPFILE in the new location, you can remove the sourceSPFILE.

To copy an Oracle ASM SPFILE into a disk group using spcopy, the COMPATIBLE.ASMattribute must be set to 11.2 or greater in the target disk group.

Example

The following are examples of the spcopy command. The first example copies theOracle ASM SPFILE from the data disk group to the fra disk group. The secondexample copies the Oracle ASM SPFILE from the data disk group to an operatingsystem location. The third example copies an Oracle ASM SPFILE from an operatingsystem location to the data disk group and updates the GPnP profile with the -uoption.

Example 10-43 Using the ASMCMD spcopy command

ASMCMD> spcopy +DATA/asm/asmparameterfile/registry.253.721810181 +FRA/spfileCopyASM.ora

ASMCMD> spcopy +DATA/asm/asmparameterfile/registry.253.721810181 $ORACLE_HOME/dbs/spfileCopyASM.ora

ASMCMD> spcopy -u /oracle/product/11.2.0/grid/dbs/spfileTestASM.ora +DATA/ASM/spfileCopyASM.ora

See Also:

• spset for information about using the ASMCMD spset command

• About Backing Up, Copying, and Moving an Oracle ASM InitializationParameter File for information about copying and moving an Oracle ASMinstance initialization parameter file after upgrading

• Oracle Database SQL Language Reference for information aboutcreating a server parameter file with the CREATE SPFILE SQL statement

Chapter 10ASMCMD Instance Management Commands

10-38

Page 294: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

spgetPurpose

Retrieves the location of the Oracle ASM SPFILE from the Grid Plug and Play (GPnP) profile.

Syntax and Description

spget

The location retrieved by spget is the location in the GPnP profile, but not always the locationof the SPFILE currently used. For example, the location could have been recently updated byspset or spcopy with the -u option on an Oracle ASM instance that has not been restarted.After the next restart of the Oracle ASM, this location points to the Oracle ASM SPFILEcurrently being used.

Example

The following is an example of the spget command that retrieves and displays the location ofthe SPFILE from the GPnP profile.

Example 10-44 Using the ASMCMD spget command

ASMCMD [+] > spget+DATA/ASM/ASMPARAMETERFILE/registry.253.813507611

spmovePurpose

Moves an Oracle ASM SPFILE from source to destination and automatically updates theGPnP profile.

Syntax and Description

spmove source destination

Table 10-35 lists the options for the spmove command.

Table 10-35 Options for the spmove command

Option Description

source Specifies the source file.

destination Specifies the destination file.

Note the following about the use of spmove:

• spmove can move an Oracle ASM SPFILE when the open instance is using a PFILE or adifferent SPFILE. After moving the SPFILE, you must restart the instance with theSPFILE in the new location to use that SPFILE.

• spmove cannot move an Oracle ASM SPFILE when the SPFILE is being used by an openOracle ASM instance.

Chapter 10ASMCMD Instance Management Commands

10-39

Page 295: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

For information about copying and moving an Oracle ASM instance initializationparameter file after upgrading, see "About Backing Up, Copying, and Moving anOracle ASM Initialization Parameter File".

To use spmove to move an Oracle ASM SPFILE into a disk group, the disk groupattribute COMPATIBLE.ASM must be set to 11.2 or greater.

Example

The following are examples of the spmove command. The first example moves anOracle ASM SPFILE from the data disk group to an operating system location. Thesecond example moves an SPFILE from an operating system location to the data diskgroup.

Example 10-45 Using the ASMCMD spmove command

ASMCMD> spmove +DATA/spfileASM.ora /oracle/product/11.2.0/grid/dbs/spfileMoveASM.ora

ASMCMD> spmove /oracle/product/11.2.0/grid/dbs/spfile+ASM.ora +DATA/ASM/spfileMoveASM.ora

spsetPurpose

Sets the location of the Oracle ASM SPFILE in the Grid Plug and Play (GPnP) profile.

Syntax and Description

spset location

Table 10-36 lists the options for the spset command.

Table 10-36 Options for the spset command

Option Description

location Specifies the location of the Oracle ASM SPFILE. The location isthe full path to the SPFILE.

Example

The following is an example of the spset command that sets the location of the OracleASM SPFILE command in the data disk group.

Example 10-46 Using the ASMCMD spset command

ASMCMD> spset +DATA/asm/asmparameterfile/asmspfile.ora

startupPurpose

Starts up the default instance.

Chapter 10ASMCMD Instance Management Commands

10-40

Page 296: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Syntax and Description

startup [--mount] [--nomount] [--restrict] [ --pfile pfile ]

Table 10-37 lists the options for the startup command.

Table 10-37 Options for the startup command

Option Description

--mount Specifies a mount operation. This is the default action.

--nomount Specifies no mount operation.

--restrict Specifies restricted mode.

--pfile pfile Oracle ASM initialization parameter file.

This command starts up an instance specified by the ORACLE_SID environmental variable. Thevariable could be set to the Oracle ASM, IOServer, or APX proxy instance.

The default action for an Oracle ASM instance is a startup that mounts disk groups andenables Oracle ASM Dynamic Volume Manager (Oracle ADVM) volumes.

Example

The following is an example of the startup command that starts the Oracle ASM instance(ORACLE_SID=+ASM) without mounting disk groups and uses the asm_init.ora initializationparameter file.

Example 10-47 Using the ASMCMD startup command

ASMCMD> startup --nomount --pfile asm_init.ora

See Also:

• About Mounting Disk Groups at Startup for information about disk groups thatare mounted at startup time

• About Starting Up an Oracle ASM Instance for more information about startingup an Oracle ASM instance

ASMCMD Client Cluster Management CommandsThis topic provides a summary of the ASMCMD client cluster management commands thatare used with Oracle ASM remote instances.

Unless otherwise specified, the ASMCMD cluster management commands should beexecuted in the Oracle ASM-CSS cluster.

For information about Oracle Flex ASM, refer to "Managing Oracle Flex ASM".

Table 10-38 lists the ASMCMD client cluster management commands with brief descriptions.

Chapter 10ASMCMD Client Cluster Management Commands

10-41

Page 297: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-38 Summary of ASMCMD client cluster management commands

Command Description

chcc Modifies a configuration for a client cluster.

mkcc Creates a configuration for a client cluster.

lscc Lists the configured client clusters.

rmcc Removes the configuration for a client cluster.

See Also:

• Oracle Grid Infrastructure Installation and Upgrade Guide for informationabout installing clusters and cluster name requirements

• Oracle Clusterware Administration and Deployment Guide forinformation about client clusters

chcc

Purpose

Modifies the configuration for a client cluster.

Syntax and Description

chcc cluster_name [--direct | --indirect] [--version client_cluster_version]

The following table lists the options for the chcc command.

Table 10-39 Options for the chcc command

Option Description

cluster_name Specifies the name of the client cluster.

--direct Specifies direct storage access.

--indirect Specifies indirect storage access.

--versionclient_cluster_version

Specifies the five digit client cluster version if it is different thanthe storage server version. The storage server version is used ifnot specified.

To modify the storage access method of a client cluster, you perform the followingsteps.

1. As the Oracle Grid Infrastructure user at the Domain Services Cluster (DSC),change the client cluster storage access configuration with the chcc command.

2. As the Oracle Grid Infrastructure user at the Domain Services Cluster (DSC),export the client cluster configuration into a new cluster manifest file with the mkcccommand.

Chapter 10ASMCMD Client Cluster Management Commands

10-42

Page 298: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

You can ignore the warning messages reported when the mkcc command is issued.

3. After you have exported the new cluster manifest file, as the root user on the nodes ofclient cluster you copy the new cluster manifest file to the nodes with the rootcrs.shscript.

Examples

The following examples show how to modify the storage access method from direct toindirect Oracle ASM storage for the client cluster —–asm and ––gimr components.

Example 10-48 Using the ASMCMD chcc command

As the Oracle Grid Infrastructure user at the Domain Services Cluster (DSC), run thefollowing commands:

$ asmcmd chcc clientCluster1 --indirect

$ asmcmd mkcc clientCluster1 /export/cluster_manifest_new.xml --asm --gimr

As the root user at the client cluster, copy the new cluster manifest file to the client clusterwith the following commands.

1. Run the rootcrs.sh script on every node in the client cluster.

# rootcrs.sh --convertcluster STORAGE_ACCESS -manifestfile cluster_manifest_new.xml

2. Run the rootcrs.sh script with the -lastnode option on last node in the client cluster.

# rootcrs.sh --convertcluster STORAGE_ACCESS -manifestfile cluster_manifest_new.xml -lastnode

lsccPurpose

Lists the configured client clusters.

Syntax and Description

lscc [--suppressheader] [-l] [cluster_name | --file wrap]

The following table lists the options for the lscc command.

Table 10-40 Options for the lscc command

Option Description

–suppressheader Suppresses column headings from the output.

-l Displays all details.

cluster_name Specifies the name of the client cluster.

--file Displays information about the contents of the cluster manifest file.

wrap Specifies the full path of the XML file to export the credentials.

Examples

The following example lists the configured client clusters.

Chapter 10ASMCMD Client Cluster Management Commands

10-43

Page 299: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 10-49 Using the ASMCMD lscc command

ASMCMD [+] > lscc-------------------------------------------------------------------------------- NAME VERSION GUID================================================================================ clientCluster1 12.2.0.0.0 78015b1e78756f88bf119fd8e5146df4 clientCluster2 12.2.0.0.0 3de3bbd75e9a7f17bfe027b477b5bcae================================================================================

ASMCMD [+] > lscc -l-------------------------------------------------------------------------------- NAME VERSION GUID ASM GIMR TFA ACFS RHP===================================================================================== clientCluster1 12.2.0.0.0 78015b1e78756f88bf119fd8e5146df4 YES YES YES YES YES clientCluster2 12.2.0.0.0 3de3bbd75e9a7f17bfe027b477b5bcae YES YES YES YES NO=====================================================================================

ASMCMD [+] > lscc clientCluster1 --suppressheader clientCluster1 12.2.0.0.0 78015b1e78756f88bf119fd8e5146df4

ASMCMD [+] > lscc clientCluster1 --suppressheader -l clientCluster1 12.2.0.0.0 78015b1e78756f88bf119fd8e5146df4 ASM,GIMR,TFA,ACFS,RHP

mkccPurpose

Creates the configuration for a client cluster.

Syntax and Description

mkcc cluster_name manifest_file [--direct] [--version client_cluster_version] [--guid client_cluster_guid] [--gimr gimr_pdb/export_dir] [--asm] [--gimr] [--rhp] [--acfs] [--tfa]

The following table lists the options for the mkcc command.

Table 10-41 Options for the mkcc command

Option Description

cluster_name Specifies the name of the client cluster.

manifest_file Specifies the full path of the XML file to export the credentials.

--direct Specifies direct storage access. If not specified, the storageaccess is indirect.

--versionclient_cluster_version

Specifies the five digit client cluster version if it is different thanthe storage server version. The storage server version is used ifnot specified.

Chapter 10ASMCMD Client Cluster Management Commands

10-44

Page 300: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-41 (Cont.) Options for the mkcc command

Option Description

--guidclient_cluster_guid

Specifies the 32-character, globally unique identifier for the clientcluster. When this option is specified, mkcc does not generate anew GUID. If there is a cluster already configured with thespecified GUID, then the command fails.

--gimr gimr_pdb/export_dir

Specifies the directory from which to import the GIMR PDB whenconverting a standalone cluster to a client cluster.

--asm Generate credentials and configuration for an Oracle ASMcluster.

–-gimr Generate credentials and configuration for an Oracle GIMRcluster.

–-rhp Generate credentials and configuration for an Oracle RHPcluster.

–-acfs Generate credentials and configuration for an Oracle ACFScluster.

--tfa Generate credentials and configuration for an Oracle TFA cluster.

The client cluster name must conform to the same rules as a cluster name. The name mustbe unique across your enterprise, must be at least one character long and no more than 15characters in length, must be alphanumeric, cannot begin with a numeral, and may containhyphens (-). Underscore characters (_) are not allowed.

If no client cluster component options are specified, the default is to configure all of thecomponents and store their credentials in the same manifest file.

GNS credentials are not generated by the asmcmd mkcc command. To configure the clientcluster as a GNS Client, run the following command as a privileged user to export the GNSinstance client data configuration to the cluster manifest file:

srvctl export gns -clientdata manifest_file -role CLIENT

Examples

The following example creates credentials for the client cluster —–asm and ––gimrcomponents and exports the credentials to a cluster manifest file.

Example 10-50 Using the ASMCMD mkcc command

ASMCMD [+] > mkcc clientCluster1 /tmp/client_cluster1.xml --version 12.2.0.0.0 --asm --gimr

rmccPurpose

Removes the configuration for a client cluster.

Syntax and Description

rmcc cluster_name [-f]

The following table lists the options for the rmcc command.

Chapter 10ASMCMD Client Cluster Management Commands

10-45

Page 301: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-42 Options for the rmcc command

Option Description

cluster_name Specifies the name of the client cluster.

-f Specifies to force the removal of client cluster credentials.

Examples

The following example removes the configuration for a client cluster.

Example 10-51 Using the ASMCMD rmcc command

ASMCMD [+] > rmcc clientCluster1

ASMCMD Oracle ASM Filter Driver ManagementCommands

This topic provides a summary of the ASMCMD Oracle ASM filter driver (OracleASMFD) management commands.

See Also:

Oracle Grid Infrastructure Installation Guide for your operating system forinformation about installing and configuring Oracle Grid Infrastructure

Table 10-43 lists the Oracle ASM Filter Driver management commands with briefdescriptions.

Table 10-43 Summary of ASMCMD Oracle ASM Filter Driver management commands

Command Description

afd_configure Configures Oracle ASM Filter Driver.

afd_deconfigure Deconfigures Oracle ASM Filter Driver.

afd_di Manipulates the data integrity state in the Oracle ASM Filter Driver.

afd_dsget Retrieves the Oracle ASM Filter Driver diskstring value.

afd_dsset Sets the Oracle ASM Filter Driver diskstring value.

afd_filter Sets the Oracle ASM Filter Driver mode on a given disk path.

afd_label Sets an Oracle ASM Filter Driver label to a disk.

afd_loglevelget Retrieves the oracleafd logging level.

afd_loglevelset Sets the oracleafd logging level.

afd_lsdsk Lists Oracle ASM Filter Driver disks.

afd_lslbl Lists the disks that contain Oracle ASM Filter Driver labels.

afd_refresh Refreshes Oracle ASM Filter Driver disks using the AFD discovery string.

afd_scan Scans for Oracle ASM Filter Driver disks.

Chapter 10ASMCMD Oracle ASM Filter Driver Management Commands

10-46

Page 302: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-43 (Cont.) Summary of ASMCMD Oracle ASM Filter Driver management commands

Command Description

afd_state Returns the state of Oracle ASM Filter Driver.

afd_unlabel Clears an existing Oracle ASM Filter Driver label.

afd_configurePurpose

Configures Oracle ASM Filter Driver.

Syntax and Description

# asmcmd afd_configure [-d | -e] [-f]

The following table lists the options for the afd_configure command.

Table 10-44 Options for the afd_configure command

Option Description

-d Disables Oracle ASMFD filtering mode.

-e Enables Oracle ASMFD filtering mode.

-f Force Oracle ASMFD configuration.

The afd_configure command must be run noninteractively as a root user. Before runningthe command on a node, the Oracle Clusterware stack must be shut down on that node. Afterthe afd_configure command has been run, restart Oracle Clusterware on each node. Afterrunning afd_configure, the default filtering state is enabled.

Example

The following example configures Oracle ASM Filter Driver on the node on which thecommand was run. $ORACLE_HOME in the example refers to the Oracle Grid Infrastructurehome.

Example 10-52 Using the afd_configure command

# $ORACLE_HOME/bin/asmcmd afd_configure

See Also:

• Administering Oracle ASM Filter Driver for information about Oracle ASM FilterDriver

• Oracle Grid Infrastructure Installation and Upgrade Guide for your operatingsystem for information about installing and configuring Oracle GridInfrastructure

Chapter 10ASMCMD Oracle ASM Filter Driver Management Commands

10-47

Page 303: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

afd_deconfigurePurpose

Deconfigures Oracle ASM Filter Driver.

Syntax and Description

# asmcmd afd_deconfigure [-f]

The following table lists the options for the afd_deconfigure command.

Table 10-45 Options for the afd_deconfigure command

Option Description

-f Force Oracle ASMFD deconfiguration.

The afd_deconfigure command must be run noninteractively as a root user. Beforerunning the command on a node, the Oracle Clusterware stack must be shut down onthat node. After the afd_deconfigure command has been run, restart OracleClusterware on each node.

Example

The following example deconfigures Oracle ASM Filter Driver on the node on whichthe command was run. $ORACLE_HOME in the example refers to the Oracle GridInfrastructure home.

Example 10-53 Using the afd_deconfigure command

# $ORACLE_HOME/bin/asmcmd afd_deconfigure

See Also:

• Administering Oracle ASM Filter Driver for information about Oracle ASMFilter Driver

• Oracle Grid Infrastructure Installation and Upgrade Guide for youroperating system for information about installing and configuring OracleGrid Infrastructure

afd_diPurpose

Manipulates the data integrity state in the Oracle ASM Filter Driver (Oracle ASMFD).

Syntax and Description

afd_di {-e | -d | -q}

The following table lists the options for the afd_di command.

Chapter 10ASMCMD Oracle ASM Filter Driver Management Commands

10-48

Page 304: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-46 Options for the afd_di command

Option Description

-e Enables data integrity in Oracle ASMFD.

-d Disables data integrity in Oracle ASMFD.

-q Queries data integrity in Oracle ASMFD.

For information about Oracle ASM Filter Driver, refer to "Administering Oracle ASM FilterDriver".

Example

The following example shows the use of the afd_di command to enable data integrity in theOracle ASMFD driver

Example 10-54 Using the ASMCMD afd_di command

ASMCMD [+] > afd_di -e

afd_dsgetPurpose

Retrieves the Oracle ASM Filter Driver discovery diskstring value.

Syntax and Description

afd_dsget

For information about Oracle ASM Filter Driver, refer to Administering Oracle ASM FilterDriver.

Example

The following example returns the current Oracle ASM Filter Driver discovery diskstringvalue.

Example 10-55 Using the afd_dsget command

ASMCMD [+] > afd_dsgetAFD discovery string: /dev/rdsk/mydisks/*

afd_dssetPurpose

Sets the Oracle ASM Filter Driver discovery diskstring value.

Syntax and Description

afd_dsset afd_diskstring

The syntax options for the afd_dsset command are described in Table 10-47.

Chapter 10ASMCMD Oracle ASM Filter Driver Management Commands

10-49

Page 305: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-47 Options for the afd_dsset command

Option Description

afd_diskstring Specifies the value for the Oracle ASM Filter Driver discoverydiskstring.

For information about Oracle ASM Filter Driver, refer to Administering Oracle ASMFilter Driver.

Example

The following example sets the current Oracle ASM Filter Driver discovery diskstringvalue.

Example 10-56 Using the afd_dsset command

ASMCMD [+] > afd_dsset /dev/rdsk/mydisks/*

afd_filter

Purpose

Sets the Oracle ASM Filter Driver filtering mode on a given disk path.

Syntax and Description

afd_filter {-e | -d } [disk_path]

The syntax options for the afd_filter command are described in the following table.

Table 10-48 Options for the afd_filter command

Option Description

-e Enables Oracle ASM Filter Driver mode.

-d Disables Oracle ASM Filter Driver mode.

disk_path Specifies the path to the disks.

If the command is executed without specifying a disk path, then filtering is set at thenode level.

Example

The following example uses afd_filter to enable Oracle ASM Filter Driver filtering ona specified disk path.

Example 10-57 Using the afd_filter command

ASMCMD [+] > afd_filter -e /dev/sdq

afd_label

Chapter 10ASMCMD Oracle ASM Filter Driver Management Commands

10-50

Page 306: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Purpose

Sets an Oracle ASM Filter Driver (Oracle ASMFD) label to the specified disk.

Syntax and Description

afd_label afd_label disk_path [--migrate | --rename] [--init]

The syntax options for the afd_label command are described in Table 10-49.

Table 10-49 Options for the afd_label command

Option Description

afd_label Specifies an Oracle ASM Filter Driver label.

disk_path Specifies the path to the disks to which the label is applied.

--migrate Specifies to migrate Oracle ASM Filter Driver disk labels to all disks inthe disk_path..

--rename Specifies to label a disk that was previously labeled.

--init Specifies to set an Oracle ASMFD label during the initialize stage.This option is not allowed if Oracle ASMFD is already loaded.

For information about Oracle ASM Filter Driver, refer to "Administering Oracle ASM FilterDriver".

Example

The following example sets an Oracle ASM Filter Driver label to a specified disk.

Example 10-58 Using the afd_label command

ASMCMD [+] > afd_label 'disk0' '/dev/rdsk/mydisks/disk0'

afd_loglevelget

Purpose

Retrieves the oracleafd logging level.

Syntax and Description

afd_loglevelget

The command must be executed by a privileged user.

Examples

The following example shows the use of afd_loglevelget to retrieve the current oracleafdlogging level.

Example 10-59 Using the afd_loglevelget command

ASMCMD [+] > afd_loglevelget medium

Chapter 10ASMCMD Oracle ASM Filter Driver Management Commands

10-51

Page 307: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

afd_loglevelset

Purpose

Sets the oracleafd logging level.

Syntax and Description

afd_loglevelset {high | medium | low | disabled}

The following table lists the options for the afd_loglevelset command.

Table 10-50 Options for the afd_loglevelset command

Option Description

high | medium | low |disabled

Specifies the oracleafd logging level.

The command must be executed by a privileged user.

Examples

The following examples show the use of afd_loglevelset to set the oracleafdlogging level.

Example 10-60 Using the afd_loglevelset command

ASMCMD [+] > afd_loglevelset medium

ASMCMD [+] > afd_loglevelset disabled

afd_lsdsk

Purpose

Lists Oracle ASM Filter Driver disks.

Syntax and Description

afd_lsdsk [--all]

The following table lists the options for the afd_lsdsk command.

Table 10-51 Options for the afd_lsdsk command

Option Description

--all Lists all Oracle ASMFD disks clusterwide.

Example

The following example lists Oracle ASM Filter Driver disks.

Chapter 10ASMCMD Oracle ASM Filter Driver Management Commands

10-52

Page 308: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 10-61 Using the afd_lsdsk commmand

ASMCMD [+] > afd_lsdsk--------------------------------------------------------------------------------Label Filtering Path================================================================================DISK0 ENABLED /dev/sddDISK1 DISABLED /dev/sdmDISK2 ENABLED /dev/sdq

afd_lslblPurpose

Scans operating system disks using the specified discovery string and lists the disks thatcontain Oracle ASM Filter Driver labels.

Syntax and Description

afd_lslbl [disk_string]

The following table lists the options for the afd_lslbl command.

Table 10-52 Options for the afd_lslbl command

Option Description

disk_string Specifies an optional disk path string for filtering.

For information about Oracle ASM Filter Driver, refer to "Administering Oracle ASM FilterDriver".

Example

The following example shows the use of the afd_lslbl command to list disks that containOracle ASMFD labels.

Example 10-62 Using the ASMCMD afd_lslbl command

ASMCMD [+]> afd_lslbl '/dev/sd*'

Label Duplicate Path ======================================= DISK0 /dev/sdd DISK1 /dev/sdm

afd_refreshPurpose

Refreshes Oracle ASM Filter Driver disks using the AFD discovery string.

Syntax and Description

afd_refresh [--all]

The following table lists the options for the afd_refresh command.

Chapter 10ASMCMD Oracle ASM Filter Driver Management Commands

10-53

Page 309: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-53 Options for the afd_refresh command

Option Description

–-all Specifies a clusterwide refresh.

If the Oracle ASM Filter Driver disks are owned by the root user, then you must runafd_refresh --all as root to ensure that accurate disk sizes are displayed in theV$ASM_DISK view.

For information about Oracle ASM Filter Driver, refer to Administering Oracle ASMFilter Driver.

Example

The following example uses afd_refresh to refresh Oracle ASMFD disks

Example 10-63 Using the ASMCMD afd_refresh command

ASMCMD [+]> afd_refresh

afd_scanPurpose

Scans for Oracle ASM Filter Driver disks.

Syntax and Description

afd_scan [afd_diskstring] [--all]

The syntax options for the afd_scan command are described in Table 10-54.

Table 10-54 Options for the afd_scan command

Option Description

afd_diskstring Specifies the value for the Oracle ASM Filter Driver discoverydiskstring.

--all Specifies a clusterwide scan for Oracle ASMFD disks.

afd_scan scans for Oracle ASM Filter Driver disks using the specified discovery string.If the command is executed without specifying a disk string, then afd_scan uses theOracle ASM Filter Driver discovery diskstring value in the afd.conf file.

For information about Oracle ASM Filter Driver, refer to Administering Oracle ASMFilter Driver.

Example

The following example scans for Oracle ASM Filter Driver disks with a specifieddiskstring.

Example 10-64 Using the afd_scan command

ASMCMD [+] > afd_scan /dev/sd*

Chapter 10ASMCMD Oracle ASM Filter Driver Management Commands

10-54

Page 310: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

afd_statePurpose

Returns the state of Oracle ASM Filter Driver.

Syntax and Description

afd_state [--all]

Table 10-55 lists the options for the afd_state command.

Table 10-55 Options for the afd_state command

Option Description

--all The --all option runs a clusterwide check.

For information about Oracle ASM Filter Driver, refer to Administering Oracle ASM FilterDriver.

Example

The following example returns the current state of Oracle ASM Filter Driver.

Example 10-65 Using the afd_state command

ASMCMD [+] > afd_stateASMCMD-9526: The AFD state is 'LOADED' and filtering is 'DEFAULT' on host 'myhost'

afd_unlabelPurpose

Clears a specified Oracle ASM filter driver (Oracle ASMFD) label.

Syntax and Description

afd_unlabel afd_label {afd_label | 'disk_path'} [-f] [--init]

The syntax options for the afd_unlabel command are described in Table 10-56.

Table 10-56 Options for the afd_unlabel command

Option Description

afd_unlabel Specifies an existing Oracle ASM Filter Driver label to clear.

’disk_path’ Specifies to clear a label determined by an existing disk path. If a diskneeds to be unlabeled during the initialization stage, then it can bedone only by using its disk path.

—f Forces the clearing of the label if the disk is an Oracle ASM memberdisk and there are no pending opens of the disk.

--init Specifies to clear an Oracle ASMFD label during the initialize stage.This option is not allowed if Oracle ASMFD is already loaded.

Chapter 10ASMCMD Oracle ASM Filter Driver Management Commands

10-55

Page 311: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

For information about Oracle ASM Filter Driver, refer to "Administering Oracle ASMFilter Driver".

Example

The following example clears an existing Oracle ASM Filter Driver label.

Example 10-66 Using the afd_unlabel command

ASMCMD [+] > afd_unlabel 'disk0'

ASMCMD File Management CommandsThis topic provides a summary of the ASMCMD file management commands.

Table 10-57 lists the ASMCMD file management commands with brief descriptions.

Table 10-57 Summary of ASMCMD file management commands

Command Description

amdu_extract Extracts a file from a disk group.

cd Changes the current directory to the specified directory.

cp Enables you to copy files between disk groups, and between a diskgroup and the operating system.

du Displays the total disk space occupied by files in the specified OracleASM directory and all of its subdirectories, recursively.

find Lists the paths of all occurrences of the specified name (with wildcards)under the specified directory.

ls Lists the contents of an Oracle ASM directory, the attributes of thespecified file, or the names and attributes of all disk groups.

lsof Lists the open files.

mkalias Creates an alias for system-generated file names.

mkdir Creates Oracle ASM directories.

pwd Displays the path of the current Oracle ASM directory.

rm Deletes the specified Oracle ASM files or directories.

rmalias Deletes the specified alias, retaining the file that the alias points to.

amdu_extractPurpose

Extracts a file from a disk group.

Syntax and Description

amdu_extract diskgroup [--sys_filename] file_name disk_string

Chapter 10ASMCMD File Management Commands

10-56

Page 312: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-58 Options for the amdu_extract command

Option Description

diskgroup Name of the disk group where the file is located.

--sys_filename If this option is specified, then the file_name should point to thesystem Oracle ASM file name, not the file alias.

file_name Name of the file to extract.

The file name must be one of the following:

• An Oracle ASM alias name• A system Oracle ASM filename if the --sys_filename option is

specifiedThe file name can be specified as an absolute or a relative path.

disk_string Value for the Oracle ASM discovery disk string.

amdu_extract calls the Oracle ASM Metadata Dump Utility (AMDU) command to extract a fileusing an Oracle ASM alias name.

Example

The following is an example of the amdu_extract command used to extract a file from thedata disk group.

Example 10-67 Using the ASMCMD amdu_extract command

ASMCMD> amdu_extract data data/orcl/my_alias_filename /devices/disk*

cdPurpose

Changes the current directory to the specified directory.

Syntax and Description

cd [dir]

Table 10-59 lists the options for the cd command.

Table 10-59 Options for the cd command

Option Description

dir Name of the directory.

dir can be specified as either an absolute path or a relative path, including the . and ..pseudo-directories. dir can contain wildcard characters. See "Wildcard Characters".

Examples

The following are examples of the cd command changing into various directories.

Chapter 10ASMCMD File Management Commands

10-57

Page 313: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 10-68 Using the ASMCMD cd command

ASMCMD [+data/hr] > cd +data/orcl

ASMCMD [+data/orcl] > cd DATAFILE

ASMCMD [+data/orcl/DATAFILE] >cd ..

cpPurpose

Enables you to copy files between Oracle ASM disk groups and between a disk groupand the operating system.

Syntax and Description

cp src_file [--target target_type] [--service service_name] [--port port_num] [connect_str:]tgt_file

The following table contains the syntax options for the cp command.

Table 10-60 Options for the cp command

Option Description

--target target_type Specifies the target type of the instance that ASMCMD must beconnected to for the copy operation. Valid options are ASM, IOS,or APX.

--service service_name Specifies the Oracle ASM instance name if not the default+ASM.

--port port_num Specifies the listener port number. The default is 1521.

connect_str Specifies the connection string for a remote instance.

src_file Name of the source file to copy.

tgt_file A user alias for the created target file name or an alias directoryname.

cp cannot copy files between two remote instances. The local Oracle ASM instancemust be either the source or the target of the operation.

You can use the cp command to:

• Copy files from a disk group to the operating system

• Copy files from a disk group to a disk group

• Copy files from the operating system to a disk group

Some file types cannot be the source or destination of the cp command. These filetypes include the OCR and SPFILE file types. To back up, copy, or move an OracleASM SPFILE, use the spbackup, spcopy, or spmove commands. To copy an OCRbackup file type, the source must be from a disk group.

The format of copied files is portable between Little-Endian and Big-Endian systems ifthe files exist in an Oracle ASM disk group. Oracle ASM automatically converts theformat when the files are written. For copying a non-Oracle ASM file from or to an

Chapter 10ASMCMD File Management Commands

10-58

Page 314: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Oracle ASM disk group, you can copy the file to a different endian platform and then use oneof the commonly used utilities to convert the file.

connect_str is not required for a local instance copy, which is the default case. For a remoteinstance copy, you must specify the connect string and Oracle ASM prompts for a passwordin a non-echoing prompt. The connect_str is in the form:

[email protected]

user, host, and SID are required in the connect_str parameter. The default port number is1521 and can be changed with the --port option.

The connection privilege (SYSASM or SYSDBA) is determined by the use of the --privilegeoption when starting ASMCMD.

src_file must be either a fully qualified file name or an Oracle ASM alias.

During an ASMCMD copy process, the Oracle ASM server creates an Oracle Managed File(OMF) file in the following format:

diskgroup/db_unique_name/file_type/file_name.#.#

where db_uniq_name is set to ASM and # is a string of digits. In the copy process, ASMCMD cpcreates the directory structure for the destination and creates a user alias from that locationto the actual OMF file that is created.

Examples

The following are examples of the cp command. The first example shows a copy of a file inthe data disk group to a file on the operating system. The second example shows a copy of afile on the operating system to the data disk group. The third example shows how to copy afile in the data disk group to a remote server. You are prompted to enter a password.

Example 10-69 Using the ASMCMD cp command

ASMCMD [+] > cp +data/orcl/datafile/EXAMPLE.265.691577295 /mybackups/example.bakcopying +data/orcl/datafile/EXAMPLE.265.691577295 -> /mybackups/example.bak

ASMCMD [+] > cp /mybackups/examples.bak +data/orcl/datafile/myexamples.bakcopying /mybackups/examples.bak -> +data/orcl/datafile/myexamples.bak

ASMCMD [+] > cp +data/orcl/datafile/EXAMPLE.265.691577295 sys@myserver.+ASM:/scratch/backup/myexamples.bakEnter Password:

See Also:

• Specifying the Type of Connection for more information about connectionoptions with ASMCMD

• Oracle Database Net Services Administrator's Guide for more information aboutconnection strings

Chapter 10ASMCMD File Management Commands

10-59

Page 315: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

duPurpose

Displays the total space used for files in the specified directory and in the entiredirectory tree under the directory.

Syntax and Description

du [--suppressheader] [dir]

Table 10-61 lists the syntax options for the du command.

Table 10-61 Options for the du command

Option Description

dir Name of the directory.

--suppressheader Suppresses column headings from the output.

If you do not specify dir, then information about the current directory is displayed. dircan contain wildcard characters. See "Wildcard Characters".

The following two values are displayed, both in units of megabytes.

• Used_MB - This value does not include mirroring.

• Mirror_used_MB - This value includes mirroring.

For example, if a normal redundancy disk group contains 100 MB of data and each filein the disk group is 2-way mirrored, then Used_MB is 100 MB and Mirror_used_MB isroughly 200 MB.

Example

The following is an example of the du command. The example shows disk space usedin the orcl directory in the data disk group, including all of the directories under theorcl directory.

Example 10-70 Using the ASMCMD du command

ASMCMD [+] > du data/orclUsed_MB Mirror_used_MB 1756 3519

findPurpose

Displays the absolute paths of all occurrences of the specified name pattern (withwildcards) in a specified directory and its subdirectories.

Syntax and Description

find [--type type] dir pattern

Chapter 10ASMCMD File Management Commands

10-60

Page 316: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-62 lists the syntax options for the find command.

Table 10-62 Options for the find command

Option Description

--type type Type of target to find.

dir Directory name where you want to start searching.

pattern Name of a target or a wildcard pattern.

This command searches the specified directory and all subdirectories under it in the directorytree for the supplied pattern. The value used for pattern can be a directory name or a filename, and can include wildcard characters. See "Wildcard Characters".

The ASMCMD find command is case insensitive.

In the output of the command, directory names are suffixed with the slash character (/) todistinguish them from file names.

Use the --type flag to find all the files of a particular type (specified as type). For example,you can search for control files by specifying type as CONTROLFILE. Valid values for type arelisted in Table 5-1. These are type values from the type column of the V$ASM_FILE view.

Examples

The following are examples of the find command. The first example searches the data diskgroup for files that begin with undo. The second example returns the absolute path of all thecontrol files (--type CONTROLFILE) in the +data/orcl directory.

Example 10-71 Using the ASMCMD find command

ASMCMD [+] > find +data undo*+data/ORCL/DATAFILE/UNDOTBS1.258.691577151

ASMCMD [+] > find --type CONTROLFILE +data/orcl *+data/orcl/CONTROLFILE/Current.260.691577263

lsPurpose

Lists the contents of an Oracle ASM directory, the attributes of the specified file, or the namesand attributes of all disk groups.

Syntax and Description

ls [--suppressheader] [-lsdtLg][--absolutepath][--reverse] [--permission][pattern]

Table 10-63 lists the syntax options for the ls command.

Table 10-63 Options for the ls command

Option Description

(none) Displays only file names and directory names.

Chapter 10ASMCMD File Management Commands

10-61

Page 317: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-63 (Cont.) Options for the ls command

Option Description

-l Displays extended file information, including striping and redundancyinformation and whether the file was system-generated (indicated by Y underthe SYS column) or user-created (as with an alias, indicated by N under theSYS column). When used in the "ls -l +" command, displays directoryinformation.

Not all possible file attributes or disk group attributes are included. To viewthe complete set of column values for a file or a disk group, query theV$ASM_FILE and V$ASM_DISKGROUP views.

-s Displays file space information.

-d If the value for the pattern argument is a directory, then ls displaysinformation about that directory, rather than the directory contents. Typicallyused with another flag, such as the -l flag.

--reverse Reverses the sort order of the listing.

-t Sorts the listing by timestamp (latest first) instead of by name.

-L If the value for the pattern argument is an alias, then ASMCMD displaysinformation about the file that it references. Typically used with another flag,such as the -l flag.

--absolutepath For each listed file, displays the absolute path of the alias that references it,if any.

-g GV$ASM_DISKGROUP.INST_ID is included in the output.

--suppressheader Suppresses column headings.

--permission Shows the permissions of a file (V$ASM_FILE.permission,V$ASM_FILE.owner, V$ASM_FILE.usergroup, V$ASM_ALIAS.name).

pattern Name of a file, directory, or a pattern.

Command options enable you to modify and customize the output of the command. Table 10-63 lists the options and their descriptions. For disk group information, thiscommand queries the V$ASM_DISKGROUP_STAT view by default. If you specify all of theoptions, then the command shows a union of their attributes, with duplicates removed.If you enter ls +, the top level directory structure is displayed.

pattern can be a file name, directory name, or a pattern including wildcard characters.See "Wildcard Characters".

• If pattern is a directory name, then ls lists the contents of the directory anddepending on flag settings, ls also lists information about each directory member.Directories are listed with a trailing slash (/) to distinguish them from files.

• If the value that you enter for pattern is a file name, then ls lists the file anddepending on the flag settings, ls also lists information about the file. The file mustbe located in the current directory if the file name is specified with a relative path.

Examples

The following are examples of the ls command that display various information aboutdirectories and the contents of the directories.

Chapter 10ASMCMD File Management Commands

10-62

Page 318: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 10-72 Using the ASMCMD ls command

ASMCMD [+] > ls +data/orcl/datafileEXAMPLE.265.691577295SYSAUX.257.691577149SYSTEM.256.691577149UNDOTBS1.258.691577151USERS.259.691577151

ASMCMD [+] > ls -lt +data/orcl/datafileType Redund Striped Time Sys NameDATAFILE MIRROR COARSE JUL 13 08:00:00 Y EXAMPLE.265.691577295DATAFILE MIRROR COARSE JUL 13 05:00:00 Y SYSAUX.257.691577149DATAFILE MIRROR COARSE JUL 13 02:00:00 Y USERS.259.691577151DATAFILE MIRROR COARSE JUL 13 02:00:00 Y UNDOTBS1.258.691577151DATAFILE MIRROR COARSE JUL 13 02:00:00 Y SYSTEM.256.691577149

ASMCMD [+] > ls -l +data/orcl/datafile/sy*Type Redund Striped Time Sys NameDATAFILE MIRROR COARSE JUL 13 05:00:00 Y SYSAUX.257.691577149DATAFILE MIRROR COARSE JUL 13 02:00:00 Y SYSTEM.256.691577149

ASMCMD [+] > ls -s +data/orcl/datafileBlock_Size Blocks Bytes Space Name 8192 12801 104865792 214958080 EXAMPLE.265.691577295 8192 88321 723525632 1452277760 SYSAUX.257.691577149 8192 88321 723525632 1452277760 SYSTEM.256.691577149 8192 7681 62922752 131072000 UNDOTBS1.258.691577151 8192 641 5251072 12582912 USERS.259.691577151

ASMCMD [+] > ls --permission +data/orcl/datafileUser Group Permission Name rw-rw-rw- EXAMPLE.265.691577295 rw-rw-rw- SYSAUX.257.691577149 rw-rw-rw- SYSTEM.256.691577149 rw-rw-rw- UNDOTBS1.258.691577151 rw-rw-rw- USERS.259.691577151

lsofPurpose

Lists the open files of the local clients.

Syntax and Description

lsof [--suppressheader] {-G diskgroup|--dbname db| -C instance}

Table 10-64 lists the syntax options for the lsof command.

Table 10-64 Options for the lsof command

Option Description

--suppressheader Suppresses column headings.

-G diskgroup List files only from the specified disk group.

--dbname db List files only from the specified database.

-C instance List files only from the specified instance.

Chapter 10ASMCMD File Management Commands

10-63

Page 319: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example

The following are examples of the lsof command. The first example lists the openfiles for the data disk group. The second example lists the open files for the OracleASM instance.

Example 10-73 Using the ASMCMD lsof command

ASMCMD [+] > lsof -G dataDB_Name Instance_Name Path orcl orcl +data/orcl/controlfile/current.260.691577263 orcl orcl +data/orcl/datafile/example.265.691577295 orcl orcl +data/orcl/datafile/sysaux.257.691577149 orcl orcl +data/orcl/datafile/system.256.691577149 orcl orcl +data/orcl/datafile/undotbs1.258.691577151 orcl orcl +data/orcl/datafile/users.259.691577151 orcl orcl +data/orcl/onlinelog/group_1.261.691577267 orcl orcl +data/orcl/onlinelog/group_2.262.691577271 orcl orcl +data/orcl/onlinelog/group_3.263.691577275 orcl orcl +data/orcl/tempfile/temp.264.691577287

ASMCMD [+] > lsof -C +ASM DB_Name Instance_Name Pathasmvol +ASM +data/VOLUME1.271.679226013asmvol +ASM +data/VOLUME2.272.679227351

mkaliasPurpose

Creates an alias for the specified system-generated file name.

Syntax and Description

mkalias file alias

Table 10-65 lists the syntax options for the mkalias command.

Table 10-65 Options for the mkalias command

Option Description

file System-generated file name.

alias Alias for the file name.

alias must be in the same disk group as the system-generated file. Only one alias ispermitted for each Oracle ASM file.

Example

The following example creates the sysaux.f alias for the fully qualified file name+data/orcl/DATAFILE/SYSAUX.257.721811945. Following the mkalias command, ls--absolutepath is run to check the results.

Chapter 10ASMCMD File Management Commands

10-64

Page 320: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 10-74 Using the ASMCMD mkalias command

ASMCMD [+data/orcl/datafile] > mkalias SYSAUX.257.721811945 sysaux.f

ASMCMD [+data/orcl/datafile] > ls --absolutepathnone => EXAMPLE.265.721812093+DATA/ORCL/DATAFILE/sysaux.f => SYSAUX.257.721811945none => SYSTEM.256.721811945none => UNDOTBS1.258.721811945none => USERS.259.721811947sysaux.f

mkdirPurpose

Creates Oracle ASM directories under the current directory.

Syntax and Description

mkdir dir [dir . . .]

Table 10-66 lists the syntax options for the mkdir command.

Table 10-66 Options for the mkdir command

Option Description

dir Directory name to create.

The directory from which mkdir is run can be a system-created or user-created directory. Youcannot create a directory at the root (+) level.

Example

The following is an example of the mkdir command. The example creates the directoriessubdir1 and subdir2 at the disk group level in the disk group data.

Example 10-75 Using the ASMCMD mkdir command

ASMCMD [+data] > mkdir subdir1 subdir2

ASMCMD [+data] > lsASM/ORCL/subdir1/subdir2/

pwdPurpose

Displays the absolute path of the current directory.

Syntax and Description

pwd

Chapter 10ASMCMD File Management Commands

10-65

Page 321: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example

The following is an example of the pwd command. The example displays the currentdirectory.

Example 10-76 Using the ASMCMD pwd command

ASMCMD [+data/orcl/datafile] > pwd+data/orcl/datafile

rmPurpose

Deletes the specified Oracle ASM files and directories.

Syntax and Description

rm [-f|-r] pattern [pattern...]

Table 10-67 lists the syntax options for the rm command.

Table 10-67 Options for the rm command

Option Description

-r Recursively deletes files and subdirectories.

-f Deletes files and subdirectories without prompting forconfirmation.

pattern Name of a file, directory, or wildcard pattern.

If pattern is a file or alias, then the rm command can delete the file or alias only if it isnot currently in use. If pattern is a directory, then the rm command can delete it only ifit is empty (unless the -r flag is used) and it is not a system-generated directory. Ifpattern is an alias, then the rm command deletes both the alias and the file to whichthe alias refers. To delete only an alias and retain the file that the alias references, usethe rmalias command.

Note:

When you delete all of the files in a system-created directory, the directory isremoved. If the parent directories are empty, all of the parent directories arealso removed.

pattern can contain wildcard characters. See "Wildcard Characters".

If you use a wildcard, the rm command deletes all of the matches except nonemptydirectories, unless you use the -r flag. To recursively delete, use the -r flag. With -roption you can delete a nonempty directory, including all files and directories in it andin the entire directory tree underneath it. If you use the -r flag or a wildcard character,then the rm command prompts you to confirm the deletion before proceeding, unlessyou specify the -f flag.If a wildcard character matches an alias or a system-generated

Chapter 10ASMCMD File Management Commands

10-66

Page 322: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

file that has an alias, then both the alias and the system-generated file that it references aredeleted. When using the -r flag to delete an alias that matches a wildcard pattern, either thealias or the system-generated file that has an alias must be present in the directory in whichyou run the rm command.

For example, if you have a user alias, +data/dir1/file.alias that points to +data/orcl/DATAFILE/System.256.146589651, then running the rm -r +data/dir1 command removesthe +data/dir1/file.alias and +data/orcl/DATAFILE/System.256.146589651.

Example

The following are examples of the rm command. The first example deletes themyexamples.bak file. The second example removes the subdir2 directory and its contents.

Example 10-77 Using the ASMCMD rm command

ASMCMD [+data/orcl/datafile] > rm myexamples.bak

ASMCMD [+data] > rm -r subdir2You may delete multiple files and/or directories. Are you sure? (y/n) y

rmaliasPurpose

Removes the specified aliases, retaining the files that the aliases reference.

Syntax and Description

rmalias [-r] alias [alias...]

Table 10-68 lists the syntax options for the rmalias command.

Table 10-68 Options for the rmalias command

Option Description

-r Recursively removes aliases.

alias Alias for the file name or directory.

The -r flag enables you to remove all of the aliases in the current directory and in the entiredirectory tree beneath the current directory. If any user-created directories become emptyafter deleting aliases, they are also deleted. Files and directories created by the system arenot deleted.

Example

The following is an example of the rmalias command. The example deletes the aliassysaux.f, retaining the data file that it references.

Example 10-78 Using the ASMCMD rmalias command

ASMCMD [+data/orcl/datafile] > rmalias sysaux.f

Chapter 10ASMCMD File Management Commands

10-67

Page 323: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

ASMCMD Disk Group Management CommandsThis topic provides a summary of the ASMCMD disk group management commands.

Table 10-69 lists the ASMCMD disk group management commands with briefdescriptions.

Table 10-69 Summary of ASMCMD Disk group management commands

Command Description

chdg Changes a disk group (add, drop, rebalance, or migrate on the Exadataappliance).

chkdg Checks or repairs a disk group.

dropdg Drops a disk group.

iostat Displays I/O statistics for disks.

lsattr Lists the attributes of a disk group.

lsdg Lists disk groups and their information.

lsdsk Lists disks Oracle ASM disks.

lsod Lists open devices.

md_backup Creates a backup of the metadata of mounted disk groups.

md_restore Restores disk groups from a backup of the metadata.

mkdg Creates a disk group.

mount Mounts a disk group.

offline Offlines a disk or a failure group.

online Onlines a disk or a failure group.

rebal Rebalances a disk group.

remap Relocates data in a range of physical blocks on a disk.

setsparseparent Sets the parent for a sparse child file.

setattr Sets attributes in a disk group.

stamp Stamps the disk, site, and failure group labels in disk headers.

stamplist Displays the disk, site, and failure group labels in disk headers.

umount Dismounts a disk group.

chdgPurpose

Modifies a disk group based on an XML configuration file.

Syntax and Description

chdg { config_file.xml | 'contents_of_xml_file' }

Table 10-70 lists the syntax options for the chdg command.

Chapter 10ASMCMD Disk Group Management Commands

10-68

Page 324: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-70 Options for the chdg command

Option Description

config_file Name of the XML file that contains the changes for the disk group.chdg searches for the XML file in the directory where ASMCMD wasstarted unless a path is specified.

For examples of the valid tags and XML configuration file, see Example 10-79 and Example 10-80.

contents_of_xml_file The XML script enclosed in single quotations.

The modifications include the following:

• adding, dropping, and resizing disks

• rebalancing or replacing the power level of a disk group

The power level can be set to the same values as the ASM_POWER_LIMIT initializationparameter

• migrating an Exadata appliance from one fixed configuration to another

The migration adds more disks (an equal number of disks) to each of the existing failuregroups (or cells) in the disk group.

The modification includes adding, replacing, or deleting disks from an existing disk group,and the setting rebalance or replace power level. The power level can be set to the samevalues as the ASM_POWER_LIMIT initialization parameter. The modification also includes themigration from one fixed appliance configuration to another fixed appliance configuration onthe Exadata appliance. The migration adds more disks (and equal number of disks) to eachof the existing failure groups (or cells) in the disk group.

When adding disks to a disk group, the diskstring must be specified in a format similar to theASM_DISKSTRING initialization parameter.

The failure groups are optional parameters. The default causes every disk to belong to a itsown failure group.

Dropping disks from a disk group can be performed through this operation. An individual diskcan be referenced by its Oracle ASM disk name. A set of disks that belong to a failure groupcan be specified by the failure group name.

You can resize a disk inside a disk group with chdg. The resize operation fails if there is notenough space for storing data after the resize.

Example 10-79 shows the basic structure and the valid tags with their respective attributes forthe chdg XML configuration file.

Example 10-79 Tags for the chdg XML configuration template

<chdg> update disk clause (add/delete disks/failure groups) name disk group to change power power to perform rebalance or replace <add> items to add are placed here</add>

<replace> items to replace are placed here</replace>

Chapter 10ASMCMD Disk Group Management Commands

10-69

Page 325: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

<drop> items to drop are placed here</drop>

<migrate> items to be migrated to another appliance configuration on EXADATA </migrate>

<fg> failure group name failure group name</fg>

<dsk> disk name disk name string disk path size size of the disk to add force true specifies to use the force option</dsk>

</chdg>

Example 1

The following is an example of an XML configuration file for chdg. This XML file altersthe disk group named data. The failure group fg1 is dropped and the disk data_0001is also dropped. The /dev/disk5 disk is added to failure group fg2. The rebalancepower level is set to 3.

Example 10-80 chdg sample XML configuration file

<chdg name="data" power="3"> <drop> <fg name="fg1"></fg> <dsk name="data_0001"/> </drop> <add> <fg name="fg2"> <dsk string="/dev/disk5"/> </fg> </add></chdg>

Example 2

The following is another example of an XML configuration file for chdg. This XML filemigrates the failure group named FG_01.

Example 10-81 chdg sample XML configuration file

<chdg name="DATAC1 > <migrate> <add> <fg name = "EXA04CEL01"> <dsk string="o/192.168.10.18/DATAC1_CD_10_exa04cel01" name= "DATAC1_CD_10_exa04cel01" /> <dsk string="o/192.168.10.18/DATAC1_CD_11_exa04cel01" name= "DATAC1_CD_11_exa04cel01" /> </fg> <fg name = "EXA04CEL02"> <dsk string="o/192.168.10.20/DATAC1_CD_10_exa04cel02"

Chapter 10ASMCMD Disk Group Management Commands

10-70

Page 326: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

name= "DATAC1_CD_10_exa04cel02" /> <dsk string="o/192.168.10.20/DATAC1_CD_11_exa04cel02" name= "DATAC1_CD_11_exa04cel02" /> </fg> <fg name = "EXA04CEL03”" <dsk string="o/192.168.10.22/DATAC1_CD_10_exa04cel03" name= "DATAC1_CD_10_exa04cel03" /> <dsk string="o/192.168.10.22/DATAC1_CD_11_exa04cel03" name= "DATAC1_CD_11_exa04cel03" /> </fg> </add> </migrate></chdg>

Example 3

The following are examples of the chdg command with the configuration file or configurationinformation on the command line.

Example 10-82 Using the ASMCMD chdg command

ASMCMD [+] > chdg data_config.xml

ASMCMD [+] > chdg '<chdg name="data" power="3"> <drop><fg name="fg1"></fg><dsk name="data_0001"/></drop> <add><fg name="fg2"><dsk string="/dev/disk5"/></fg></add></chdg>'

See Also:

• ASM_POWER_LIMIT for information about the ASM_POWER_LIMIT initializationparameter

• ASM_DISKSTRING for information about the ASM_DISKSTRING initializationparameter

• Oracle ASM Failure Groups for information about failure groups

• Dropping Disks from Disk Groups for information about dropping disks

• Resizing Disks in Disk Groups for information about resizing disks,

• mkdg for information about creating a disk group with ASMCMD mkdg

• Altering Disk Groups for information about altering disk groups

• Enabling the Oracle ASM appliance.mode Attribute

chkdgPurpose

Checks or repairs the metadata of a disk group.

Syntax and Description

chkdg [--repair] diskgroup

Chapter 10ASMCMD Disk Group Management Commands

10-71

Page 327: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-71 lists the syntax options for the chkdg command.

Table 10-71 Options for the chkdg command

Option Description

--repair Repairs the disk group.

diskgroup Name of disk group to check or repair.

chkdg checks the metadata of a disk group for errors and optionally repairs the errors.

Example

The following is an example of the chkdg command used to check and repair the datadisk group.

Example 10-83 Using the ASMCMD chkdg command

ASMCMD [+] > chkdg --repair data

dropdgPurpose

Drops a disk group.

Syntax and Description

dropdg [-r [-f]] diskgroup

Table 10-72 lists the syntax options for the dropdg command.

Table 10-72 Options for the dropdg command

Option Description

-f Force the operation. Only applicable if the disk group cannot bemounted.

-r Recursive, include contents.

diskgroup Name of disk group to drop.

dropdg drops an existing disk group. The disk group should not be mounted onmultiple nodes.

Example

These are examples of the use of dropdg. The first example forces the drop of the diskgroup data, including any data in the disk group. The second example drops the diskgroup fra, including any data in the disk group.

Example 10-84 Using the ASMCMD dropdg command

ASMCMD [+] > dropdg -r -f data

ASMCMD [+] > dropdg -r fra

Chapter 10ASMCMD Disk Group Management Commands

10-72

Page 328: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

iostatPurpose

Displays I/O statistics for Oracle ASM disks in mounted disk groups.

Syntax and Description

iostat [--suppressheader] [-et] [--io] [--region] [-G diskgroup] [interval]

iostat lists disk group statistics using the V$ASM_DISK_STAT view.

Table 10-73 lists the syntax options for the iostat command.

Table 10-73 Options for the iostat command

Option Description

-e Displays error statistics (Read_Err, Write_Err).

-G diskgroup Displays statistics for the disk group name.

--suppressheader Suppresses column headings.

--io Displays information in number of I/Os, instead of bytes.

-t Displays time statistics (Read_Time, Write_Time).

--region Displays information for cold and hot disk regions (Cold_Reads,Cold_Writes, Hot_Reads, Hot_Writes).

Note:

Disk region attributes default to cold andcold is the only permitted setting. Thismeans that values for Hot_Reads andHot_Writes are zero.

interval Refreshes the statistics display based on the interval value (seconds).Use CTRL+C to stop the interval display.

Table 10-74 shows the statistics for a disk group. To view the complete set of statistics for adisk group, use the V$ASM_DISK_STAT and V$ASM_DISK_IOSTAT views.

Table 10-74 Attribute descriptions for iostat command output

Attribute Name Description

Group_Name Name of the disk group.

Dsk_Name Name of the disk.

Reads Number of bytes read from the disk. If the --io option is entered, then thevalue is displayed as number of I/Os.

Writes Number of bytes written to the disk. If the --io option is entered, then thevalue is displayed as number of I/Os.

Chapter 10ASMCMD Disk Group Management Commands

10-73

Page 329: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-74 (Cont.) Attribute descriptions for iostat command output

Attribute Name Description

Cold_Reads Number of bytes read from the cold disk region. If the --io option isentered, then the value is displayed as number of I/Os.

Cold_Writes Number of bytes written from the cold disk region. If the --io option isentered, then the value is displayed as number of I/Os.

Hot_Reads Number of bytes read from the hot disk region. If the --io option is entered,then the value is displayed as number of I/Os.

Note:

Disk region attributes default to cold and coldis the only permitted setting. This means thatvalues for Hot_Reads and Hot_Writes arezero.

Hot_Writes Number of bytes written to the hot disk region. If the --io option is entered,then the value is displayed as number of I/Os.

Note:

Disk region attributes default to cold and coldis the only permitted setting. This means thatvalues for Hot_Reads and Hot_Writes arezero.

Read_Err Number of failed I/O read requests for the disk.

Write_Err Number of failed I/O write requests for the disk.

Read_Time I/O time (in seconds) for read requests for the disk if theTIMED_STATISTICS initialization parameter is set to TRUE (0 if set toFALSE).

Write_Time I/O time (in seconds) for write requests for the disk if theTIMED_STATISTICS initialization parameter is set to TRUE (0 if set toFALSE).

If a refresh interval is not specified, the number displayed represents the total numberof bytes or I/Os. If a refresh interval is specified, then the value displayed (bytes orI/Os) is the difference between the previous and current values, not the total value.

Example

The following are examples of the iostat command. The first example displays diskI/O statistics for the data disk group in total number of bytes. The second exampledisplays disk I/O statistics for the data disk group in total number of I/O operations.

Example 10-85 Using the ASMCMD iostat command

ASMCMD [+] > iostat -G dataGroup_Name Dsk_Name Reads Writes

Chapter 10ASMCMD Disk Group Management Commands

10-74

Page 330: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

DATA DATA_0000 180488192 473707520 DATA DATA_0001 1089585152 469538816 DATA DATA_0002 191648256 489570304 DATA DATA_0003 175724032 424845824 DATA DATA_0004 183421952 781429248 DATA DATA_0005 1102540800 855269888 DATA DATA_0006 171290624 447662592 DATA DATA_0007 172281856 361337344 DATA DATA_0008 173225472 390840320 DATA DATA_0009 288497152 838680576 DATA DATA_0010 196657152 375764480 DATA DATA_0011 436420096 356003840

ASMCMD [+] > iostat --io -G dataGroup_Name Dsk_Name Reads Writes DATA DATA_0000 2801 34918 DATA DATA_0001 58301 35700 DATA DATA_0002 3320 36345 DATA DATA_0003 2816 10629 DATA DATA_0004 2883 34850 DATA DATA_0005 59306 38097 DATA DATA_0006 2151 10129 DATA DATA_0007 2686 10376 DATA DATA_0008 2105 8955 DATA DATA_0009 9121 36713 DATA DATA_0010 3557 8596 DATA DATA_0011 17458 9269

lsattrPurpose

Lists the attributes of a disk group.

Syntax and Description

lsattr [--suppressheader][-G diskgroup ] [-lm] [pattern]

Table 10-75 lists the syntax options for the lsattr command.

Table 10-75 Options for the lsattr command

Option Description

-G diskgroup Disk group name.

--suppressheader Suppresses column headings.

-l Display names with values.

-m Displays additional information, such as the RO and Sys columns.

pattern Display the attributes that contain pattern expression.

Note:

Attributes are only displayed for disk groups where COMPATIBLE.ASM is set to 11.1 orhigher.

Chapter 10ASMCMD Disk Group Management Commands

10-75

Page 331: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Information about disk group attributes is retrieved from the V$ASM_ATTRIBUTE view.For information about disk group attributes, refer to Managing Disk Group Attributes.

The RO (read-only) column identifies those attributes that can only be set when a diskgroup is created. The Sys column identifies those attributes that are system-created.

To display information about the disk group template attributes, refer to lstmpl.

To set disk group attributes, refer to setattr.

Example

The following are examples of the lsattr command. The first displays informationabout all attributes for the data disk group. The second example displays only thoseattributes with names containing the string compat for the fra disk group. Note the useof both the % and * wildcard characters on Linux.

Example 10-86 Using the ASMCMD lsattr command

ASMCMD [+] > lsattr -lm -G dataGroup_Name Name Value RO Sys DATA access_control.enabled FALSE N Y DATA access_control.umask 066 N Y DATA appliance._partnering_type GENERIC Y Y DATA ate_conversion_done true Y Y DATA au_size 1048576 Y Y DATA cell.smart_scan_capable FALSE N N DATA cell.sparse_dg allnonsparse N N DATA compatible.advm 19.0.0.0.0 N Y DATA compatible.asm 19.0.0.0.0 N Y DATA compatible.rdbms 19.0.0.0.0 N Y DATA content.check FALSE N Y DATA content.type data N Y DATA content_hardcheck.enabled FALSE N Y DATA disk_repair_time 12.0h N Y DATA failgroup_repair_time 24.0h N Y DATA idp.boundary auto N YDATA idp.type dynamic N Y DATA logical_sector_size 512 N Y DATA phys_meta_replicated true Y Y DATA preferred_read.enabled FALSE N Y DATA scrub_async_limit 1 N Y DATA scrub_metadata.enabled TRUE N Y DATA sector_size 512 N Y DATA thin_provisioned FALSE N Y DATA vam_migration_done false Y Y

ASMCMD [+] > lsattr -G fra -l %compat*Name Valuecompatible.advm 19.0.0.0.0 compatible.asm 19.0.0.0.0 compatible.rdbms 19.0.0.0.0

lsdgPurpose

Lists mounted disk groups and their information. lsdg queries V$ASM_DISKGROUP_STATby default. If the --discovery flag is specified, the V$ASM_DISKGROUP is queriedinstead. The output also includes notification of any current rebalance operation for a

Chapter 10ASMCMD Disk Group Management Commands

10-76

Page 332: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

disk group. If a disk group is specified, then lsdg returns only information about that diskgroup.

Syntax and Description

lsdg [--suppressheader] [-g] [--discovery] [pattern]

Table 10-76 lists the options for the lsdg command.

Table 10-76 Options for the lsdg command

Option Description

(none) Displays the disk group attributes listed in Table 10-77.

--discovery Selects from V$ASM_DISKGROUP, or from GV$ASM_DISKGROUP if the -g flagis also specified. This option is always enabled if the Oracle ASM instance isversion 10.1 or earlier. This flag is disregarded if lsdg is running in non-connected mode.

-g Selects from GV$ASM_DISKGROUP_STAT, or from GV$ASM_DISKGROUP if the--discovery flag is also specified. GV$ASM_DISKGROUP.INST_ID isincluded in the output.

The Rebal attribute value is derived from the value of the OPERATIONcolumn in the GV$ASM_OPERATION view. The PASS column inGV$ASM_OPERATION also indicates if a rebalance operation is running.

--suppressheader Suppresses column headings.

pattern Returns only information about the specified disk group or disk groups thatmatch the supplied pattern. See "Wildcard Characters".

Table 10-77 shows the attributes for each disk group. To view the complete set of attributesfor a disk group, use the V$ASM_DISKGROUP_STAT or V$ASM_DISKGROUP view.

See Also:

Oracle Database Reference for descriptions of disk group information displayed inthe V$ASM_DISKGROUP view

Table 10-77 Attribute descriptions for lsdg command output

Attribute Name Description

State State of the disk group. For example, BROKEN, CONNECTED, DISMOUNTED,MOUNTED, QUIESCING, or UNKNOWN.

Type Disk group redundancy. For example, NORMAL, HIGH, FLEX, or EXTERNAL.

Rebal Y indicates that a rebalance operation is in progress.

Sector Sector size in bytes.

Block Block size in bytes.

AU Allocation unit size in bytes.

Total_MB Size of the disk group in megabytes.

Chapter 10ASMCMD Disk Group Management Commands

10-77

Page 333: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-77 (Cont.) Attribute descriptions for lsdg command output

Attribute Name Description

Free_MB Free space in the disk group in megabytes, without regard to redundancy.From the V$ASM_DISKGROUP view.

Req_mir_free_MB Amount of space that must be available in the disk group to restore fullredundancy after the most severe failure that can be tolerated by the diskgroup. This is the REQUIRED_MIRROR_FREE_MB column from theV$ASM_DISKGROUP view.

Usable_file_MB Amount of free space, adjusted for mirroring, that is available for new files.From the V$ASM_DISKGROUP view.

Offline_disks Number of offline disks in the disk group. Offline disks are eventuallydropped.

Voting_files Specifies whether the disk group contains voting files (Y or N).

Name Disk group name.

Example

The following example lists the attributes of the data disk group.

Example 10-87 Using the ASMCMD lsdg command

ASMCMD [+] > lsdg dataState Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MBMOUNTED NORMAL N 512 4096 4194304 12288 8835 1117 3859

(continued)Offline_disks Voting_files Name 0 N DATA

lsdskPurpose

Lists Oracle ASM disks.

Syntax and Description

lsdsk [--suppressheader] [-kptgMI] [-G diskgroup ] [ --member|--candidate] [--discovery][--statistics][pattern]

Table 10-78 lists the options for the lsdsk command.

Table 10-78 Options for the lsdsk command

Option Description

(none) Displays the PATH column of the V$ASM_DISK_STAT view.

Chapter 10ASMCMD Disk Group Management Commands

10-78

Page 334: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-78 (Cont.) Options for the lsdsk command

Option Description

-k Displays the TOTAL_MB, FREE_MB, OS_MB,NAME, FAILGROUP, LIBRARY,LABEL, UDID, PRODUCT, REDUNDANCY, and PATH columns of theV$ASM_DISK view.

--statistics Displays the READS, WRITES, READ_ERRS, WRITE_ERRS, READ_TIME,WRITE_TIME, BYTES_READ, BYTES_WRITTEN, and the PATH columnsof the V$ASM_DISK view.

-p Displays the GROUP_NUMBER, DISK_NUMBER, INCARNATION,MOUNT_STATUS, HEADER_STATUS, MODE_STATUS, STATE, and thePATH columns of the V$ASM_DISK view.

-t Displays the CREATE_DATE, MOUNT_DATE, REPAIR_TIMER, and thePATH columns of the V$ASM_DISK view.

-g Selects from GV$ASM_DISK_STAT, or from GV$ASM_DISK if the --discovery flag is also specified. GV$ASM_DISK.INST_ID is includedin the output.

--discovery Selects from V$ASM_DISK, or from GV$ASM_DISK if the -g flag is alsospecified. This option is always enabled if the Oracle ASM instance isversion 10.1 or earlier. This flag is disregarded if lsdsk is running innon-connected mode.

--suppressheader Suppresses column headings.

-I Scans disk headers for information rather than extracting theinformation from an Oracle ASM instance. This option forces non-connected mode.

-G Restricts results to only those disks that belong to the group specifiedby diskgroup.

-M Displays the disks that are visible to some but not all active instances.These are disks that, if included in a disk group, cause the mount ofthat disk group to fail on the instances where the disks are not visible.

--candidate Restricts results to only disks having membership status equal toCANDIDATE.

--member Restricts results to only disks having membership status equal toMEMBER.

pattern Returns only information about the specified disks that match thesupplied pattern.

The lsdsk command can run in connected or non-connected mode. The connected mode isalways attempted first. The -I option forces non-connected mode.

• In connected mode, lsdsk uses the V$ASM_DISK_STAT and V$ASM_DISK dynamic views toretrieve disk information. The V$ASM_DISK_STAT view is used by default.

• In non-connected mode, lsdsk scans disk headers to retrieve disk information. Someinformation is not available in this mode and some options are not valid combinationswith this mode.

Chapter 10ASMCMD Disk Group Management Commands

10-79

Page 335: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Note:

The non-connected mode is not supported on Windows.

pattern restricts the output to only disks that match the pattern specified. Wild-cardcharacters and slashes (/ or \) can be part of the pattern. pattern should be specifiedas the last option for the command. For information about wildcards, see "WildcardCharacters".

The -k, -p, -t, and --statistics options modify how much information is displayedfor each disk. If any combination of the options are specified, then the output showsthe union of the attributes associated with each flag.

Example

The following are examples of the lsdsk command. The first and second examples listinformation about disks in the data disk group. The third example lists informationabout candidate disks.

Example 10-88 Using the ASMCMD lsdsk command

ASMCMD [+] > lsdsk -t -G dataCreate_Date Mount_Date Repair_Timer Path13-JUL-09 13-JUL-09 0 /devices/diska113-JUL-09 13-JUL-09 0 /devices/diska213-JUL-09 13-JUL-09 0 /devices/diska313-JUL-09 13-JUL-09 0 /devices/diskb113-JUL-09 13-JUL-09 0 /devices/diskb213-JUL-09 13-JUL-09 0 /devices/diskb313-JUL-09 13-JUL-09 0 /devices/diskc113-JUL-09 13-JUL-09 0 /devices/diskc2...

ASMCMD [+] > lsdsk -p -G data /devices/diska*Group_Num Disk_Num Incarn Mount_Stat Header_Stat Mode_Stat State Path 1 0 2105454210 CACHED MEMBER ONLINE NORMAL /devices/diska1 1 1 2105454199 CACHED MEMBER ONLINE NORMAL /devices/diska2 1 2 2105454205 CACHED MEMBER ONLINE NORMAL /devices/diska3

ASMCMD [+] > lsdsk --candidate -pGroup_Num Disk_Num Incarn Mount_Stat Header_Stat Mode_Stat State Path 0 5 2105454171 CLOSED CANDIDATE ONLINE NORMAL /devices/diske1 0 25 2105454191 CLOSED CANDIDATE ONLINE NORMAL /devices/diske2 0 18 2105454184 CLOSED CANDIDATE ONLINE NORMAL /devices/diske3 0 31 2105454197 CLOSED CANDIDATE ONLINE NORMAL /devices/diskk1 0 21 2105454187 CLOSED CANDIDATE ONLINE NORMAL /devices/diskk2 0 26 2105454192 CLOSED CANDIDATE ONLINE NORMAL /devices/diskk3 0 14 2105454180 CLOSED CANDIDATE ONLINE NORMAL /devices/diskl1...

lsodPurpose

Lists the open Oracle ASM disks.

Chapter 10ASMCMD Disk Group Management Commands

10-80

Page 336: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Syntax and Description

lsod [--suppressheader] [-G diskgroup] [--process process] [pattern]

Table 10-79 lists the syntax options for the lsod command.

Table 10-79 Options for the lsod command

Option Description

--suppressheader Suppresses column header information from the output.

-G diskgroup Specifies the disk group that contains the open disks.

--process process Specifies a pattern to filter the list of processes.

pattern Specifies a pattern to filter the list of disks.

The rebalance operation (RBAL) opens a disk both globally and locally so the same disk maybe listed twice in the output for the RBAL process.

Example

The following are examples of the lsod command. The first example lists the open devicesassociated with the data disk group and the LGWR process. The second example lists theopen devices associated with the LGWR process for disks that match the diska pattern.

Example 10-89 Using the ASMCMD lsod command

ASMCMD [+] > lsod -G data --process *LGWR*Instance Process OSPID Path1 oracle@myserver02 (LGWR) 26593 /devices/diska1 1 oracle@myserver02 (LGWR) 26593 /devices/diska2 1 oracle@myserver02 (LGWR) 26593 /devices/diska3 1 oracle@myserver02 (LGWR) 26593 /devices/diskb1 1 oracle@myserver02 (LGWR) 26593 /devices/diskb2 1 oracle@myserver02 (LGWR) 26593 /devices/diskb3 1 oracle@myserver02 (LGWR) 26593 /devices/diskd1

ASMCMD [+] > lsod --process *LGWR* *diska*Instance Process OSPID Path1 oracle@myserver02 (LGWR) 26593 /devices/diska1 1 oracle@myserver02 (LGWR) 26593 /devices/diska2 1 oracle@myserver02 (LGWR) 26593 /devices/diska3

For another example of the lsod command, see Example 10-21.

md_backupPurpose

The md_backup command creates a backup file containing metadata for one or more diskgroups.

Syntax and Description

md_backup backup_file [-G 'diskgroup [,diskgroup,...]'] --acfs_sec_encr

Chapter 10ASMCMD Disk Group Management Commands

10-81

Page 337: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-80 describes the options for the md_backup command.

Table 10-80 Options for the md_backup command

Option Description

backup_file Specifies the backup file in which you want to store themetadata.

-G diskgroup Specifies the disk group name of the disk group that must bebacked up

--acfs_sec_encr Specifies that security, encryption, or audit metadata informationfrom Oracle ACFS is backed up.

By default all the mounted disk groups are included in the backup file, which is savedin the current working directory if a path is not specified with the file name.

The md_backup command backs up Oracle Automatic Storage Management ClusterFile System (Oracle ACFS) metadata information for the contained Oracle ASMDynamic Volume Manager(Oracle ADVM) volumes, including stripe size, redundancy,and other items. This command also backs up Oracle ACFS file system configurationmetadata, such as compression and resize attributes, block size, and createdsnapshots. Additional metadata and configuration attributes may be backed up;however, Oracle ACFS file system data and Oracle ACFS CRS Resource informationis not backed up.

Example

The first example shows the use of the backup command when run without the diskgroup option. This example backs up all the mounted disk groups and creates thebackup image in the /scratch/backup/alldgs20100422 file. The second examplecreates a backup of the data disk group. The metadata backup that this examplecreates is saved in the /scratch/backup/data20100422 file.

Example 10-90 Using the ASMCMD md_backup command

ASMCMD [+] > md_backup /scratch/backup/alldgs20100422Disk group metadata to be backed up: DATADisk group metadata to be backed up: FRACurrent alias directory path: ORCL/ONLINELOGCurrent alias directory path: ORCL/PARAMETERFILECurrent alias directory path: ORCLCurrent alias directory path: ASMCurrent alias directory path: ORCL/DATAFILECurrent alias directory path: ORCL/CONTROLFILECurrent alias directory path: ASM/ASMPARAMETERFILECurrent alias directory path: ORCL/TEMPFILECurrent alias directory path: ORCL/ARCHIVELOG/2010_04_20Current alias directory path: ORCLCurrent alias directory path: ORCL/BACKUPSET/2010_04_21Current alias directory path: ORCL/ARCHIVELOG/2010_04_19Current alias directory path: ORCL/BACKUPSET/2010_04_22Current alias directory path: ORCL/ONLINELOGCurrent alias directory path: ORCL/BACKUPSET/2010_04_20Current alias directory path: ORCL/ARCHIVELOGCurrent alias directory path: ORCL/BACKUPSETCurrent alias directory path: ORCL/ARCHIVELOG/2010_04_22Current alias directory path: ORCL/DATAFILECurrent alias directory path: ORCL/CONTROLFILE

Chapter 10ASMCMD Disk Group Management Commands

10-82

Page 338: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Current alias directory path: ORCL/ARCHIVELOG/2010_04_21

ASMCMD [+] > md_backup /scratch/backup/data20100422 -G dataDisk group metadata to be backed up: DATACurrent alias directory path: ORCL/ONLINELOGCurrent alias directory path: ASMCurrent alias directory path: ORCL/CONTROLFILECurrent alias directory path: ASM/ASMPARAMETERFILECurrent alias directory path: ORCL/PARAMETERFILECurrent alias directory path: ORCLCurrent alias directory path: ORCL/DATAFILECurrent alias directory path: ORCL/TEMPFILE

md_restorePurpose

The md_restore command restores disk groups from a metadata backup file.

Syntax and Description

md_restore backup_file [--silent] [--full|--nodg|--newdg -o 'old_diskgroup:new_diskgroup [,...]'] [--acfs_sec_encr user:group | --acfs_sec_encr user:group --acfs_audit user:mgr_group:auditor_group ] [-S sql_script_file] [-G 'diskgroup [,diskgroup...]']

Table 10-81 describes the options for the md_restore command.

Table 10-81 Options for the md_restore command

Option Description

backup_file Reads the metadata information from backup_file.

--silent Ignore errors. Typically, if md_restore encounters an error, itstops. Specifying this flag ignores any errors.

--full Specifies to create a disk group and restore metadata.

--nodg Specifies to restore metadata only.

--newdg -oold_diskgroup:new_diskgroup]

Specifies to create a disk group with a different name whenrestoring metadata. The -o option is required with --newdg.

--acfs_sec_encr user:group Restores the metadata of security or encryption or both. Thecolon separated user and group is used for security metadatarestoration. During metadata restore, security or encryption orboth must be initialized. If security or encryption or both are notpre-initialized, the colon separated values passed to the --acfs_sec_encr option are used to initialize security.Encryption is initialized with the SSO wallet.

--acfs_audituser:mgr_group:auditor_group

Restores audit metadata information on an Oracle ACFS filesystem. The colon separated values are used to initialize andexecute audit commands. During metadata restore, audit mustbe initialized. If audit is not pre-initialized, the audit layer isinitialized using the colon separated values given to the --acfs_audit option. The --acfs_audit option requires the --acfs_sec_encr option.

Chapter 10ASMCMD Disk Group Management Commands

10-83

Page 339: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-81 (Cont.) Options for the md_restore command

Option Description

-S sql_script_file Write SQL commands to the specified SQL script file instead ofexecuting the commands.

-G diskgroup Select the disk groups to be restored. If no disk groups aredefined, then all disk groups are restored.

Note the following when restoring Oracle ACFS information:

• When restoring the metadata of a file system, the user id is set to the user id thatowned the file system when the metadata backup was created. This user id shouldexist on the restore cluster.

• md_restore restores Oracle ACFS metadata information. To run the metadatarestore for Oracle ACFS file systems, a script is created. This script must be runas root to format file systems. Metadata for the contained Oracle ADVM volumes,such as stripe size and redundancy, is restored. Oracle ACFS file systemconfiguration metadata, such as compression and resize attributes, block size, andcreated snapshots, is also restored. Oracle ACFS file System data and ACFSCRS Resource information is not restored.

• If using the --silent option while specifying a single disk group, and there is adependency due to Oracle ADVM metadata or Oracle ACFS accelerators onanother disk group, that dependency is dropped, and you must manually recreatethat dependency later.

• When restoring Oracle ACFS encryption or security, file system extendedattributes (xattrs) must be restored with the user data. It is very important todocument that xattrs need to be stored and restored with the file systemapplication data. Without the xattrs, there is no security or encryption. xattrsdescribe which security realms the file is a part of. With no xattr, the file ends up inno realm. The converse is that a file with xattrs, but no security initialized, ends upin no realm.

• During metadata restore, a file with a list of previously configured snapshots iscreated. Snapshot data is not restored, as the point in time sparse snapshot viewscannot be recreated.

• If Oracle ACFS security is in use, and the metadata security information for the filesystem has not been backed up, this information may be copied by the securityadministrator to the metadata backup file location, and then restored with the restof the disk group information.

• If Oracle ACFS security and encryption is being restored, the user and passwordmay be pre-initialized. If it is not, the username provided is used to initialize OracleACFS security and encryption, with a default password which is displayed.

Example

The first example restores the disk group data from the backup script and creates acopy. The second example takes an existing disk group data and restores itsmetadata. The third example restores disk group data completely but the new diskgroup that is created is named data2. The fourth example restores from the backup fileafter applying the overrides defined in the override.sql script file.

Chapter 10ASMCMD Disk Group Management Commands

10-84

Page 340: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 10-91 Using the ASMCMD md_restore command

ASMCMD [+] > md_restore –-full –G data –-silent /scratch/backup/alldgs20100422

ASMCMD [+] > md_restore –-nodg –G data –-silent /scratch/backup/alldgs20100422

ASMCMD [+] > md_restore –-newdg -o 'data:data2' --silent /scratch/backup/data20100422

ASMCMD [+] > md_restore -S override.sql --silent /scratch/backup/data20100422

mkdgPurpose

Creates a disk group based on an XML configuration file.

Syntax and Description

mkdg { config_file.xml | 'contents_of_xml_file' }

Table 10-82 lists the syntax options for the mkdg command.

Table 10-82 Options for the mkdg command

Option Description

config_file Name of the XML file that contains the configuration for the new diskgroup. mkdg searches for the XML file in the directory whereASMCMD was started unless a path is specified. For examples of thevalid tags and XML configuration file, see Example 10-92 and Example 10-93.

contents_of_xml_file The XML script enclosed in single quotations.

mkdg creates a new disk group with an XML configuration file that specifies the name of thedisk group, redundancy, attributes, and paths of the disks that form the disk group.Redundancy is an optional parameter; the default is normal redundancy. For some types ofredundancy, disks are required to be gathered into failure groups. In the case that failuregroups are not specified for a disk group, each disk in the disk group belongs to its ownfailure group.

The mkdg command only mounts a disk group on the local node.

It is possible to set some disk group attribute values during disk group creation. Someattributes, such as AU_SIZE and SECTOR_SIZE, can be set only during disk group creation.

Example 10-92 shows the basic structure and the valid tags with their respective attributes forthe mkdg XML configuration file.

Example 10-92 Tags for mkdg XML configuration file

<dg> disk group name disk group name redundancy normal, external, high <fg> failure group name failure group name</fg>

Chapter 10ASMCMD Disk Group Management Commands

10-85

Page 341: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

<dsk> disk name disk name string disk path size size of the disk to add force true specifies to use the force option</dsk>

<a> attribute name attribute name value attribute value</a>

</dg>

Example

The following is an example of an XML configuration file for mkdg. The configuration filecreates a disk group named data with normal redundancy. Two failure groups, fg1 andfg2, are created, each with two disks identified by associated disk strings. The diskgroup compatibility attributes are all set to 19.0.

Example 10-93 mkdg sample XML configuration file

<dg name="data" redundancy="normal"> <fg name="fg1"> <dsk string="/dev/disk1"/> <dsk string="/dev/disk2"/> </fg> <fg name="fg2"> <dsk string="/dev/disk3"/> <dsk string="/dev/disk4"/> </fg> <a name="compatible.asm" value="19.0"/> <a name="compatible.rdbms" value="19.0"/> <a name="compatible.advm" value="19.0"/></dg>

The following are examples of the mkdg command. The first example runs mkdg with anXML configuration file in the directory where ASMCMD was started. The secondexample runs mkdg using information on the command line.

Example 10-94 Using the ASMCMD mkdg command

ASMCMD [+] > mkdg data_config.xml

ASMCMD [+] > mkdg '<dg name="data"><dsk string="/dev/disk*"/></dg>'

See Also:

• Managing Disk Group Attributes for more information about disk groupsattributes

• Disk Group Compatibility for information about disk group compatibilityattributes

• chdg for information about altering a disk group with ASMCMD chdg

• Creating Disk Groups for information about creating a disk group

Chapter 10ASMCMD Disk Group Management Commands

10-86

Page 342: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

mountPurpose

Mounts a disk group.

Syntax and Description

mount [--restrict] { [-a] | [-f] diskgroup[ diskgroup ...] }

Table 10-83 lists the syntax options for the mount command.

Table 10-83 Options for the mount command

Option Description

diskgroup Name of the disk group.

-a Mounts all disk groups.

--restrict Mounts in restricted mode.

-f Forces the mount operation.

This operation mounts one or more disk groups. A disk group can be mounted with or withoutforce or restricted options. For more information about mounting disk groups, see "Mountingand Dismounting Disk Groups".

Example

The following are examples of the mount command showing the use of the force, restrict, andall options.

Example 10-95 Using the ASMCMD mount command

ASMCMD [+] > mount -f data

ASMCMD [+] > mount --restrict data

ASMCMD [+] > mount -a

offlinePurpose

Offline disks or failure groups that belong to a disk group.

Syntax and Description

offline -G diskgroup { -F failgroup |-D disk} [-t {minutes | hours}]

Table 10-84 lists the syntax options for the offline command.

Chapter 10ASMCMD Disk Group Management Commands

10-87

Page 343: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-84 Options for the offline command

Option Description

-G diskgroup Disk group name.

-F failgroup Failure group name.

-D disk Specifies a single disk name.

-t minutes | hours Specifies the time before the specified disk is dropped as nm ornh, where m specifies minutes and h specifies hours. Forexample, 120m or 2h.The default unit is hours.

When a failure group is specified, this implies all the disks that belong to it should beofflined.

Example

The following are examples of the offline command. The first example offlines thefailgroup1 failure group of the data disk group. The second example offlines thedata_0001 disk of the data disk group with a time of 1.5 hours before the disk isdropped.

Example 10-96 Using the ASMCMD offline command

ASMCMD [+] > offline -G data -F failgroup1

ASMCMD [+] > offline -G data -D data_0001 -t 1.5h

onlinePurpose

Online all disks, a single disk, or a failure group that belongs to a disk group.

Syntax and Description

online -G diskgroup { -a | -F failgroup |-D disk} [--power n] [-w]

Table 10-85 lists the syntax options for the online command.

Table 10-85 Options for the online command

Option Description

-a Online all offline disks in the disk group.

-G diskgroup Disk group name.

-F failgroup Failure group name.

-D disk Disk name.

--power n Specifies the power option (1 to 1024) which determines thelevel of resources for the disk resync and disk group rebalance.Larger values result in faster disk resync and disk grouprebalance. The default is 1.

Chapter 10ASMCMD Disk Group Management Commands

10-88

Page 344: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-85 (Cont.) Options for the online command

Option Description

-w Wait option. Causes ASMCMD to wait for the disk group to berebalanced before returning control to the user. The default is notwaiting.

When a failure group is specified, this implies all the disks that belong to it should be onlined.

Example

The following are examples of the online command. The first example onlines all disks in thefailgroup1 failure group of the data disk group with the wait option enabled. The secondexample onlines the data_0001 disk in the data disk group.

Example 10-97 Using the ASMCMD online command

ASMCMD [+] > online -G data -F failgroup1 -w

ASMCMD [+] > online -G data -D data_0001

rebalPurpose

Rebalances a disk group.

Syntax and Description

rebal [--default | --modify power] [--with phase,... | --without phase,...] [--power power] [-w] diskgroup

Table 10-86 lists the syntax options for the rebal command.

Table 10-86 Options for the rebal command

Option Description

–default Sets the rebalance power to the default, which is the value of theASM_POWER_LIMIT initialization parameter. This option does notrestart the rebalance operation.

--modify power Modifies the rebalance power without restarting the rebalanceoperation. Accepted values are the same as ASM_POWER_LIMIT (0 to1024). A value of 0 disables rebalancing.

--with phase Runs rebalance only on the specified phases. Available phases areprepare, balance, and compact. The phases must be separated bya single comma. If this option is specified, at least one phase must bespecified.

--without phase Does not run rebalance on the specified phases. Phases areprepare, balance, and compact. The phases must be separated bya single comma. If this option is specified, at least one phase must bespecified.

--power power Specifies the power setting. Accepted values are the same asASM_POWER_LIMIT (0 to 1024). A value of 0 disables rebalancing.

Chapter 10ASMCMD Disk Group Management Commands

10-89

Page 345: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-86 (Cont.) Options for the rebal command

Option Description

-w Specifies the wait option. ASMCMD waits for the disk group to berebalanced before returning control to the user. The default is notwaiting.

diskgroup Specifies the disk group name.

The power level can be set to the same values as the ASM_POWER_LIMIT initializationparameter. A value of 0 disables rebalancing. If the rebalance power is not specified,the value defaults to the setting of the ASM_POWER_LIMIT initialization parameter.

You can determine if a rebalance operation is occurring with the ASMCMD lsopcommand.

Example

In the following example, the first rebal command rebalances the FRA disk group witha power level set to 4, performing only the balance and compact phases. The secondrebal command rebalances the DATA disk group with the rebalance power set to 1, butdoes not restart the rebalance operation.

Example 10-98 Using the ASMCMD rebal command

ASMCMD [+] > rebal --with balance,compact --power 4 FRA

ASMCMD [+] > lsopGroup_Name Operation State PowerFRA REBAL RUN 4 ASMCMD [+] > rebal --modify 1 DATA

See Also:

• ASM_POWER_LIMIT and Tuning Rebalance Operations for informationabout the power level

• lsop for information about the ASMCMD lsop command

• Manually Rebalancing Disk Groups for more information aboutrebalancing a disk group

remapPurpose

Marks a range of blocks as unusable on the disk and relocates any data allocated inthat range.

Syntax and Description

remap diskgroup disk block_range

Chapter 10ASMCMD Disk Group Management Commands

10-90

Page 346: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-87 lists the syntax options for the remap command.

Table 10-87 Options for the remap command

Option Description

diskgroup Disk group name in which a disk must have data relocated.

disk Name of the disk that must have data relocated. The name mustmatch the NAME column in the V$ASM_DISK view.

block_range Range of physical blocks to relocate in the formatstart_range_number-end_range_number.

The remap command only relocates blocks. It does not correct or repair blocks that containcorrupted contents. The command uses a physical block size based on the SECTOR_SIZE diskgroup attribute.

Examples

The first example remaps blocks 5000 through 5999 for disk DATA_0001 in disk group DATA.The second example remaps blocks 6230 through 6339 for disk FRA_0002 in disk group FRA

Example 10-99 Using the ASMCMD remap command

ASMCMD [+] > remap DATA DATA_0001 5000-5999

ASMCMD [+] > remap FRA FRA_0002 6230-6339

setsparseparent

Purpose

Sets the parent for a sparse child file.

Syntax and Description

setsparseparent child_file1 [child_file2 ...] parent_file

The following table lists the syntax options for the setsparseparent command.

Table 10-88 Options for the setsparseparent command

Option Description

child_fileN Name of the child file.

parent_file Name of the parent file.

The following are the examples of setsparseparent command. The first example sets aparent file in the data disk group to a sparse file in the sparse disk group. The secondexample sets a parent file in the data disk group to multiple sparse files in the sparse diskgroup.

Example 10-100 Using the ASMCMD setsparseparent command

ASMCMD [+] > setsparseparent +SPARSEDG/child.1.10 +DATA/parent.1.fsetting parent of +SPARSEDG/child.1.10 to +DATA/parent.1.f

Chapter 10ASMCMD Disk Group Management Commands

10-91

Page 347: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

ASMCMD [+] > setsparseparent +SPARSEDG/child.1a.10 +SPARSEDG/child.1b.11 +SPARSEDG/child.1c.12 +DATA/parent.1.fsetting parent of +SPARSEDG/child.1a.10 to +DATA/parent.1.fsetting parent of +SPARSEDG/child.1b.11 to +DATA/parent.1.fsetting parent of +SPARSEDG/child.1c.12 to +DATA/parent.1.f

setattrPurpose

Sets the attributes for an Oracle ASM disk group.

Syntax and Description

setattr -G diskgroup attribute_name attribute_value

Table 10-89 lists the syntax options for the setattr command.

Table 10-89 Options for the setattr command

Option Description

-G diskgroup Disk group name.

attribute_name Name of the attribute.

attribute_value Value of the attribute.

The COMPATIBLE.ASM attribute must be advanced before advancing other disk groupcompatibility attributes and its value must be greater than or equal to the value of otherdisk group compatibility attributes.

For information about disk group attributes, see "Managing Disk Group Attributes".

Example

The following are examples of the setattr command. The first example sets the diskgroup attribute COMPATIBLE.ASM for the data disk group. The second example sets thedisk group attribute COMPATIBLE.RDBMS for the data disk group.

Example 10-101 Using the ASMCMD setattr command

ASMCMD [+] > setattr -G data compatible.asm 19.0

ASMCMD [+] > setattr -G data compatible.rdbms 19.0

stamp

Purpose

Stamps the disk, site, and failure group labels in disk headers.

Syntax and Description

stamp --dscstr disk_discovery_string [--site site_name --failgroup failgroup_name] [--disk disk_label] [-f]

Chapter 10ASMCMD Disk Group Management Commands

10-92

Page 348: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The following table describes the options for the stamp command.

Table 10-90 Options for the stamp command

Option Description

--dscstrdisk_discovery_string

Specifies the disk discovery string that identifies the disks on which tostamp labels.

--site site_name Specifies the site label name.

--failgroupfailgroup_name

Specifies the failure group label. Required when the site label isspecified.

--disk disk_label Specifies the disk label.

-f Specifies to force the action.

ASMCMD stamp enables the users to stamp the disk, site, and fail group labels on diskheaders. Using stamp is more efficient than individually specifying label information duringinstallation and creation of disk groups.

Site label and fail groups labels are used for the site names and fail group names whencreating and altering a disk group. Disk labels are only intended for use with Oracle ASM filterdriver (AFD) and Oracle ASM libraries.

At least one label specification (-—site with --failgroup or --disk) must be provided.

Examples

The following example shows the use of the ASMCMD stamp command on the disksidentified by the /dev/sd* disk discovery string.

Example 10-102 Using ASMCMD stamp

ASMCMD [+] > stamp --dscstr "/dev/sd*" --site "SALTLAKE-CENTER" --failgroup "fg1" --disk "DISK1"

stamplist

Purpose

Displays the disk, site and failure group labels in disk headers.

Syntax and Description

stamp --dscstr disk_discovery_string {[--site] [--failgroup] [--disk]}

The following table describes the options for the stamplist command.

Table 10-91 Options for the stamplist command

Option Description

--dscstrdisk_discovery_string

Specifies the disk discovery string that identifies the disks for which todisplay labels.

Chapter 10ASMCMD Disk Group Management Commands

10-93

Page 349: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-91 (Cont.) Options for the stamplist command

Option Description

--site Displays the site label name.

--failgroup Displays the failure group label.

--disk Displays the disk label.

You must specify at least one of the -—site, --failgroup, or --disk options.

Examples

The following example shows the use of the ASMCMD stamplist command to displaysite, failure group, and disk labels of the disks identified by the /dev/sd* diskdiscovery string.

Example 10-103 Using ASMCMD stamplist

ASMCMD [+] > stamplist --dscstr "/dev/sd*" --site --failgroup --disk

umountPurpose

Dismounts a disk group.

Syntax and Description

umount { -a | [-f] diskgroup }

Table 10-92 lists the syntax options for the umount command.

Table 10-92 Options for the umount command

Option Description

diskgroup Name of the disk group.

-a Dismounts all mounted disk groups. These disk groups are listedin the output of the V$ASM_DISKGROUP view.

-f Forces the dismount operation.

Example

The following are examples of the umount command. The first example dismounts alldisk groups mounted on the Oracle ASM instance. The second example forces thedismount of the data disk group.

Example 10-104 Using the ASMCMD umount command

ASMCMD [+] > umount -a

ASMCMD [+] > umount -f data

Chapter 10ASMCMD Disk Group Management Commands

10-94

Page 350: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

ASMCMD File Group Management CommandsThis topic provides a summary of the ASMCMD commands that enable you to manageOracle ASM file groups and quota groups.

The following table lists the ASMCMD file group and quota group commands with briefdescriptions.

Table 10-93 Summary of ASMCMD file group commands

Command Description

chfg Modifies a file group in a disk group based on an XML configuration file orscript.

chqg Modifies a quota group in the disk group.

lsfg List file groups in a disk group.

lsqg Lists the quota groups in a disk group.

mkfg Creates a file group in a disk group based on an XML configuration file orscript.

mkqg Adds a quota group to the disk group.

mvfg Moves a file group in a disk group to the specified quota group.

mvfile Moves a file to the specified file group in the same disk group where the file isstored.

rmfg Removes an existing file group from a disk group.

rmqg Drops a quota group from a disk group.

See Also:

• Managing Oracle ASM Flex Disk Groups for more information about Oracle filegroups

• Oracle Database Reference for information about the V$ASM views that containfile group and quota group information.

• Oracle Database SQL Language Reference for information about administeringOracle ASM file groups and quota groups with SQL statements

chfgPurpose

Changes the attributes of a file group in a disk group based on an XML configuration file orscript.

Syntax and Description

chfg { config_file.xml | 'contents_of_xml_script' }

The following table lists the options for the chfg command.

Chapter 10ASMCMD File Group Management Commands

10-95

Page 351: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-94 Options for the chfg command

Option Description

config_file.xml Name of the XML file that contains the changes for the file group.chfg searches for the XML file in the current working directory ofASMCMD unless a path is specified

contents_of_xml_script.xml

The contents of an XML script enclosed in single quotes.

The root element of the XML configuration file or script is the <file_group> tag andhas these attributes:

• name: file group name

• dg: disk group name to which the file group belongs

You can set properties using these tag:

• name: property name

• value: property value

• file_type: property file type (optional)

• template: Oracle ASM template name (optional)

The following is an example of an XML configuration file for chfg. The configuration filealters a file group named filegroup1 on disk group dg_data1. The file group isassociated with quota group quotagroup1.

<filegroup name="filegroup1" dg="dg_data1"> <p name="quota_group" value="quotagroup1"/></filegroup>

For information about Oracle ASM File Groups, refer to Managing Oracle ASM FlexDisk Groups.

Example

The following examples show the use of the chfg command using an XMLconfiguration file and an XML script.

Example 10-105 Using the chfg command

ASMCMD [+] > chfg config_file.xml

ASMCMD [+] > chfg '<filegroup name="filegroup1" dg="dg_data1"> <p name="redundancy" value="high"/> </filegroup>'

chqgPurpose

Modifies a quota group in the disk group.

Chapter 10ASMCMD File Group Management Commands

10-96

Page 352: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Syntax and Description

chqg -G disk_group quota_group property value

The following table lists the options for the chqg command.

Table 10-95 Options for the chqg command

Option Description

-G disk_group Specifies the disk group.

quota_group Specifies the quota group.

property Specifies the name of the property.

value Specifies the value of the property.

The chqg command modifies the specified property in the specified quota group of thespecified disk group. For information about Oracle ASM File and Quota Groups, refer to"Managing Oracle ASM Flex Disk Groups".

The following are examples of the chqg command. The first example modifies the quotaproperty of the quota group quota_grp1 in the data disk group. The second example modifiesthe quota property of the quota group quota_grp2 in the data disk group.

Example 10-106 Using the chqg command

ASMCMD [+] > chqg -G data quota_grp1 quota 200G

ASMCMD [+] > chqg -G data quota_grp2 quota UNLIMITED

lsfgPurpose

List file groups in a disk group.

Syntax and Description

lsfg [-G disk_group] [--filegroup file_group] [--suppressheader]

The following table lists the options for the lsfg command.

Table 10-96 Options for the lsfg command

Option Description

-G disk_group Specifies the disk group.

—filegroupfile_group Specifies the file group.

—suppressheader Suppresses the headers in the output of the command.

If the disk group option is specified, then lsfg returns only information about file groups in thespecified disk group. If the file group option is specified, then lsfg returns only informationabout that file group.

Chapter 10ASMCMD File Group Management Commands

10-97

Page 353: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The information about file groups is retrieved from V$ASM_FILEGROUP andV$ASM_FILEGROUP_PROPERTY views.

The following example shows the use of thelsfg command. The first command in theexample displays the properties of the file group FG1 in the DATA disk group. Thesecond command lists all the file groups and their properties in the DATA disk group.

Example 10-107 Using the lsfg command

ASMCMD [+] > lsfg -G DATAFile Group Disk Group Quota Group Used Quota MB Client Name Client Type DEFAULT_FILEGROUP DATA GENERIC 0 VOLUME1 DATA GENERIC 3123 VOLUME1 VOLUME ORCL DATA GENERIC 5488 ORCL DATABASE

ASMCMD [+] > lsfg -G DATA --filegroup ORCLFile Group Disk Group Property Value File Type ORCL DATA PRIORITY MEDIUM ORCL DATA STRIPING COARSE CONTAINER ORCL DATA REDUNDANCY HIGH CONTROLFILE ORCL DATA STRIPING FINE CONTROLFILE ORCL DATA REDUNDANCY MIRROR DATAFILE ORCL DATA STRIPING COARSE DATAFILE ...

lsqgPurpose

Lists the quota groups in a disk group.

Syntax and Description

lsqg [-G disk_group] [--quotagroup quota_group] [--suppressheader]

The following table lists the options for the lsqg command.

Table 10-97 Options for the lsqg command

Option Description

-G disk_group Specifies the disk group.

—quotagroupquota_group Specifies the quota group.

—suppressheader Suppresses the headers in the output of the command.

If the disk group option is specified, then lsqg returns only information about quotagroups in the specified disk group. If the quota group option is specified, then lsqgreturns only information about that quota group.

Chapter 10ASMCMD File Group Management Commands

10-98

Page 354: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The information about file groups is retrieved from V$ASM_QUOTAGROUP view.

The following example shows the use of thelsqg command. The first command in theexample displays the properties of the file group QG1 in the DATA disk group. The secondcommand lists all the quota groups and their properties in the DATA disk group. The thirdcommand lists all the quota groups with name QG1 in all the disk groups mounted by thecurrent Oracle ASM instance. The fourth command lists all the quota groups in all the diskgroups mounted by the current Oracle ASM instance.

Example 10-108 Using the lsqg command

ASMCMD [+] > lsqg -G DATA --quotagroup QG1Used_Quota_MB Quota_Limit_MB100 200

ASMCMD [+] > lsqg -G DATAQuotagroup_Num Quotagroup_Name Used_Quota_MB Quota_Limit_MB1 GENERIC 12357 2621432 QG1 100 2003 QG2 400 420

ASMCMD [+] > lsqg --quotagroup QG1Group_Num Quotagroup_Num Used_Quota_MB Quota_Limit_MB1 2 100 2003 5 821 1024

ASMCMD [+] > lsqgGroup_Num Quotagroup_Num Quotagroup_Name Used_Quota_MB Quota_Limit_MB1 1 GENERIC 12357 2621431 2 QG1 100 2001 3 QG2 400 4202 1 GENERIC 54000 2621433 1 GENERIC 11 2621433 5 QG1 821 1024

mkfg

Note:

A multitenant container database is the only supported architecture in OracleDatabase 21c. While the documentation is being revised, legacy terminology maypersist. In most cases, "database" and "non-CDB" refer to a CDB or PDB,depending on context. In some contexts, such as upgrades, "non-CDB" refers to anon-CDB from a previous release.

Purpose

Creates a file group in a disk group based on an XML configuration file or script.

Syntax and Description

mkfg { config_file.xml | 'contents_of_xml_script' }

The following table lists the options for the mkfg command.

Chapter 10ASMCMD File Group Management Commands

10-99

Page 355: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-98 Options for the mkfg command

Option Description

config_file.xml Name of the XML file that contains the configuration informationfor the file group. mkfg searches for the XML file in the currentworking directory of ASMCMD unless a path is specified

contents_of_xml_script.xml

The contents of an XML script enclosed in single quotes.

The root element of the XML configuration file or script is the <file_group> tag andhas these attributes:

• name: file group name

• dg: disk group name to which the file group belongs

• client_type: database, cluster, volume

• client_name: database, CDB, PDB, cluster or volume name

You can set properties using these tag:

• name: property name

• value: property value

• file_type: property file type (optional)

• template: Oracle ASM template name (optional)

The following is an example of an XML configuration file for mkfg. The configuration filecreates a file group named filegroup1 on disk group dg_data1 for a database namedsample. The file group is associated with quota group quotagroup1. The files in this filegroup have the redundancy set to mirror, except for the control file, which has a highredundancy. All other attributes are set to the default value.

<filegroup name="filegroup1" dg="dg_data1" client_type="database" client_name="sample"> <p name="redundancy" value="mirror"/> <p name="redundancy" value="high" file_type="controlfile"/> <p name="quota_group" value="quotagroup1"/></filegroup>

For information about Oracle ASM File Groups, refer to "Managing Oracle ASM FlexDisk Groups".

Example

The following examples show the use of the mkfg command using an XMLconfiguration file and an XML script.

Example 10-109 Using the mkfg command

ASMCMD [+] > mkfg config_file.xml

ASMCMD [+] > mkfg '<filegroup name="filegroup1" dg="dg_data1" client_type="database" client_name="sample"> </filegroup>'

Chapter 10ASMCMD File Group Management Commands

10-100

Page 356: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

mkqgPurpose

Adds a quota group to the disk group.

Syntax and Description

mkqg -G disk_group quota_group [property] [value]

The following table lists the options for the chqg command.

Table 10-99 Options for the mkqg command

Option Description

-G disk_group Specifies the disk group.

quota_group Specifies the quota group.

property Specifies the name of the property.

value Specifies the value of the property.

The mkqg command adds the specified quota group with an optional the specified property tothe specified disk group. For information about Oracle ASM file and quota groups, refer to"Managing Oracle ASM Flex Disk Groups".

The following are examples of the mkqg command. The first example adds the quota groupquota_grp1 to the data disk group without specifying a property. The second example addsthe quota group quota_grp2 to the data disk group while specifying the quota property.

Example 10-110 Using the mkqg command

ASMCMD [+] > mkqg -G data quota_grp1

ASMCMD [+] > mkqg -G data quota_grp2 quota 100G

mvfgPurpose

Moves a file group in a disk group to the specified quota group.

Syntax and Description

mvfg -G disk_group --filegroup file_group quota_group

The following table lists the options for the mvfg command.

Table 10-100 Options for the mvfg command

Option Description

-G disk_group Specifies the disk group.

—filegroupfile_group Specifies the file group.

Chapter 10ASMCMD File Group Management Commands

10-101

Page 357: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-100 (Cont.) Options for the mvfg command

Option Description

quota_group Specifies the quota group.

The following is an example of the mvfg command. In the example, the file group FG1in the DATA disk group is moved to the quota group QG1

Example 10-111 Using the mvfg command

ASMCMD [+] > mvfg -G DATA --filegroup FG1 QG1

mvfile

Purpose

Moves a file to the specified file group in the same disk group where the file is stored.

Syntax and Description

mvfile file_name --filegroup file_group

The following table lists the options for the mvfile command.

Table 10-101 Options for the mvfile command

Option Description

file_name Specifies the file to be moved.

—filegroup file_group Specifies the file group name.

The following mvfile commands move the specified Oracle ASM file to the named filegroup.

Example 10-112 Using the mvfile command

ASMCMD [+] > mvfile +data/orcl/controlfile/Current.260.684924747 --filegroup FG1

ASMCMD [+fra/orcl/archivelog/flashback] > mvfile log_7.264.684968167 --filegroup FG1

rmfgPurpose

Removes an existing file group from a disk group.

Syntax and Description

rmfg [-r] disk_group file_group

The following table lists the options for the rmfg command.

Chapter 10ASMCMD File Group Management Commands

10-102

Page 358: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-102 Options for the rmfg command

Option Description

-r Specifies a recursive operation.

disk_group Specifies the disk group.

file_group Specifies the file group.

The -r option specifies a recursive removal, including contents. All files in the disk group thatthe file group contains are removed at the same time that the file group is removed. You mustspecify this option to remove a file group that contains any files. If you omit this option andthe file group is not empty, then ASMCMD returns an error and does not remove the filegroup.

The following example shows the use of the rmfg command. The first command in theexample removes file group FG1 from the DATA1 disk group. The second command removesfile group FG2, and its contents, from the DATA2 disk group.

Example 10-113 Using the rmfg command

ASMCMD [+] > rmfg DATA1 FG1 ASMCMD [+] > rmfg -r DATA2 FG2

rmqgPurpose

Removes a quota group from a disk group.

Syntax and Description

rmqg -G disk_group quota_group

The following table lists the options for the rmqg command.

Table 10-103 Options for the rmqg command

Option Description

-G disk_group Specifies the disk group.

quota_group Specifies the quota group.

The following example shows the use of the rmqg command. The command in the exampleremoves quota group QG1 from the DATA disk group.

Example 10-114 Using the rmqg command

ASMCMD [+] > rmqg -G DATA QG1

ASMCMD Template Management CommandsThis topic provides a summary of the ASMCMD template management commands.

Table 10-104 lists the ASMCMD template management commands with brief descriptions.

Chapter 10ASMCMD Template Management Commands

10-103

Page 359: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-104 Summary of ASMCMD template management commands

Command Description

chtmpl Changes the attributes of a template.

lstmpl Lists disk group templates.

mktmpl Adds a template to a disk group.

rmtmpl Removes a template from a disk group.

chtmplPurpose

Changes the attributes of a template.

Syntax and Description

chtmpl -G diskgroup { [--striping {coarse|fine}] [--redundancy {high|mirror|unprotected} ] } template

Table 10-105 lists the syntax options for the chtmpl command.

Table 10-105 Options for the chtmpl command

Option Description

-G diskgroup Name of the disk group.

template Name of the template to change.

--striping {coarse | fine} Striping specification, either coarse or fine.

--redundancy { high | mirror |unprotected}

Redundancy specification, either high, mirror, orunprotected.

At least one of the following options is required: --striping or --redundancy.

For information about updating templates, see "Modifying a Disk Group Template".

Example

The following is an example of the chtmpl command that updates the mytemplatetemplate of the data disk group. The redundancy attribute is set to high and thestriping attribute is set to fine.

Example 10-115 Using the ASMCMD chtmpl command

ASMCMD [+] > chtmpl -G data --redundancy high --striping fine mytemplate

lstmplPurpose

Lists all templates for all disk groups or the templates for a specified disk group.

Chapter 10ASMCMD Template Management Commands

10-104

Page 360: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Syntax and Description

lstmpl [--suppressheader] [-l] [-G diskgroup] [pattern]

Table 10-106 lists the syntax options for the lstmpl command.

Table 10-106 Options for the lstmpl command

Option Description

-G diskgroup Specifies disk group name.

--suppressheader Suppresses column headings.

-l Displays all details.

pattern Displays the templates that match pattern expression.

For information about template attributes, see "Template Attributes".

Example

The following is an example of the lstmpl command. The example lists all details of thetemplates in the data disk group.

Example 10-116 Using the ASMCMD lstmpl command

ASMCMD [+] > lstmpl -l -G data

Group_Name Group_Num Name Stripe Sys Redund PriReg MirrReg DATA 1 ARCHIVELOG COARSE Y MIRROR COLD COLDDATA 1 ASMPARAMETERFILE COARSE Y MIRROR COLD COLDDATA 1 AUDIT_SPILLFILES COARSE Y MIRROR COLD COLDDATA 1 AUTOBACKUP COARSE Y MIRROR COLD COLDDATA 1 AUTOLOGIN_KEY_STORE COARSE Y MIRROR COLD COLDDATA 1 BACKUPSET COARSE Y MIRROR COLD COLDDATA 1 CHANGETRACKING COARSE Y MIRROR COLD COLDDATA 1 CONTROLFILE FINE Y HIGH COLD COLDDATA 1 DATAFILE COARSE Y MIRROR COLD COLDDATA 1 DATAGUARDCONFIG COARSE Y MIRROR COLD COLDDATA 1 DUMPSET COARSE Y MIRROR COLD COLDDATA 1 FLASHBACK COARSE Y MIRROR COLD COLDDATA 1 FLASHFILE COARSE Y MIRROR COLD COLDDATA 1 INCR XTRANSPORT BACKUPSET COARSE Y MIRROR COLD COLDDATA 1 KEY_STORE COARSE Y MIRROR COLD COLDDATA 1 OCRFILE COARSE Y MIRROR COLD COLDDATA 1 ONLINELOG COARSE Y MIRROR COLD COLDDATA 1 PARAMETERFILE COARSE Y MIRROR COLD COLDDATA 1 TEMPFILE COARSE Y MIRROR COLD COLDDATA 1 VOTINGFILE COARSE Y MIRROR COLD COLDDATA 1 XTRANSPORT COARSE Y MIRROR COLD COLDDATA 1 XTRANSPORT BACKUPSET COARSE Y MIRROR COLD COLD

mktmplPurpose

Adds a template to a disk group.

Chapter 10ASMCMD Template Management Commands

10-105

Page 361: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Syntax and Description

mktmpl -G diskgroup [--striping {coarse|fine}] [--redundancy {high|mirror|unprotected}] template

Table 10-107 lists the syntax options for the mktmpl command.

Table 10-107 Options for the mktmpl command

Option Description

-G diskgroup Name of the disk group.

template Name of the template to create.

--striping {coarse | fine} Striping specification, either coarse or fine.

--redundancy { high | mirror |unprotected}

Redundancy specification, either high, mirror, orunprotected.

For information about adding templates, see Adding Templates to a Disk Group.

Example

The following is an example of the mktmpl command that adds the mytemplatetemplate to the data disk group. The new template has the redundancy set to mirrorand the striping set to coarse.

Example 10-117 Using the ASMCMD mktmpl command

ASMCMD [+] > mktmpl -G data --redundancy mirror --striping coarse mytemplate

rmtmplPurpose

Removes a template from a disk group.

Syntax and Description

rmtmpl -G diskgroup template

Table 10-108 lists the syntax options for the rmtmpl command.

Table 10-108 Options for the rmtmpl command

Option Description

-G diskgroup Name of the disk group.

template Name of the template to delete.

For information about template attributes, see "Template Attributes".

Example

The following is an example of the rmtmpl command that removes the mytemplatetemplate from the data disk group.

Chapter 10ASMCMD Template Management Commands

10-106

Page 362: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 10-118 Using the ASMCMD rmtmpl command

ASMCMD [+] > rmtmpl -G data mytemplate

ASMCMD File Access Control CommandsThis topic provides a summary of the ASMCMD Oracle ASM File Access Control commands.

For information about Oracle ASM File Access Control, see Managing Oracle ASM FileAccess Control for Disk Groups.

When administering users with ASMCMD, the users must be existing operating system usersand their user names must have corresponding operating system user IDs. However, onlyusers in the same cluster as the Oracle ASM instance can be validated.

Note:

When modifying ownership of files, the previous owner of a file cannot be droppedwhile the file is still open even after the ownership of the file has changed.

Table 10-109 lists the ASMCMD Oracle ASM File Access Control commands with briefdescriptions.

Table 10-109 Summary of ASMCMD file access control commands

Command Description

chgrp Changes the user group of a file or list of files.

chmod Changes permissions of a file or list of files.

chown Changes the owner of a file or list of files.

groups Lists the user groups to which a user belongs.

grpmod Adds or removes users from an existing user group.

lsgrp Lists user groups.

lsusr Lists users in a disk group.

mkgrp Creates a new user group.

mkusr Adds a user to disk group.

passwd Changes the password of a user.

rmgrp Deletes a user group.

rmusr Deletes a user from a disk group.

rpusr Replaces one a user with another in a disk group.

chgrpPurpose

Changes the user group of a file or list of files.

Chapter 10ASMCMD File Access Control Commands

10-107

Page 363: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Syntax and Description

chgrp usergroup file [file ...]

Table 10-110 lists the syntax options for the chgrp command.

Table 10-110 Options for the chgrp command

Option Description

usergroup Name of the user group.

file Name of a file.

Only the file owner or the Oracle ASM administrator can use this command. If the useris the file owner, then the user must also be either the owner or a member of the groupfor this command to succeed.

This command accepts a file name or multiple file names separated by spaces.

If you change the user group settings of an open file, then the operation currentlyrunning on the file completes using the old user group settings. The new settings takeeffect when re-authentication is required.

Examples

The following are examples of the chgrp command that change the Oracle ASM usergroup of the specified files.

Example 10-119 Using the ASMCMD chgrp command

ASMCMD [+] > chgrp asm_data +data/orcl/controlfile/Current.260.684924747

ASMCMD [+fra/orcl/archivelog/flashback] > chgrp asm_fra log_7.264.684968167 log_8.265.684972027

chmodPurpose

Changes permissions of a file or list of files.

Syntax and Description

chmod mode file [file ...]

mode can be one of the following forms:

• { ugo | ug | uo | go | u | g | o | a } {+|- } {r|w |rw}

a specifies permissions for all users, u specifies permissions for the owner of thefile, g specifies the group permissions, and o specifies permissions for other users.

• { 0|4|6} {0|4|6} {0|4|6}

The first digit specifies owner permissions, the second digit specifies grouppermissions, and the third digit specifies other permissions.

Table 10-111 lists the syntax options for the chmod command.

Chapter 10ASMCMD File Access Control Commands

10-108

Page 364: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-111 Options for the chmod command

Option Description

6 Read write permissions

4 Read only permissions

0 No permissions

u Owner permissions, used with r or w

g Group permissions, used with r or w

o Other user permissions, used with r or w

a All user permissions, used with r or w

+ Add a permission, used with r or w

- Removes a permission, used with r or w

r Read permission

w Write permission

file Name of a file

This command accepts a file name or multiple file names separated by spaces.

You can only set file permissions to read-write, read-only, and no permissions. You cannot setfile permissions to write-only.

If you change the permission settings of an open file, then the operation currently running onthe file completes using the old permission settings. The new settings take effect when re-authentication is required.

To view the permissions on a file, use the ASMCMD ls command with the --permissionoption. See "ls".

Examples

The following are examples of the chmod command that change the permissions of thespecified files.

Example 10-120 Using the ASMCMD chmod command

ASMCMD [+fra/orcl/archivelog/flashback] > chmod ug+rw log_7.264.684968167 log_8.265.684972027

ASMCMD [+fra/orcl/archivelog/flashback] > chmod 640 log_7.264.684968167 log_8.265.684972027

ASMCMD [+] > ls --permission +fra/orcl/archivelog/flashbackUser Group Permission Namegrid asm_fra rw-r----- log_7.264.684968167grid asm_fra rw-r----- log_8.265.684972027

chownPurpose

Changes the owner of a file or list of files.

Chapter 10ASMCMD File Access Control Commands

10-109

Page 365: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Syntax and Description

chown user[:usergroup ] file [file ...]

Table 10-112 lists the syntax options for the chown command.

Table 10-112 Options for the chown command

Option Description

user The name of the user that becomes the new owner.

usergroup Name of the user group to which the user belongs.

file Name of a file.

user typically refers to the user that owns the database instance home. Oracle ASMFile Access Control uses the operating system (OS) name to identify a database.

This command accepts a file name or multiple file names separated by spaces.

If you change the ownership settings of an open file, then the following applies:

• The operation currently running on the file completes using the old ownership anduser group settings. The new settings take effect when re-authentication isrequired.

• The new owner of the file cannot be dropped from the disk group until all instancesin a cluster are restarted in a rolling manner.

Only the Oracle ASM administrator can use this command.

Examples

The following are examples of the chown command that change the owner of thespecified files to the oracle1 operating system user.

Example 10-121 Using the ASMCMD chown command

ASMCMD [+fra/orcl/archivelog/flashback] > chown oracle1 log_7.264.684968167 log_8.265.684972027

ASMCMD [+fra/orcl/archivelog/flashback] > chown oracle1:asm_fra log_9.264.687650269

groupsPurpose

Lists all the user groups to which the specified user belongs.

Syntax and Description

groups diskgroup user

Table 10-113 lists the syntax options for the groups command.

Chapter 10ASMCMD File Access Control Commands

10-110

Page 366: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-113 Options for the groups command

Option Description

diskgroup Name of the disk group to which the user belongs.

user Name of the user.

Examples

The following is an example of the groups command that displays the user groups of the datadisk group to which the oracle1 user belongs.

Example 10-122 Using the ASMCMD groups command

ASMCMD [+] > groups data oracle1asm_data

grpmodPurpose

Adds or removes operating system (OS) users to and from an existing Oracle ASM usergroup.

Syntax and Description

grpmod { --add | --delete } diskgroup usergroup user [user...]

Table 10-114 lists the syntax options for the grpmod command.

Table 10-114 Options for the grpmod command

Option Description

--add Specifies to add users to the user group.

--delete Specifies to delete users from the user group.

diskgroup Name of the disk group to which the user group belongs.

usergroup Name of the user group.

user Name of the user to add or remove from the user group.

Only the owner of the user group can use this command. The command requires theSYSASM privilege to run.

This command accepts an operating system user name or multiple user names separated byspaces. The operating system users are typically owners of a database instance home.

Examples

The following are examples of the grpmod command. The first example adds the oracle1 andoracle2 users to the asm_fra user group of the fra disk group. The second exampleremoves the oracle2 user from the asm_data user group of the data disk group.

Chapter 10ASMCMD File Access Control Commands

10-111

Page 367: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 10-123 Using the ASMCMD grpmod command

ASMCMD [+] > grpmod –-add fra asm_fra oracle1 oracle2

ASMCMD [+] > grpmod –-delete data asm_data oracle2

lsgrpPurpose

Lists all Oracle ASM user groups or only groups that match a specified pattern.

Syntax and Description

lsgrp [--suppressheader][-a] [ -G diskgroup ] [ pattern ]

Table 10-115 lists the syntax options for the lsgrp command.

Table 10-115 Options for the lsgrp command

Option Description

--suppressheader Suppresses column headings.

-a Lists all columns.

-G diskgroup Limits the results to the specified disk group name.

pattern Displays the user groups that match the pattern expression.

Examples

The following are examples of the lsgrp command. The first example displays asubset of information about the user groups whose name matches the asm% pattern.The second example displays all information about all the user groups.

Example 10-124 Using the ASMCMD lsgrp command

ASMCMD [+] > lsgrp asm%DG_Name Grp_Name OwnerFRA asm_fra gridDATA asm_data grid

ASMCMD [+] > lsgrp -aDG_Name Grp_Name Owner MembersFRA asm_fra grid oracle1DATA asm_data grid oracle1 oracle2

lsusrPurpose

Lists Oracle ASM users in a disk group.

Syntax and Description

lsusr [--suppressheader][-a] [-G diskgroup ] [ pattern ]

Table 10-116 lists the syntax options for the lsusr command.

Chapter 10ASMCMD File Access Control Commands

10-112

Page 368: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 10-116 Options for the lsusr command

Option Description

-a List all users and the disk groups to which the users belong.

--suppressheader Suppresses column headings.

-G diskgroup Limits the results to the specified disk group name.

pattern Displays the users that match the pattern expression.

Examples

The following is an example of the lsusr command. The example lists users in the data diskgroup and also shows the operating system Id assigned to the user.

Example 10-125 Using the ASMCMD lsusr command

ASMCMD [+] > lsusr -G dataUser_Num OS_ID OS_Name 3 1001 grid1 1021 oracle12 1022 oracle2

mkgrpPurpose

Creates a new Oracle ASM user group.

Syntax and Description

mkgrp diskgroup usergroup [user] [user...]

Table 10-117 lists the syntax options for the mkgrp command.

Table 10-117 Options for the mkgrp command

Option Description

diskgroup Name of the disk group to which the user group is added.

usergroup Name of the user group to add. 30 is the maximum number ofcharacters.

user Name of the database user to add to the user group.

You can optionally specify a list of users to be included as members of the new user group.

Examples

The following is an example of the mkgrp command. This example creates the asm_data usergroup in the data disk group and adds the oracle1 and oracle2 users to the user group.

Example 10-126 Using the ASMCMD mkgrp command

ASMCMD [+] > mkgrp data asm_data oracle1 oracle2

Chapter 10ASMCMD File Access Control Commands

10-113

Page 369: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

mkusrPurpose

Adds an operating system (OS) user to a disk group.

Syntax and Description

mkusr diskgroup user

Table 10-118 lists the syntax options for the mkusr command.

Table 10-118 Options for the mkusr command

Option Description

diskgroup Specifies the name of the disk group to which the user is to beadded.

user Name of the user to add.

The user to be added must be a valid operating system user. Only a userauthenticated as SYSASM can run this command.

Examples

The following are examples of the mkusr command. The first example adds theoracle1 user to the data disk group. The second example adds the oracle2 user tothe fra disk group.

Example 10-127 Using the ASMCMD mkusr command

ASMCMD [+] > mkusr data oracle1

ASMCMD [+] > mkusr fra oracle2

passwdPurpose

Changes the password of a user.

Syntax and Description

passwd user

Table 10-119 lists the syntax options for the passwd command.

Table 10-119 Options for the passwd command

Option Description

user Name of the user.

Chapter 10ASMCMD File Access Control Commands

10-114

Page 370: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

An error is raised if the user does not exist in the Oracle ASM password file. The user is firstprompted for the current password, then the new password. The command requires theSYSASM privilege to run.

Examples

The following is an example of the passwd command that changes the password of theoracle2 user.

Example 10-128 Using the ASMCMD passwd command

ASMCMD [+] > passwd oracle2Enter old password (optional): Enter new password: ******

rmgrpPurpose

Removes a user group from a disk group.

Syntax and Description

rmgrp diskgroup usergroup

Table 10-120 lists the syntax options for the rmgrp command.

Table 10-120 Options for the rmgrp command

Option Description

diskgroup Name of the disk group to which the user group belongs.

usergroup Name of the user group to delete.

Removing a group might leave some files without a valid user group. To ensure that thosefiles have a valid group, explicitly update those files to a valid user group. See "chgrp".

The command must be run by the owner of the user group and also requires the SYSASMprivilege to run.

Examples

The following is an example of the rmgrp command that removes the asm_data user groupfrom the data disk group.

Example 10-129 Using the ASMCMD rmgrp command

ASMCMD [+] > rmgrp data asm_data

rmusrPurpose

Deletes an operating system (OS) user from a disk group.

Chapter 10ASMCMD File Access Control Commands

10-115

Page 371: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Syntax and Description

rmusr [-r] diskgroup user

Table 10-121 lists the syntax options for the rmusr command.

Table 10-121 Options for the rmusr command

Option Description

-r Removes all files in the disk group that the user owns at thesame time that the user is removed.

diskgroup Specifies the name of the disk group from which the user is to bedeleted.

user Name of the user to delete.

The command requires the SYSASM privilege to run.

Examples

The following is an example of the rmusr command that removes the oracle2 userfrom the data disk group.

Example 10-130 Using the ASMCMD rmusr command

ASMCMD [+] > rmusr data oracle2

rpusrPurpose

Replaces one operating system (OS) user with another in a disk group.

Syntax and Description

rpusr diskgroup user1 user2

Table 10-122 lists the syntax options for the rpusr command.

Table 10-122 Options for the rpusr command

Option Description

diskgroup Specifies the name of the disk group.

user1 Name of the user to be replaced.

user2 Name of user that replaces the existing user in the disk group.

The rpusr command replaces one operating system user with another in an OracleASM disk group. The replacement user must not be a user currently in the disk groupuser list.

If the command succeeds, all files that were previously owned by current user are nowowned by the replacement user. The current user is automatically removed from the

Chapter 10ASMCMD File Access Control Commands

10-116

Page 372: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

user list of the disk group. Adding the current user back to the disk group is possible but thisuser will not own any files.

When changing the ownership of an open file, the new owner cannot be dropped with theowner's files until all instances within a cluster are restarted.

The command requires the SYSASM privilege to run.

Examples

The following is an example of the rpusr command that replaces the oracle1 user with theoracle2 user in the data disk group.

Example 10-131 Using the ASMCMD rpusr command

ASMCMD [+] > rpusr data oracle1 oracle2

Chapter 10ASMCMD File Access Control Commands

10-117

Page 373: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Part IIIAdvanced Topics

Part IV contains the following chapters:

• Managing Oracle Flex ASM

• Administering Oracle ASM Filter Driver

• Creating Database Files in Oracle ASM Using SQL*Plus

Page 374: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

11Managing Oracle Flex ASM

Oracle Flex ASM enables Oracle ASM instances to run on a separate physical server fromthe database servers.

This section discusses Oracle Flex ASM in the following topics:

• Overview of Oracle Flex ASM

• About Setting Up Oracle Flex ASM

• Administering Oracle Flex ASM

See Also:

• Oracle Clusterware Administration and Deployment Guide for information aboutOracle Flex Cluster support

• Articles at My Oracle Support (https://support.oracle.com) for informationabout configuring Oracle Flex ASM with Oracle ASM and Oracle ACFS

• ASMCMD Client Cluster Management Commands for information aboutASMCMD commands to manage client clusters

• Oracle Grid Infrastructure Installation and Upgrade Guide for information aboutinstalling and upgrading Oracle Grid Infrastructure

Overview of Oracle Flex ASM

Note:

Starting with Oracle Grid Infrastructure 21c, Member Clusters, which are part of theOracle Cluster Domain architecture, are desupported. However, Domain ServicesClusters continues to support Members Clusters in releases previous to Oracle GridInfrastructure 21c.

Note:

Starting with Oracle Grid Infrastructure 21c, Domain Services Cluster (DSC), whichis part of the Oracle Cluster Domain architecture, is deprecated and can bedesupported in a future release.

11-1

Page 375: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Oracle Flex ASM enables an Oracle ASM instance to run on a separate physicalserver from the database servers. With this deployment, larger clusters of Oracle ASMinstances can support more database clients while reducing the Oracle ASM footprintfor the overall system.

When using Oracle Flex ASM, Oracle ASM clients are configured with direct access tostorage.

With Oracle Flex ASM, you can consolidate all the storage requirements into a singleset of disk groups. All these disk groups are mounted by and managed by a small setof Oracle ASM instances running in a single cluster. You can specify the number ofOracle ASM instances with a cardinality setting. The default is three instances.

A cluster is a set of nodes that provide group membership services. Each cluster has aname that is globally unique. Every cluster has one or more Hub nodes. The Hubnodes have access to Oracle ASM disks. Every cluster has at least one privatenetwork and one public network. If the cluster is going to use Oracle ASM for storage,it has at least one Oracle ASM network. A single network can be used as both aprivate and an Oracle ASM network. For security reasons, an Oracle ASM networkshould never be public. There can be only one Oracle Flex ASM configuration runningwithin a cluster.

An Oracle ASM instance can operate in several configurations in Oracle Flex ASM:

• Local Oracle ASM clients with direct access to Oracle ASM disks (Standard OracleASM cluster)

• Oracle Flex ASM clients with direct access to Oracle ASM disks

• Oracle ACFS access through the Oracle ASM proxy instance

• Network-based connectivity to Oracle ASM disk groups with Oracle IOServer(IOS)

These configurations are illustrated in Figure 11-1, Figure 11-2, and Figure 11-3.

Local Oracle ASM clients with direct access to Oracle ASM disks (StandardOracle ASM cluster)

With this mode, illustrated as Hub Node A in Figure 11-1, Oracle ASM continues tosupport existing standard architecture in which database clients are running with anOracle ASM instance on the same host computer. The local client architecture is onlysupported on a Hub node.

Chapter 11Overview of Oracle Flex ASM

11-2

Page 376: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Figure 11-1 Oracle Flex ASM Client Configurations

Oracle ASM Disk Storage

Hub Node Hub Node

Oracle ASM

Instance

Oracle ASM

Instance

Database

Instance

Hub Node

Database

Instance

A B C

In this configuration, the database instances are on the same Hub node as the Oracle ASMinstance and are referred to as local Oracle ASM client instances. Oracle ASM metadatamoves between Oracle ASM and the database instances. This client has direct I/O access toOracle ASM disks.

Local mode does not use Oracle Flex ASM, so clusters configured with local Oracle ASM donot require an Oracle ASM network, nor do they contain other Oracle Flex ASM services.

Oracle Flex ASM clients with direct access to Oracle ASM disks

With this mode, illustrated as Hub Node B in Figure 11-1, database clients that are runningon Hub nodes of the Oracle ASM cluster access Oracle ASM remotely for metadata, butperform block I/O operations directly to Oracle ASM disks. The hosts running the Oracle ASMserver and the remote database client must both be Hub nodes. A Hub node is a node in anOracle ASM cluster that is tightly connected with other servers and has direct access to ashared disk.

In this configuration, the database instances are on different host computers than the nearbyOracle ASM instance, as shown on Hub Node C in Figure 11-1, and are referred to as OracleASM client instances.

The databases are in the same Oracle ASM cluster as the Oracle ASM instance and thedatabase instances are located on a Hub node. Oracle ASM metadata moves betweenOracle ASM and the database instance. This client has direct I/O access to Oracle ASMdisks.

Chapter 11Overview of Oracle Flex ASM

11-3

Page 377: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Depending on the distribution of database instances and Oracle ASM instances, adatabase client may access Oracle ASM locally on the same node or remotely overthe Oracle ASM network. This mode of operation is used by database clients on Hubnodes in the Oracle ASM cluster. Direct access mode is also the only Oracle Flex ASMconfiguration supported by Oracle ASM cluster file system.

Oracle ACFS access through the Oracle ASM proxy instance

An Oracle ASM proxy instance is an Oracle instance running on a Hub node with adirect Oracle ASM client. An Oracle ASM proxy instance provides support for OracleAutomatic Storage Management Cluster File System (Oracle ACFS) and Oracle ASMDynamic Volume Manager (Oracle ADVM).

Figure 11-2 shows the configuration of Oracle ACFS and Oracle ADVM with an OracleASM Proxy server in Oracle Flex ASM.

Figure 11-2 Oracle ACFS and Oracle ADVM in Oracle Flex ASM Configuration

Oracle ASM Disk Storage

Hub Node

ADVM &ACFS

Hub Node

ASM ProxyASM Pr

DBInstance

ASM Proxy

ADVM &ACFS

Oracle ASM

The INSTANCE_TYPE initialization parameter is set to ASMPROXY for Oracle ASM proxyinstances.

Network-based connectivity to Oracle ASM disk groups with Oracle IOServer(IOS)

An Oracle IOServer (IOS) instance provides Oracle ASM file access for OracleDatabase instances on nodes of Oracle member clusters that do not have connectivityto Oracle ASM managed disks. For member clusters that do have connectivity toOracle ASM managed disks, IOServer could be configured as a backup in the event offailure. An Oracle IOServer instance is used only with Oracle member clusters.

Figure 11-3 shows the relationship of Oracle IOServer and an Oracle Database in amember cluster.

Chapter 11Overview of Oracle Flex ASM

11-4

Page 378: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Figure 11-3 Oracle IOServer Configuration

Oracle ASM Disk Storage

Database

Instance

Oracle

IOServer

Storage ServicesDatabase Member Cluster

In addition, IOS enables you to configure client clusters on such nodes. On the storagecluster, an IOServer instance opens up network ports to which clients send their IO. TheIOServer instance receives data packets from the client and performs the appropriate IO toOracle ASM disks similar to any other database client. On the client side, databases can usedNFS to communicate with an IOServer instance. However, there is no client sideconfiguration so you are not required to provide a server IP address or any additionalconfiguration information. On nodes and clusters that are configured to access Oracle ASMfiles through IOServer, the discovery of the Oracle IOS instance occurs automatically.

The IOS instance contains the following processes:

• Network processes: These processes open up network ports and receive dNFS requestsfrom the client side. These requests are then placed in a queue for IO and Identifierprocesses to pick up and process. Network processes also pick up responses from thoseother types of processes and send the response back to the client.

• Identifier processes: These processes pick up dNFS requests to create, delete, identify,unidentify, and resize Oracle ASM files.

• IO processes: These processes perform the actual IO on files that are identified by thelocal IOS instance.

The ASM_IO_PROCESSES initialization parameter specifies the number of IO worker processesto be started in an Oracle IO server instance. For information about the ASM_IO_PROCESSESinitialization parameter, refer to ASM_IO_PROCESSES.

Chapter 11Overview of Oracle Flex ASM

11-5

Page 379: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

About Setting Up Oracle Flex ASMTo install an Oracle Flex ASM deployment, categorize the networks and choose the listof networks for use as Oracle ASM networks.

If you choose Oracle Flex ASM during a new installation, OUI requires you to choosethe Oracle ASM networks.

The Oracle ASM listener resource is automatically created for each Oracle ASMnetwork and then started on all nodes.

See Also:

Oracle Grid Infrastructure Installation Guide for information about OracleClusterware installation

Administering Oracle Flex ASMOracle Flex ASM components are administered with ASMCA, ASMCMD CRSCTL,SQL*Plus, and SRVCTL. In addition, you can set the INSTANCE_TYPE initializationparameter to specific instance types for use with Oracle Flex ASM.

• Displaying Information About Oracle Flex ASM

• SRVCTL and CRSCTL Commands to Administer Oracle Flex ASM

• Relocating a Client With ALTER SYSTEM

• ASMCMD Commands to Manage Client Clusters

• Initialization Parameters for Oracle Flex ASM

Displaying Information About Oracle Flex ASM

You can use the ASMCMD showclustermode command to determine whether OracleFlex ASM is enabled. For example:

$ asmcmd showclustermodeASM cluster : Flex mode enabled

You can view Oracle Flex ASM connections with SQL*Plus and ASMCMD commands.Fore example:

SQL> SELECT instance_name, db_name, status FROM V$ASM_CLIENT;INSTANCE_NAME DB_NAME STATUS--------------- -------- ------------+ASM1 +ASM CONNECTEDorcl1 orcl CONNECTEDorcl2 orcl CONNECTED

$ asmcmd lsct dataDB_Name Status Software_Version Compatible_version Instance_Name Disk_Group+ASM CONNECTED 19.0.0.0.0 19.0.0.0.0 +ASM DATA

Chapter 11About Setting Up Oracle Flex ASM

11-6

Page 380: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

orcl CONNECTED 19.0.0.0.0 19.0.0.0.0 orcl1 DATAorcl CONNECTED 19.0.0.0.0 19.0.0.0.0 orcl2 DATA

SRVCTL and CRSCTL Commands to Administer Oracle Flex ASM

SRVCTL is extended to enable an administrator to create or change attributes of OracleClusterware resources. You can use SRVCTL to determine the status of the instances in anOracle Flex ASM configuration. For example:

$ srvctl status asm -detailASM is running on mynoden02,mynoden01ASM is enabled.

You can also use SRVCTL to determine whether Oracle Flex ASM is enabled. If enabled,then srvctl config asm displays the number of Oracle ASM instances that has beenspecified for use with the Oracle Flex ASM configuration. For example:

$ srvctl config asmASM instance count: 3

You can modify the Oracle ASM instance count, or cardinality, with the SRVCTL modify asmcommand. For example:

$ srvctl modify asm -count 4

$ srvctl modify asm -count ALL

Clients are automatically relocated to another instance if an Oracle ASM instance fails. Ifnecessary, clients can be manually relocated.

The SRVCTL UPDATE INSTANCE and SRVCTL UPDATE IOSERVER commands can change theOracle ASM instance for a database, or the Oracle IOServer instance for a database, or theOracle ASM instance for an Oracle IOServer. For example:

$ srvctl update instance -db my_orcl_db -instance my_instance_1 -targetinstance my_asm_instance_1

$ srvctl update ioserver -instance my_instance_2 -targetinstance my_asm_instance_2

You can run the SRVCTL STATUS commands with the -detail option to display which OracleASM instance or Oracle IOserver instance each client is connected to.

Every database user must have a wallet with credentials to connect to Oracle ASM. CRSCTLcommands can be used by the database user to manage this wallet. All Oracle ASM usernames and passwords are system generated.

You can run SRVCTL commands to manage Oracle ASM networks and listeners. Forexample, as the root user you can add an Oracle ASM network using srvctl addasmnetwork, with or without the optional network mask.

# srvctl add asmnetwork -netnum 1 -subnet nnn.nn.nn.n/255.255.255.0

# srvctl add asmnetwork -netnum 2 -subnet nnn.nn.nn.n

As the root or as CRS user, you can check the status or configure the Oracle ASM networkwith srvctl config asmnetwork.

$ srvctl config asmnetworkASM network 1 existsSubnet IPv4: nnn.nn.nn.n/255.255.255.0/Subnet IPv6:

Chapter 11Administering Oracle Flex ASM

11-7

Page 381: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Network is enabledNetwork is individually enabled on nodes:Network is individually disabled on nodes:ASM network 2 existsSubnet IPv4: nnn.nn.nn.n//Subnet IPv6:Network is enabledNetwork is individually enabled on nodes:Network is individually disabled on nodes:

As the CRS user, you can add an Oracle ASM listener with srvctl add listener Youcan use the default listener name (LISTENER_ASM) or specify a name for the listener.

$ srvctl add listener -asmlistener -netnum 1

$ srvctl add listener -asmlistener -netnum 2 -listener listener2

You can check the status of the Oracle ASM listener with srvctl config listener.

$ srvctl config listener -asmlistenerName: LISTENER2_ASMType: ASM ListenerOwner: msmithSubnet: nnn.nn.nn.nHome: <CRS home>End points: TCP:1526Listener is enabled.Listener is individually enabled on nodes:Listener is individually disabled on nodes:Name: LISTENER_ASMType: ASM ListenerOwner: msmithSubnet: nnn.nn.nn.nHome: CRS_hOMEEnd points: TCP:1525Listener is enabled.Listener is individually enabled on nodes:Listener is individually disabled on nodes:

As the root user, you can run the srvctl modify asmnetwork command with the -deptype option to specify the dependency type (mandatory or optional) for OracleASM networks. The -deptype setting enables you to determine whether or not youwant to tolerate the unavailability of any network.

• The -deptype mandatory option specifies a mandatory dependency on an OracleASM network. This means that the system does not tolerate the loss of thatnetwork. If only one of the Oracle ASM networks connects both the cluster nodesand Oracle ASM client clusters, then that network should be specified asmandatory because the Oracle ASM client clusters cannot run when that networkis not available. For example:

# srvctl modify asmnetwork -netnum 2 -deptype mandatory

• The -deptype optional option specifies an optional dependency on an OracleASM network. This means that the system can tolerate the loss of that network. Ifthere are multiple Oracle ASM networks that only connect the cluster nodes, thenyou can specify them as optional to tolerate the failure of one of the networks.For example:

# srvctl modify asmnetwork -netnum 2 -deptype optional

Chapter 11Administering Oracle Flex ASM

11-8

Page 382: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

The optional value is the default setting for -deptype.

Relocating a Client With ALTER SYSTEM

You can use the ALTER SYSTEM RELOCATE CLIENT command to relocate a client. For example:

SQL> ALTER SYSTEM RELOCATE CLIENT 'client-id';

In the previous SQL statement, client-id is of the form instance_name:db_name. TheINSTANCE_NAME and DB_NAME columns are contained in the V$ASM_CLIENT view. You mustconnect as SYSASM to the Oracle ASM instance to run the SQL statement. When you issuethis statement, the connection to the client is terminated and the client fails over to the leastloaded instance. If the client is currently connected to the least loaded instance, then theconnection to the client is terminated and the client fails over to that same instance.

ASMCMD Commands to Manage Client Clusters

You can use ASMCMD commands to administer the configuration of client clusters.

You can list client clusters with the lscc command and remove client clusters with the rmcccommand.

You create a client cluster with the mkcc command or change a client cluster with the chcccommand. For example, you can change the storage method from direct Oracle ASM toindirect Oracle ASM, or change from indirect Oracle ASM to direct Oracle ASM using theASMCMD chcc and mkcc commands.

Initialization Parameters for Oracle Flex ASM

There are no new initialization parameters specifically for instances in an Oracle Flex ASMconfiguration; however, the settings of existing parameters should be reviewed and possiblyadjusted for the Oracle Flex ASM environment.

The value of the INSTANCE_TYPE initialization parameter specifies the type of instance,including Oracle ASM proxy instances. In addition to ASM and RDBMS values, the ASMPROXYvalue identifies Oracle ASM proxy instances.

Chapter 11Administering Oracle Flex ASM

11-9

Page 383: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Recommended Settings for Oracle ASM Initialization Parameters forinformation about initialization parameters related to Oracle ASM

• ASMCMD Client Cluster Management Commands for information aboutASMCMD commands to manage client clusters

• Oracle Database Reference for more information about theINSTANCE_TYPE initialization parameter

• Oracle Database SQL Language Reference for information about theALTER SYSTEM statement

• Oracle Clusterware Administration and Deployment Guide forinformation about CRSCTL commands

• Oracle Clusterware Administration and Deployment Guide and OracleReal Application Clusters Administration and Deployment Guide forinformation about SRVCTL commands

• Oracle Grid Infrastructure Installation and Upgrade Guide for informationabout installing Oracle Clusterware

Chapter 11Administering Oracle Flex ASM

11-10

Page 384: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

12Administering Oracle ASM Filter Driver

Oracle ASM Filter Driver (Oracle ASMFD) simplifies the configuration and management ofdisk devices by eliminating the need to rebind disk devices used with Oracle ASM each timethe system is restarted.

This section contains the following topics:

• About Oracle ASM Filter Driver

• Determining Whether Oracle ASM Filter Driver Has Been Configured

• Updating the Oracle ASM Filter Driver AFD_DISKSTRING Parameter

• Updating the Oracle ASM ASM_DISKSTRING Parameter for Oracle ASM Filter DriverDisks

• Setting, Clearing, and Scanning Oracle ASM Filter Driver Labels

• Deconfiguring Oracle ASM Filter Driver

• Oracle ASM Filter Driver Commands

WARNING:

When configuring Oracle ASM, including Oracle ASMFD, do not manually modify orerase the contents of Oracle ASM disks or modify any files, including configurationfiles.

Note:

• The configuration for Oracle ASMFD can now be enabled with a check box tobe an automated process during Oracle Grid Infrastructure installation.

• If ASMLIB is installed and configured for an existing Oracle ASM installation,then you must explicitly uninstall the existing ASMLIB configuration beforeinstalling and configuring Oracle ASMFD.

• Oracle ASM Filter Driver (Oracle ASMFD) is available on Linux systems startingwith Oracle Database 12c Release 1 (12.1.0.2). Oracle ASMFD is available onSolaris systems starting with Oracle Database 12c Release 2 (12.2.0.1).

• In the steps of the procedures described in the topics of this section,the $ORACLE_HOME environmental variable is set to the directory path of theOracle Grid Infrastructure home. Commands that show # as the operatingsystem prompt must be run as the root user. Commands that show $ as theoperating system prompt should be run as the owner of Oracle GridInfrastructure home

12-1

Page 385: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Oracle Grid Infrastructure Installation and Upgrade Guide for Linux forinformation about installing and configuring Oracle ASMFD on OracleGrid Infrastructure, and deinstalling Oracle ASMLIB

• Oracle Database Installation Guide for Linux for information aboutinstalling and configuring Oracle ASMFD on Oracle Standalone Server

• My Oracle Support articles about Oracle ASMFD available at My OracleSupport (https://support.oracle.com) for additional information aboutOracle ASMFD, such as supported operating system platforms(certification matrix) or configuration issues.

• ASMCMD Oracle ASM Filter Driver Management Commands forinformation about the ASMCMD commands for administering OracleASMFD

• About ASMCMD for information about all the ASMCMD commands

• Managing Oracle ASM Filter Driver With Oracle Enterprise Manager forinformation about using Oracle Enterprise Manager to administer OracleASMFD

About Oracle ASM Filter DriverOracle ASM Filter Driver (Oracle ASMFD) is a kernel module that resides in the I/Opath of the Oracle ASM disks. Oracle ASM uses the filter driver to validate write I/Orequests to Oracle ASM disks.

Oracle ASMFD simplifies the configuration and management of disk devices byeliminating the need to rebind disk devices used with Oracle ASM each time thesystem is restarted.

Oracle ASM Filter Driver rejects any I/O requests that are invalid. This actioneliminates accidental overwrites of Oracle ASM disks that would cause corruption inthe disks and files within the disk group. For example, the Oracle ASM Filter Driverfilters out all non-Oracle I/Os which could cause accidental overwrites.

About Oracle ASMLIB and Oracle ASM Filter Driver

Starting with Oracle Grid Infrastructure 12c Release 2 (12.2), Oracle ASM Filter Driver(Oracle ASMFD) cannot be installed and configured if Oracle ASMLIB has beeninstalled on the system. If you want to install and configure Oracle ASMFD, you mustfirst uninstall Oracle ASMLIB.

See Also:

• Oracle Grid Infrastructure Installation and Upgrade Guide for Linux forinformation about installing and configuring Oracle ASMFD on OracleGrid Infrastructure, and deinstalling Oracle ASMLIB

Chapter 12About Oracle ASM Filter Driver

12-2

Page 386: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

About Partition Tables and Oracle ASM Filter Driver

Extended partition tables are not supported with Oracle ASM filter driver (ASMFD) in OracleAutomatic Storage Management 12.2 Release 1 (12.2.0.1).

Determining Whether Oracle ASM Filter Driver Has BeenConfigured

The value of the AFD_STATE parameter of SYS_ASMFD_PROPERTIES specifies whether OracleASMFD is configured for the Oracle ASM instance.

You can check the state of Oracle ASMFD with the ASMCMD afd_state command. Forexample:

$ $ORACLE_HOME/bin/asmcmd afd_stateASMCMD-9526: The AFD state is 'LOADED' and filtering is 'DEFAULT' on host 'myhost'

For information about using the ASMCMD afd_state command to determine the state ofOracle ASMFD, refer to afd_state.

To determine if Oracles ASMFD is present on the host, you can also display the value ofAFD_STATE from SYS_CONTEXT. You must run the query on the Oracle ASM instance.

If the value of AFD_STATE is equal to NOT AVAILABLE, then Oracle ASMFD is not configured.

SQL> SELECT SYS_CONTEXT('SYS_ASMFD_PROPERTIES', 'AFD_STATE') FROM DUAL;SYS_CONTEXT('SYS_ASMFD_PROPERTIES','AFD_STATE')--------------------------------------------------------------------------------NOT AVAILABLE

A value of CONFIGURED means that Oracle ASMFD is completely set up and the Oracle ASMinstance can register with the driver.

SQL> SELECT SYS_CONTEXT('SYS_ASMFD_PROPERTIES', 'AFD_STATE') FROM DUAL;SYS_CONTEXT('SYS_ASMFD_PROPERTIES','AFD_STATE')--------------------------------------------------------------------------------CONFIGURED

Updating the Oracle ASM Filter Driver AFD_DISKSTRINGParameter

The AFD_DISKSTRING parameter specifies the Oracle ASMFD disk discovery string that isused to identify the disks to be managed by Oracle ASMFD.

You can set and display the AFD_DISKSTRING parameter with the ASMCMD afd_dsset andafd_dgset commands. For example:

$ $ORACLE_HOME/bin/asmcmd afd_dsset '/dev/rdsk/mydisks/*'

$ $ORACLE_HOME/bin/asmcmd afd_dsgetAFD discovery string: /dev/rdsk/mydisks/*

You can also set the AFD_DISKSTRING with the ALTER SYSTEM SQL statement. A label iscreated in the disk header of those disks identified by the Oracle ASMFD disk discoverystring.

Chapter 12Determining Whether Oracle ASM Filter Driver Has Been Configured

12-3

Page 387: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

SQL> ALTER SYSTEM AFD_DISKSTRING SET '/dev/disk0','/dev/disk1','/devices/dsk/*';System altered.

You can retrieve the value of AFD_DISKSTRING parameter with the following query.

SQL> SELECT SYS_CONTEXT('SYS_ASMFD_PROPERTIES', 'AFD_DISKSTRING') FROM DUAL;SYS_CONTEXT('SYS_ASMFD_PROPERTIES','AFD_DISKSTRING')--------------------------------------------------------------------------------'/dev/disk0','/dev/disk1','/devices/dsk/*'

See Also:

• Updating the Oracle ASM ASM_DISKSTRING Parameter for OracleASM Filter Driver Disks for information about updating the Oracle ASMdisk discovery string

• ASM_DISKSTRING for information about the ASM_DISKSTRINGinitialization parameter

• afd_dsget for information about displaying the Oracle ASMFD diskdiscovery string

• afd_dsset for information about setting the Oracle ASMFD disk discoverystring

Updating the Oracle ASM ASM_DISKSTRING Parameterfor Oracle ASM Filter Driver Disks

You can update the Oracle ASM disk discovery string to add or remove Oracle ASMFDdisk label names to and from the ASM_DIKSTRING initialization parameter.

For example, you can add the Oracle ASMFD disks to the ASM_DIKSTRING initializationparameter as follows:

ASM_DISKSTRING = 'AFD:DISK0', 'AFD:DISK1', '/dev/rdsk/mydisks/*'

Or you can set the ASM_DIKSTRING initialization parameter as follows:

ASM_DISKSTRING = 'AFD:*', '/dev/rdsk/mydisks/*'

You can display and set the Oracle ASM disk discovery string with the ASMCMDdsget and dsset commands. For example, you can set the Oracle ASM disk discoverystring to add Oracle ASMFD disks as follows:

$ $ORACLE_HOME/bin/asmcmd dsset 'AFD:*,/dev/rdsk/mydisks/*'

You can remove previously added Oracle ASMFD disks as follows:

$ $ORACLE_HOME/bin/asmcmd dsset '/dev/rdsk/mydisks/*'

Chapter 12Updating the Oracle ASM ASM_DISKSTRING Parameter for Oracle ASM Filter Driver Disks

12-4

Page 388: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Updating the Oracle ASM Filter Driver AFD_DISKSTRING Parameter forinformation about updating the Oracle ASMFD disk discovery string

• ASM_DISKSTRING for information about the ASM_DISKSTRING initializationparameter

• afd_dsget for information about displaying the Oracle ASMFD disk discoverystring

• afd_dsset for information about setting the Oracle ASMFD disk discovery string

Setting, Clearing, and Scanning Oracle ASM Filter Driver LabelsSetting a label provisions a disk to be used by Oracle ASMFD. After the label is set, thespecified disk is managed by Oracle ASMFD.

You can add, remove, and scan labels with the ASMCMD afd_label, afd_unlabel, andafd_scan commands. For example:

$ $ORACLE_HOME/bin/asmcmd afd_label 'disk0' '/dev/rdsk/mydisks/disk0'

$ $ORACLE_HOME/bin/asmcmd afd_unlabel 'disk0'

$ $ORACLE_HOME/bin/asmcmd afd_scan '/dev/rdsk/mydisks/*'

In addition, Oracle ASM Configuration Assistant (ASMCA) provides support for adding andremoving labels on Oracle ASMFD disks.

You can also manage labels with SQL statements. You can set a label with the ALTER SYSTEMLABEL SET SQL statement. For example:

SQL> ALTER SYSTEM LABEL SET 'disk0' TO '/dev/disk0';System altered.

SQL> SELECT UPPER(path) FROM V$ASM_DISK ORDER BY PATH;UPPER(PATH)--------------------------------------------------------------------------------AFD:DISK0

When you run the statement, you can use the optional RENAME or MIGRATE option. If a diskwas previously provisioned for Oracle ASMFD, you can rename the label with the RENAMEoption. Note that the device should not be managed with Oracle ASMFD when the commandis run. If a disk was previously used for an Oracle ASM disk group and the disk group hasbeen dismounted, then you can label this disk using the MIGRATE option.

You can use ALTER SYSTEM LABEL CLEAR to remove the label from a device and stop OracleASMFD from managing the device. For example:

SQL> ALTER SYSTEM LABEL CLEAR 'disk0';System altered.

You can use ALTER SYSTEM LABEL SCAN on remote nodes after the ALTER SYSTEM LABEL SETcommand is run on the local node.

Chapter 12Setting, Clearing, and Scanning Oracle ASM Filter Driver Labels

12-5

Page 389: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Because ALTER SYSTEM LABEL SET statement writes the label on the disk header andthe disk is shared across nodes, the same statement is not run on other nodes of thecluster.

If the device-path is not specified, then the statement uses the AFD_DISKSTRINGparameter value to perform the scan operation.

SQL> ALTER SYSTEM LABEL SCAN

See Also:

• afd_label for information about adding labels on Oracle ASMFD disks

• afd_unlabel for information about removing labels on Oracle ASMFDdisks

• afd_scan for information about scanning labels on Oracle ASMFD disks

• Managing Disk Groups with ASMCA for information about using ASMCAto administer disk groups

Deconfiguring Oracle ASM Filter DriverYou can deconfigure Oracle ASM Filter Driver (Oracle ASMFD) if it has beenconfigured on your system.

This section contains the following topics:

• Deconfiguring Oracle ASM Filter Driver in an Oracle Grid InfrastructureClusterware Environment

• Deconfiguring Oracle ASM Filter Driver in an Oracle Grid InfrastructureStandalone (Oracle Restart) Environment

See Also:

• ASMCMD Oracle ASM Filter Driver Management Commands forinformation about the ASMCMD commands for administering OracleASMFD

• Oracle Clusterware Administration and Deployment Guide forinformation about using CRSCTL commands

Deconfiguring Oracle ASM Filter Driver in an Oracle Grid InfrastructureClusterware Environment

Perform the following steps to deconfigure Oracle ASM Filter Driver in an OracleClusterware environment:

1. Update the Oracle ASM disk discovery string to enable Oracle ASM to discoverdisk devices after Oracle ASMFD is deconfigured.

Chapter 12Deconfiguring Oracle ASM Filter Driver

12-6

Page 390: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

2. As the Oracle Grid Infrastructure owner list the nodes and node roles in your cluster byrunning the following command on any node:

$ $ORACLE_HOME/bin/olsnodes -a

3. On each Hub and Leaf node, do the following, either in rolling or non-rolling mode:

a. Log in as the root user and stop Oracle Grid Infrastructure:

# $ORACLE_HOME/bin/crsctl stop crs

If the command returns any error, then stop Oracle Grid Infrastructure forcibly asfollows:

# $ORACLE_HOME/bin/crsctl stop crs -f

b. As root, stop Oracle ACFS kernel modules to ensure the most reliable shutdown:

# $ORACLE_HOME/bin/acfsload stop

c. As root, deconfigure Oracle ASMFD:

# $ORACLE_HOME/bin/asmcmd afd_deconfigure

d. If the storage devices are owned by root, set the permissions required by the OracleGrid Infrastructure user to access the devices.

e. As root, start ACFS kernel modules:

# $ORACLE_HOME/bin/acfsload start

f. As root, start the Oracle Clusterware stack on the node:

# $ORACLE_HOME/bin/crsctl start crs

g. As the Oracle Grid Infrastructure owner verify the status of Oracle ASMFD:

$ $ORACLE_HOME/bin/asmcmd afd_state

4. As the Oracle Grid Infrastructure owner update the Oracle ASM discovery string toremove the Oracle ASMFD path:

$ $ORACLE_HOME/bin/asmcmd dsget

$ $ORACLE_HOME/bin/asmcmd dsset old_diskstring

Check the current value of the Oracle ASM disk discovery string before updating thevalue. The old_diskstring value is the old disk discovery string value before updatingwith the AFD: (Oracle ASMFD) paths.

Chapter 12Deconfiguring Oracle ASM Filter Driver

12-7

Page 391: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

• Updating the Oracle ASM ASM_DISKSTRING Parameter for OracleASM Filter Driver Disks for information about updating the Oracle ASMdisk discovery string

• Updating the Oracle ASM Filter Driver AFD_DISKSTRING Parameter forinformation about updating the Oracle ASM Filter Driver discovery diskdiscovery string

• Oracle Automatic Storage Management Cluster File SystemAdministrator's Guide for information about the acfsload command

• Determining Whether Oracle ASM Filter Driver Has Been Configured forinformation about checking on the state of the Oracle ASM Filter Driver

• Oracle Grid Infrastructure Installation and Upgrade Guide for MicrosoftWindows x64 (64-Bit) for information about configuring devicepersistence for Oracle ASM

Deconfiguring Oracle ASM Filter Driver in an Oracle Grid InfrastructureStandalone (Oracle Restart) Environment

Perform the following steps to deconfigure Oracle ASM Filter Driver in an Oracle GridInfrastructure standalone environment:

1. Update the Oracle ASM disk discovery string to enable Oracle ASM to discoverdisk devices after Oracle ASMFD is deconfigured.

2. Log in as the root user and stop Oracle Grid Infrastructure for a standalone serverusing the following command:

# $ORACLE_HOME/bin/crsctl stop has

If the previous command returns an error, then use the following command:

# $ORACLE_HOME/bin/crsctl stop has -f

3. As root, stop Oracle ACFS kernel modules to ensure the most reliable shutdown:

# $ORACLE_HOME/bin/acfsload stop

4. As root, deconfigure Oracle ASMFD:

# $ORACLE_HOME/bin/asmcmd afd_deconfigure

5. If the storage devices are owned by root, set the permissions required by theOracle Grid Infrastructure user to access the devices.

6. As root, start ACFS kernel modules:

# $ORACLE_HOME/bin/acfsload start

7. As root, start Oracle Grid Infrastructure for a standalone server:

# $ORACLE_HOME/bin/crsctl start has

8. As the Oracle Grid Infrastructure standalone server owner verify the OracleASMFD status:

Chapter 12Deconfiguring Oracle ASM Filter Driver

12-8

Page 392: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

$ $ORACLE_HOME/bin/asmcmd afd_state

9. As the Oracle Grid Infrastructure standalone server owner update the Oracle ASM diskdiscovery string to remove the Oracle ASMFD paths:

$ $ORACLE_HOME/bin/asmcmd dsget

$ $ORACLE_HOME/bin/asmcmd dsset old_diskstring

Check the current value of the Oracle ASM disk discovery string before updating the value.The old_diskstring value is the old disk discovery string value before updating with theAFD: (Oracle ASMFD) paths.

See Also:

• Updating the Oracle ASM ASM_DISKSTRING Parameter for Oracle ASM FilterDriver Disks for information about updating the Oracle ASM disk discoverystring

• Updating the Oracle ASM Filter Driver AFD_DISKSTRING Parameter forinformation about updating the Oracle ASM Filter Driver discovery diskdiscovery string

• Oracle Automatic Storage Management Cluster File System Administrator'sGuide for information about the acfsload command

• Determining Whether Oracle ASM Filter Driver Has Been Configured forinformation about checking on the state of the Oracle ASM Filter Driver

• Oracle Grid Infrastructure Installation and Upgrade Guide for MicrosoftWindows x64 (64-Bit) for information about configuring device persistence forOracle ASM

Oracle ASM Filter Driver CommandsThis section describes the Oracle ASM Filter Driver (ASMFD) commands that are usedduring installation to manage Oracle ASM Filter Driver. These commands are located inthe /bin directory of the Oracle Grid Infrastructure home.

• afdload

• afddriverstate

afdloadPurpose

afdload loads or unloads the Oracle ASM Filter Driver.

Syntax

afdload { start | stop } [ -s ]

Table 12-1 contains the options available with the afdload command.

Chapter 12Oracle ASM Filter Driver Commands

12-9

Page 393: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 12-1 Options for the afdload command

Option Description

start Loads the Oracle ASM Filter Driver.

stop Unloads the Oracle ASM Filter Driver.

-s Operate in silent mode.

Description

You can use afdload to manually load or unload the Oracle ASM Filter Driver.

Before unloading driver with the stop option, you must dismount disk groups and shutdown Oracle ASM.

root or administrator privilege is required to run afdload.

Examples

The following is an example of the use of afdload to stop (unload) the Oracle ASMFilter Driver.

# afdload stop

afddriverstatePurpose

afddriverstate provides information on the current state of the Oracle ASM FilterDriver.

Syntax

afddriverstate [-orahome ORACLE_HOME ] { installed | loaded | version | supported } [-s]

Table 12-2 contains the options available with the afddriverstate command.

Table 12-2 Options for the afddriverstate command

Option Description

-orahome ORACLE_HOME Specifies the Oracle Grid Infrastructure home in which the userhas permission to execute the afddriverstate command.

installed Determines whether Oracle ASM Filter Driver is installed on thesystem.

loaded Determines whether the Oracle ASM Filter Driver is loaded inmemory.

version Reports the currently installed version of the Oracle ASM FilterDriver system software.

supported Reports whether the system is a supported kernel for OracleASM Filter Driver.

Chapter 12Oracle ASM Filter Driver Commands

12-10

Page 394: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Table 12-2 (Cont.) Options for the afddriverstate command

Option Description

-s Specifies silent mode when running the command.

Description

You can use afddriverstate to display detailed information on the current state of the OracleASM Filter Driver.

Examples

The following is an example of the use of afddriverstate.

$ afddriverstate versionAFD-9325: Driver operating system kernel version = 2.6.39-400.3.0.el6uek.x86_64(x86_64).AFD-9326: Driver Oracle version = 150728.AFD-9212: Driver build version = MAIN.

Chapter 12Oracle ASM Filter Driver Commands

12-11

Page 395: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

13Creating Database Files in Oracle ASM UsingSQL*Plus

Oracle Automatic Storage Management (Oracle ASM) can be deployed using SQL*Plus.

This section contains the following topics:

• Creating a Database that Uses Oracle ASM

• Creating Tablespaces in Oracle ASM

• Creating Redo Logs in Oracle ASM

• Creating Control Files in Oracle ASM

• Creating Archive Log Files in Oracle ASM

See Also:

Oracle Database Administrator’s Guide for information about using OracleManaged Files (OMF)

Creating a Database that Uses Oracle ASMThe recommended method of creating your database is to use Database ConfigurationAssistant (DBCA). However, if you create your database manually using the CREATEDATABASE statement, then Oracle ASM enables you to create a database and all of itsunderlying files with a minimum of input.

The following example shows the use of the CREATE DATABASE statement, where databasefiles are created and managed automatically by Oracle ASM. This example creates adatabase with the following Oracle ASM files:

• A SYSTEM tablespace data file in disk group data.

• A SYSAUX tablespace data file in disk group data. The tablespace is locally managed withautomatic segment-space management.

• A multiplexed online redo log with two online log groups, one member of each in dataand fra (fast recovery area).

• If automatic undo management mode is enabled, then an undo tablespace data file indirectory data.

• If you do not specify a value for the CONTROL_FILES initialization parameter, then twocontrol files, one in data and another in fra (fast recovery area). The control file in datais the primary control file.

The following initialization parameter settings are included in the initialization parameter file:

13-1

Page 396: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

DB_CREATE_FILE_DEST = +dataDB_RECOVERY_FILE_DEST = +fraDB_RECOVERY_FILE_DEST_SIZE = 10G

The following statement can be run at the SQL prompt:

SQL> CREATE DATABASE orcl;

Creating Tablespaces in Oracle ASMWhen Oracle ASM creates a data file for a permanent tablespace (or a temporary filefor a temporary tablespace), the data file is set to auto-extensible with an unlimitedmaximum size and 100 MB default size. You can use the AUTOEXTEND clause tooverride this default extensibility and the SIZE clause to override the default size.

Oracle ASM applies attributes to the data file, as specified in the system defaulttemplate for a data file as shown in the table in "Managing Disk Group Templates". Youcan also create and specify your own template.

Files in a tablespace might be in both Oracle ASM files and non-Oracle ASM files dueto the tablespace history. RMAN commands enable non-Oracle ASM files to berelocated to an Oracle ASM disk group and enable Oracle ASM files to be relocated asnon-Oracle ASM files.

For example, if there is a disk group named data, then you can create a tablespacetblspace in that disk group with the following SQL statement:

SQL> CREATE TABLESPACE tblspace DATAFILE '+data';

The following example illustrates the usage of Oracle ASM with defaults. This exampleenables Oracle ASM to create and manage the tablespace data file for you, usingOracle supplied defaults that are adequate for most situations.

Assume the following initialization parameter setting:

DB_CREATE_FILE_DEST = +data

The following statement creates the tablespace and its data file:

SQL> CREATE TABLESPACE tblspace;

Creating Redo Logs in Oracle ASMOnline redo logs can be created in multiple disk groups, either implicitly in aninitialization parameter file or explicitly in an ALTER DATABASE...ADD LOGFILEstatement. Each online log should have one log member in multiple disk groups. Thefile names for log file members are automatically generated. All partially created redolog files, created because of a system error, are automatically deleted.

For example, if there are disk groups named data1 and data2, you can create a log filewith a member in each disk group with the following SQL statement:

SQL> ALTER DATABASE ADD LOGFILE ('+data1','+data2');

The following example creates a log file with a member in each of the disk groupsdata1 and data2. These parameter settings are included in the initialization parameterfile:

Chapter 13Creating Tablespaces in Oracle ASM

13-2

Page 397: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

DB_CREATE_ONLINE_LOG_DEST_1 = +data1DB_CREATE_ONLINE_LOG_DEST_2 = +data2

The following statement can be run at the SQL prompt:

SQL> ALTER DATABASE ADD LOGFILE;

Creating Control Files in Oracle ASMControl files can be explicitly created in multiple disk groups. The file names for control filesare automatically generated.

If you must specify a control file by name, then you can use alias file names to referenceOracle ASM files and use easy to understand names. Using aliases in the specification of acontrol file during its creation enables you to later refer to the control file with a user-specifiedname. An alias can also be specified as a control file name in the CONTROL_FILES initializationparameter.

When creating a control file, data files and log files that are stored in Oracle ASM disk groupsshould be given to the CREATE CONTROLFILE command using the file reference form of theirOracle ASM file names. However, the use of the RESETLOGS option requires the use of a filecreation form for the specification of the log files.

Example 13-1 Creating control files in Oracle ASM using NORESETLOGS

The SQL statement in the following example is generated by an ALTER DATABASE BACKUPCONTROLFILE TO TRACE command for a database with data files and log files created on diskgroups data and fra:

CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292LOGFILE GROUP 1 ( '+DATA/orcl/onlinelog/group_1.261.685366203', '+FRA/orcl/onlinelog/group_1.257.685366205' ) SIZE 50M BLOCKSIZE 512, GROUP 2 ( '+DATA/orcl/onlinelog/group_2.262.685366207', '+FRA/orcl/onlinelog/group_2.258.685366211' ) SIZE 50M BLOCKSIZE 512, GROUP 3 ( '+DATA/orcl/onlinelog/group_3.263.685366213', '+FRA/orcl/onlinelog/group_3.259.685366215' ) SIZE 50M BLOCKSIZE 512-- STANDBY LOGFILEDATAFILE '+DATA/orcl/datafile/system.256.685366089', '+DATA/orcl/datafile/sysaux.257.685366089', '+DATA/orcl/datafile/undotbs1.258.685366091', '+DATA/orcl/datafile/users.259.685366091'CHARACTER SET WE8MSWIN1252;

Chapter 13Creating Control Files in Oracle ASM

13-3

Page 398: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Example 13-2 Creating control files in Oracle ASM using RESETLOGS

The following example is a CREATE CONTROLFILE SQL statement for a database withdata files, but uses a RESETLOGS clause, which uses the creation form for log files:

CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292LOGFILE GROUP 1 ( '+DATA/orcl/onlinelog/group_1.261.685366203', '+FRA/orcl/onlinelog/group_1.257.685366205' ) SIZE 50M BLOCKSIZE 512, GROUP 2 ( '+DATA/orcl/onlinelog/group_2.262.685366207', '+FRA/orcl/onlinelog/group_2.258.685366211' ) SIZE 50M BLOCKSIZE 512, GROUP 3 ( '+DATA/orcl/onlinelog/group_3.263.685366213', '+FRA/orcl/onlinelog/group_3.259.685366215' ) SIZE 50M BLOCKSIZE 512-- STANDBY LOGFILEDATAFILE '+DATA/orcl/datafile/system.256.685366089', '+DATA/orcl/datafile/sysaux.257.685366089', '+DATA/orcl/datafile/undotbs1.258.685366091', '+DATA/orcl/datafile/users.259.685366091'CHARACTER SET WE8MSWIN1252;

Creating Archive Log Files in Oracle ASMDisk groups can be specified as archive log destinations in the LOG_ARCHIVE_DEST andLOG_ARCHIVE_DEST_n initialization parameters. When destinations are specified in thismanner, the archive log file names are created in default subdirectories with uniquenames. However, all LOG_ARCHIVE_DEST_n parameters must have a unique string. Toenter the same disk group more than once, subdirectories must be used. For example,you can set LOG_ARCHIVE_DEST_n as follows:

LOG_ARCHIVE_DEST_1 = 'LOCATION=+FRA/orcl/arc_1'LOG_ARCHIVE_DEST_2 = 'LOCATION=+FRA/orcl/arc_2'...

If LOG_ARCHIVE_DEST is set to a disk group name, LOG_ARCHIVE_FORMAT is ignored.Unique filenames for archived logs are automatically created by Oracle Databaseunder default subdirectories. If LOG_ARCHIVE_DEST is set to a directory in a disk group,LOG_ARCHIVE_FORMAT has its normal semantics for the file alias. The underlying file isstill generated in the default directories for the disk group with a system generatedname.

You can also set the DB_RECOVERY_FILE_DEST initialization parameter to a disk groupdestination. In Example 13-3, archive log files are generated with ARCHIVELOG modeenabled, DB_RECOVERY_FILE_DEST set to the +FRA disk group, and ORCL is the value ofthe DB_UNIQUE_NAME parameter.

Chapter 13Creating Archive Log Files in Oracle ASM

13-4

Page 399: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

See Also:

Oracle Database Administrator's Guide for information about managing archivedredo log files

Example 13-3 Archived log files in an Oracle ASM disk group

SQL> SHOW PARAMETER DB_RECOVERY_FILE_DEST

NAME TYPE VALUE------------------------------------ ----------- ------------------------------db_recovery_file_dest string +FRA

SQL> SELECT SUBSTR(name,1,64) name FROM V$ARCHIVED_LOG; NAME----------------------------------------------------------------+FRA/ORCL/ARCHIVELOG/2013_06_24/thread_1_seq_112.260.818960623+FRA/ORCL/ARCHIVELOG/2013_06_24/thread_1_seq_113.261.818978423+FRA/ORCL/ARCHIVELOG/2013_06_25/thread_1_seq_114.262.818993031+FRA/ORCL/ARCHIVELOG/2013_06_25/thread_1_seq_115.263.819032439+FRA/ORCL/ARCHIVELOG/2013_06_25/thread_1_seq_116.264.819047121+FRA/ORCL/ARCHIVELOG/2013_06_25/thread_1_seq_117.265.819064815+FRA/ORCL/ARCHIVELOG/2013_06_26/thread_1_seq_118.266.819079417...

Chapter 13Creating Archive Log Files in Oracle ASM

13-5

Page 400: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Glossary

ASMLIBASMLIB is an application programming interface (API) developed by Oracle to simplify theoperating system–to-database interface and to exploit the capabilities of vendors' storagearrays on Linux-based systems. Oracle ASM Filter Driver is the recommended replacementfor ASMLIB.

Cluster File System (CFS)A Cluster File System, or CFS, is a file system that is distributed across multiple computersystems. Generally, the computer systems share access to a disk connected through a Storage Area Network (SAN). The CFS component on each individual computer systemcoordinates access to the disks using a global communication mechanism.

Cluster Synchronization Services (CSS)Cluster Synchronization Services (CSS) provide the foundation for coordinated, inter-processcommunication activities across a set of nodes. CSS services include group services, lockservices, node information and cluster configuration services, and node monitoring servicesthat detect nodes joining and leaving the cluster.

CSS ClusterA CSS cluster is the cluster configuration defined by the CSS cluster membership services.CSS maintains the authoritative membership for an Oracle cluster and monitors nodes joiningand leaving the cluster configuration. There is at most one CSS cluster defined for a given setof nodes.

disk groupAn Oracle ASM disk group is a collection of disks that Oracle ASM manages as a unit. Withina disk group, Oracle ASM exposes a file system interface for Oracle Database files. Thecontent of files that are stored in a disk group are evenly distributed, or striped, to eliminatehot spots and to provide uniform performance across the disks. Oracle ASM files may also beoptionally mirrored within a disk group. The performance of disks in a disk group iscomparable to the performance of raw devices.

Glossary-1

Page 401: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Direct Attached Storage (DAS)Direct Attached Storage, or DAS, consists of storage devices that attach directly tohost without an intervening network. DAS generally costs less than SAN attachedstorage, but also offers less flexibility and functionality. Examples of DAS include SATAdisks, common to most desktop systems, and SCSI disks that are found on manyservers.

extentAn extent, also called data extent, is the raw storage used to hold the contents of afile. Each extent consists of one or more allocation units (AU) on a specific disk.

extent mapAn extent map is a list of extent pointers that point to all the data extents of a file. Thisis the raw storage for the file. Each extent pointer gives the disk and allocation unit ofthe data extent. For reliability, each extent pointer also includes a check byte to ensureit has not been damaged. This is particularly important when using an in-memory copyof the extent map to direct file I/O to a particular disk location.

fibre channelFibre channel is a set of standards that define the interface between computersystems and peripherals. The fibre channel interface is a serial bus interface originallydesigned to supersede the SCSI standard. However, both the fibre channel and SCSIinterfaces have evolved independently of each other and have benefited from theexistence of the other. Fibre is spelled with re rather than an er to indicate a distinctionfrom terms such as fiber optics. Both copper and optical fiber are commonly used as amedia for fibre channel.

file systemA file system is a software component providing structured access to disks. Filesystems present objects, such as files, to application programs. Access to files isgenerally specified with standard API defining operating system calls such as Open/Close and Read/Write that the application program uses for accessing files. Filesystems are usually provided as a component of an operating system, but may beprovided as an independent software component.

fileA file is an object presented to an application program by a file system. A file issubdivided into blocks by the file system. A file system typically places what appearsto the application program as consecutive blocks, into nonconsecutive locations ondisks. The mapping of the file blocks to the locations on disks is kept in what is knownas an extent map.

Glossary

Glossary-2

Page 402: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

host bus adapter (HBA)A host bus adapter (HBA), or host adapter, connects a host system to other network andstorage devices, such as, eSATA, and SCSI devices.

Logical Unit Number (LUN)In storage technology, the term LUN is often used to denote a disk presented to a computersystem by a storage array. In SCSI terminology, a Logical Unit Number, or LUN, is a numberrepresenting a device address presented to a computer system.

mirroringIn storage systems, mirroring is a means for protecting the integrity of data by storing copiesof data on multiple disks. If a disk fails, then a secondary copy of the data is available on asecond or third disk. Generally, mirroring can be deployed in one of two ways. In the mostcommon case, as with a RAID storage array, a fixed amount of physical storage space on asingle disk is uniformly copied on multiple disks. Through software on the storage array, thephysically mirrored space on multiple devices is presented to the host as a single disk.Another approach to mirroring is to copy fixed segments of a file onto multiple disks. OracleASM uses the second approach for maximum flexibility.

Network Attached Storage (NAS)Network Attached Storage, or NAS, comprises a class of systems providing file services tohost computers. A device driver in the operating system accesses data using protocols suchas NFS or Common Internet File System (CIFS). From the application program's point ofview, Network Attached Storage appears as a file system local to the host computer on whichthe application program resides.

Network File System (NFS)A network file system, or NFS, is an industry standard providing Network Attached Storageon many platforms. NFS extends the local file system framework to provide device sharing tousers on an IP network. The user view of an NFS is that a remote file system on a hostappears as if it were locally mounted.

Oracle Automatic Storage Management ClusterAn Oracle Automatic Storage Management (Oracle ASM) cluster is a collection ofinterconnected nodes, each with an Oracle ASM instance, operating as a unified clusterusing Oracle Clusterware. An Oracle ASM cluster presents a shared pool of storage to one ormore Oracle Databases that are also operating on the nodes. The databases can also beclustered using Oracle Real Application Clusters, but that is not a requirement. The disks thatprovide the shared storage pool must be accessible from all of the nodes in the Oracle ASMcluster.

Glossary

Glossary-3

Page 403: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

partitionOperating systems typically provide a means for splitting a disk into sections calledpartitions. To an application, a partition appears as an independent disk, even thoughthat is not the case. The operating system provides a command for managing the sizeand locations of partitions on a disk. This command writes a partition map onto thedisk in an area that is not visible to the application program.

Redundant Array of Inexpensive Disks (RAID)Redundant Array of Inexpensive Disks, or RAID, is a means for combining multipledisks through software and presenting them to a host as a collection of apparentlydistinct disks. Mirroring and striping are two means used for combining the disks as acollection. RAID can be implemented as a software component of a computer systemor as software operating inside of a storage array. RAID operates on the physicalpresentation of storage as opposed to Oracle ASM mirroring and striping at the logicalfile level.

Storage Area Network (SAN)Storage Area Network, or SAN, is a specialized network designed for attachingstorage devices, such as disk arrays and tape drives, to computer systems. The mostcommon network infrastructure used in SANs is fibre channel. SANs provide greatflexibility by allowing a common interconnect infrastructure in which any storage devicecan be connected to any computer system. Zoning and LUN masking are commonlyused for access control for SANs. Zoning is a mechanism where the SANinfrastructure determines the access rights of storage devices to computer systems.LUN masking is a mechanism where the storage device determines the access rightsof what computer systems are permitted to connect to the device.

Small Computer System Interface (SCSI)Small Computer System Interface, or SCSI, is a standard defining the interfacebetween computer systems and peripherals, most commonly storage devices. TheSCSI standard defines both the logical and physical aspects of the interface betweencomputer systems and peripherals.

stripingIn storage systems, striping is a means for spreading data across multiple disks asopposed to storing the data on a single disk. Striping is usually done to improveperformance. Generally, striping can be deployed in one of two ways. In the mostcommon case, as with a RAID storage array, a fixed amount of physical storage spacethat could have been stored on a single disk is uniformly striped across multiple disks.Through software on the storage array, the physically striped space on multipledevices is presented to the host as a single disk. Another approach to striping is to

Glossary

Glossary-4

Page 404: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

stripe fixed segments of a file across multiple disks connected to the host. Oracle ASM usesthe second approach for maximum performance.

volumeIn the storage realm, the meaning of volume has many related definitions. Volumes are oftenthought of as the virtual entity represented as a Logical Unit Number (LUN). Volumes oftenare presented as an aggregation of pieces from several disks. A volume is managed by asoftware component called a volume manager.

volume managerA volume manager is a software component that manages the mapping of the collection ofthe pieces of the disks into a volume.

Glossary

Glossary-5

Page 405: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Index

Aaccess control

disk groups, 4-61ACCESS_CONTROL.ENABLED disk group

attribute, 4-3, 4-63ACCESS_CONTROL.UMASK disk group

attribute, 4-3, 4-63ACFS

See Oracle Automatic Storage ManagementCluster File System

acfsloadOracle ASM Filter Driver command, 12-9

active session history samplingOracle Automatic Storage Management, 3-26

adding aliasesOracle ASM, 5-14

adding disksdisk groups, 4-21

adding disks to a disk group, 1-15adding disks to a disk group with Oracle

Enterprise Manager, 7-6adding disks to an Oracle ASM disk group

Oracle ASM Configuration Assistant, 9-10adding templates to a disk group, 5-22administering

disk groups, 4-1afd_configure command

ASMCMD utility, 10-47afd_deconfigure command

ASMCMD utility, 10-48afd_di command

ASMCMD utility, 10-48afd_dsget command

ASMCMD utility, 10-49afd_dsset command

ASMCMD utility, 10-49afd_filter command

ASMCMD utility, 10-50afd_label command

ASMCMD utility, 10-50afd_loglevelget command

ASMCMD utility, 10-51afd_loglevelset command

ASMCMD utility, 10-52

afd_lsdsk commandASMCMD utility, 10-52

afd_lslbl commandASMCMD utility, 10-53

afd_refresh commandASMCMD utility, 10-53

afd_scan commandASMCMD utility, 10-54

afd_state commandASMCMD utility, 10-55

afd_unlabel commandASMCMD utility, 10-55

afddriverstateOracle ASM Filter Driver command, 12-10

alias file namesOracle ASM, 5-6

aliasesadding for an Oracle ASM file name, 5-14dropping from a disk group, 5-15

allocation unitsOracle ASM, 1-10size for disk groups, 4-3

ALTER DISKGROUP command, 4-20altering disk groups

replacing disks, 4-23amdu_extract command

ASMCMD utility, 10-56archive log files

creating in Oracle ASM, 13-4ASM

See Oracle Automatic Storage ManagementASM_DISKGROUPS initialization parameter

Oracle ASM instance, 3-9ASM_DISKSTRING initialization parameter

discovering disks, 1-15Oracle ASM instance, 3-10

ASM_IO_PROCESSES initialization parameterOracle IOServer, 3-11

ASM_POWER_LIMIT initialization parameterOracle ASM instance, 3-12rebalancing process, 3-12

ASM_PREFERRED_READ_FAILURE_GROUPSinitialization parameter

Oracle ASM instance, 3-13asmadmin group, 3-31

Index-1

Page 406: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

ASMCASee Oracle ASM Configuration Assistant

ASMCMD utilityabout, 10-12afd_configure command, 10-47afd_deconfigure command, 10-48afd_di command, 10-48afd_dsget command, 10-49afd_dsset command, 10-49afd_filter command, 10-50afd_label command, 10-50afd_loglevelget command, 10-51afd_loglevelset command, 10-52afd_lsdsk command, 10-52afd_lslbl command, 10-53afd_refresh command, 10-53afd_scan command, 10-54afd_state command, 10-55afd_unlabel command, 10-55aliases, and, 10-14amdu_extract command, 10-56audcleanaudittrail command, 10-2audclearproperty command, 10-3audcleartimestamp command, 10-4audcreatejob command, 10-5auddropjob command, 10-5audit files management commands, 10-1audsetdebug command, 10-6audsetjobinterval command, 10-7audsetjobstatus command, 10-7audsetproperty command, 10-8audsettimestamp command, 10-9audshowtimestamp command, 10-9cd command, 10-57chcc command, 10-42chdg command, 10-68chfg command, 10-95chgrp command, 10-107chkdg command, 10-71chmod command, 10-108chown command, 10-109chqg command, 10-96chtmpl command, 10-104client cluster management commands, 10-41command-line utility, 10-1cp command, 10-58directories, and, 10-13disk group management commands, 10-68displaying the version number, 10-20dropdg command, 10-72dsget command, 10-23dsset command, 10-24du command, 10-60exit command, 10-19file access control commands, 10-107

ASMCMD utility (continued)file group commands, 10-95file management commands, 10-56find command, 10-60groups command, 10-110grpmod command, 10-111help command, 10-22including directory in prompt, 10-20instance management commands, 10-22iostat command, 10-73ls command, 10-61lsattr command, 10-75lsaudcleanupjobs command, 10-10lsaudconfigparams command, 10-11lscc command, 10-43lsct command, 10-25lsdg command, 10-76lsdsk command, 10-78lsfg command, 10-97lsgrp command, 10-112lsod command, 10-80lsof command, 10-63lsop command, 10-26lspwusr command, 10-27lsqg command, 10-98lstmpl command, 10-104lsusr command, 10-112md_backup command, 10-81md_restore command, 10-83mkalias command, 10-64mkcc command, 10-44mkdg command, 10-85mkdir command, 10-65mkfg command, 10-99mkgrp command, 10-113mkqg command, 10-101mktmpl command, 10-105mkusr command, 10-114mount command, 10-87mvfg command, 10-101mvfile command, 10-102offline command, 10-87online command, 10-88Oracle ASM Filter Driver management

commands, 10-46orapwusr command, 10-27passwd command, 10-114preparing to run, 10-17pwcopy command, 10-28pwcreate command, 10-29pwd command, 10-65pwdelete command, 10-30pwget command, 10-31pwmove command, 10-31pwset command, 10-32

Index

Index-2

Page 407: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

ASMCMD utility (continued)rebal command, 10-89remap command, 10-90rm command, 10-66rmalias command, 10-67rmcc command, 10-45rmfg command, 10-102rmgrp command, 10-115rmqg command, 10-103rmtmpl command, 10-106rmusr command, 10-115rpusr command, 10-116running in a database home, 10-17running in an Oracle grid infrastructure home,

10-17running in interactive mode, 10-18running in noninteractive mode, 10-20running without any options, 10-19setattr command, 10-92setsparseparent command, 10-91showclustermode command, 10-33showclusterstate command, 10-33showpatches command, 10-34showversion command, 10-34shutdown command, 10-35spbackup command, 10-36spcopy command, 10-37specifying the verbose mode, 10-20spget command, 10-39spmove command, 10-39spset command, 10-40stamp command, 10-92stamplist command, 10-93startup command, 10-40syntax for starting in interactive mode, 10-18SYSASM privilege, 10-19system-generated file names, and, 10-13template management commands, 10-103type of connection, 10-19types of commands, 10-12umount command, 10-94using quotes for wildcards in noninteractive

mode, 10-20using with absolute and relative paths, 10-15using with wildcard characters, 10-16

asmdba group, 3-31asmoper group, 3-31ASMSNMP user

for monitoring the Oracle ASM instance, 3-30Oracle ASM, 9-2Oracle ASM in Oracle Enterprise Manager,

7-3attributes

disk group compatibility, 4-51disk groups, 4-2

attributes (continued)DISK_REPAIR_TIME, 4-43for disk groups, 4-13in templates for Oracle Automatic Storage

Management, 5-21list of for disk groups, 4-2setting for disk groups, 4-2viewing for disk groups, 4-2

AU_SIZE disk group attribute, 1-10, 4-3, 4-13different sizes enabled by compatibility

attributes, 4-57audcleanaudittrail command

ASMCMD utility, 10-2audclearproperty command

ASMCMD utility, 10-3audcleartimestamp command

ASMCMD utility, 10-4audcreatejob command

ASMCMD utility, 10-5auddropjob command

ASMCMD utility, 10-5audsetdebug command

ASMCMD utility, 10-6audsetjobinterval command

ASMCMD utility, 10-7audsetjobstatus command

ASMCMD utility, 10-7audsetproperty command

ASMCMD utility, 10-8audsettimestamp command

ASMCMD utility, 10-9audshowtimestamp command

ASMCMD utility, 10-9authentication

operating system with Oracle ASM, 3-34Oracle ASM, 3-29password file with Oracle ASM, 3-35

Bbacking up Oracle ASM files

Oracle Enterprise Manager, 7-22bad block recovery in Oracle ASM disks

Oracle Enterprise Manager, 7-23

Ccapacity

managing in disk groups, 4-36cd command

ASMCMD utility, 10-57CELL.SMART_SCAN_CAPABLE disk group

attribute, 4-3CELL.SPARSE_DG disk group attribute, 4-4

Index

Index-3

Page 408: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

chcc commandASMCMD utility, 10-42

chdg commandASMCMD utility, 10-68

checking Oracle ASM disk group integrityOracle Enterprise Manager, 7-22

chfg commandASMCMD utility, 10-95

chgrp commandASMCMD utility, 10-107

chkdg commandASMCMD utility, 10-71

chmod commandASMCMD utility, 10-108

chown commandASMCMD utility, 10-109

chqg commandASMCMD utility, 10-96

chtmpl commandASMCMD utility, 10-104

client cluster management commandsASMCMD utility, 10-41Oracle ASM remote instances, 10-41

commandsOracle ASM Filter Driver command, 12-9

compatibilitydisk groups, 4-51, 7-5Oracle ASM and database instances, 3-1reverting disk groups to previous settings,

4-56COMPATIBLE

database initialization parameter, 4-51COMPATIBLE.ADVM disk group attribute, 4-4,

4-13, 4-51default value, 4-51

COMPATIBLE.ASM disk group attribute, 4-4,4-13, 4-51

default value, 4-51COMPATIBLE.RDBMS disk group attribute, 4-4,

4-13, 4-51default value, 4-51

componentsOracle ASM, 1-5

conceptsOracle ASM, 1-1

configuration pageOracle ASM on Oracle Enterprise Manager,

7-2configuring an Oracle ASM instance

Oracle ASM Configuration Assistant, 9-6Oracle Enterprise Manager, 7-2

configuring parameters for an Oracle ASMinstance

Oracle ASM Configuration Assistant, 9-8

CONTENT_HARDCHECK.CHECK disk groupattribute, 4-6

CONTENT.CHECK disk group attribute, 4-4CONTENT.TYPE disk group attribute, 4-5control file

creating in Oracle ASM, 13-3cp command

ASMCMD utility, 10-58createFileGroups, 9-11createQuotaGroups, 9-12creating a database using Oracle ASM, 13-1creating a new directory

Oracle ASM, 5-16creating an Oracle ASM disk group

Oracle ASM Configuration Assistant, 9-8creating database files in Oracle ASM, 13-1creating disk groups, 4-11creating disk groups and adding disks, 4-11creating disk groups and attributes, 4-11creating disk groups and failure group types, 4-11creating disk groups and failure groups, 4-11creating disk groups and redundancy level, 4-11creating disk groups in a new installation, 4-15creating files in the database

Oracle ASM, 5-9creating files using a default file location

Oracle ASM, 5-9

Ddata files

moving between disk groups, 5-11data files with alias names

Oracle ASM, 5-7DB_CACHE_SIZE initialization parameter

Oracle ASM instance, 3-14diagnostic directory

Oracle ASM instance, 3-15DIAGNOSTIC_DEST initialization parameter

Oracle ASM instance, 3-15directories

creating disk group, 5-16dropping disk group, 5-17managing disk group, 5-16Oracle ASM, 5-16renaming disk group, 5-17

disk discoveryabout, 4-33improving time, 4-35in Oracle ASM, 4-33Oracle ASM, 1-15rules, 4-34

disk failuresin Oracle Automatic Storage Management,

4-41

Index

Index-4

Page 409: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

disk group compatibilityconfiguring with Oracle Enterprise Manager,

7-13considerations about file sizes, 4-59considerations in a replicated environments,

4-59considerations when setting, 4-59Oracle ASM features enabled by settings,

4-57setting, 4-53setting in Oracle Enterprise Manager, 7-5setting with ALTER DISKGROUP, 4-55setting with CREATE DISKGROUP, 4-55valid combinations, 4-53viewing compatibility settings, 4-56

disk group management commandsASMCMD utility, 10-68

disk group propertiesconfiguring with Oracle Enterprise Manager,

7-13disk group repair time

configuring with Oracle Enterprise Manager,7-14

disk group smart scan compatibilityconfiguring with Oracle Enterprise Manager,

7-14disk groups, 3-23

about sharing a password file in, 3-36access control, 4-61ACCESS_CONTROL.ENABLED attribute,

4-63ACCESS_CONTROL.UMASK attribute, 4-63adding disks, 4-21adding disks to with Oracle ASM

Configuration Assistant, 9-10adding disks to with Oracle Enterprise

Manager, 7-6adding templates to, 5-22administering, 4-1allocation unit size, 4-3altering membership of, 4-20attributes, 4-2, 4-13backing up and restoring a password file in,

3-38checking internal consistency, 4-68compatibility, 4-51compatibility attributes, 4-51converting to flex disk groups, 4-72creating, 4-11creating a password file in, 3-37creating and adding disks, 4-11creating and attributes, 4-11creating and failure group types, 4-11creating and failure groups, 4-11creating and redundancy level, 4-11

disk groups (continued)creating for a new installation, 4-15creating Oracle Enterprise Manager, 7-5creating with Oracle ASM Configuration

Assistant, 9-8creating with SQL*Plus, 4-11determining the number of, 4-48directories, 5-16discovering disks, 4-33dismounting, 1-15dismounting with Oracle Enterprise Manager,

7-12dropping, 4-69dropping disks from, 4-25dropping disks with Oracle Enterprise

Manager, 7-9dropping in Oracle Enterprise Manager, 7-11failure groups, 4-38, 4-40flex disk groups, 4-72list of attributes, 4-2logical sector size, 4-16managing a shared password file, 3-35managing capacity in, 4-36manually rebalancing, 4-27migrating to flex disk groups, 4-72mirroring, 4-38monitoring disk space usage in Oracle

Enterprise Manager, 7-12mounting, 1-15mounting and dismounting, 4-66mounting at startup, 3-23mounting with force, 4-67mounting with Oracle Enterprise Manager,

7-12moving data files between, 5-11names, 4-11Oracle ASM, 1-8Oracle Cluster Registry (OCR), and, 4-19performance and scalability, 4-48performance characteristics when grouping

disks, 4-49preferred read, 3-13quorum failure groups, 4-19rebalancing, 1-16redundancy, 4-38renamedg, 4-70renaming, 4-70renaming disks, 4-24replacing disks, 4-23resizing disks in, 4-26reverting compatibility, 4-56scrubbing, 4-31sector size, 4-16setting attributes, 4-2storage limits, 4-49

Index

Index-5

Page 410: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

disk groups (continued)tracking the replication status, 4-7undropping disks in, 4-27validations for logical sector size, 4-16validations for sector size, 4-16viewing attributes, 4-2voting files, and, 4-19when to use external, normal, or high

redundancy, 4-42disk partitions

storage resources, 2-1DISK_REPAIR_TIME disk group attribute, 4-6

fast disk resync, 4-43disks

adding to a disk group, 1-15discovering, 1-15, 4-33dropping from a disk group, 1-15Oracle ASM, 1-10

dismounting disk groups, 1-15driver commands

afddriverstate, 12-10afdload, 12-9Oracle ASM Filter Driver, 12-9

dropdg commandASMCMD utility, 10-72

dropFileGroups, 9-12dropping a directory

Oracle ASM, 5-17dropping aliases

Oracle ASM, 5-15dropping aliases from a disk group, 5-15dropping disk groups, 4-69dropping disks from a disk group, 1-15, 4-25dropping disks from disk groups in Oracle

Enterprise Manager, 7-9dropping files from a disk group

Oracle ASM, 5-15dropping Oracle ASM templates, 5-23dropQuotaGroups, 9-12dsget command

ASMCMD utility, 10-23dsset command

ASMCMD utility, 10-24du command

ASMCMD utility, 10-60dynamic views

Oracle ASM, 6-1

EeditDiskGroupAttributes, 9-10Enterprise Manager

See Oracle Enterprise ManagerEnterprise Manager Cloud Control

See Oracle Enterprise Manager

exit commandASMCMD utility, 10-19

extentsOracle ASM, 1-10, 1-11variable size, 1-10, 1-11, 4-36

FFAILGROUP_REPAIR_TIME disk group attribute,

4-6fast disk resync, 4-43

failure groupsabout, 4-40disk failures, 4-41guidelines, 4-41how many to create, 4-42minimum recommended, 4-40mirroring, 4-38mirroring, and, 4-38Oracle ASM, 1-9preferred read, 4-46quorum type, 4-19simultaneous failure, 4-42when to use external, normal, or high

redundancy, 4-42fast mirror resync, 4-43

managing with Oracle Enterprise Manager,7-8, 7-9

file access controlenabling with Oracle Enterprise Manager,

7-14managing with SQL statements, 4-64Oracle Automatic Storage Management, 4-61restricting access to files, 4-61setting up for files in a disk group, 4-61setting with SQL statements, 4-63

file management commandsASMCMD utility, 10-56

file namesOracle ASM, 5-3Oracle Automatic Storage Management, 5-3

file names in SQL statementsOracle ASM, 5-10

file names with template formOracle ASM, 5-7

file templatesunderstanding, 1-14

file types supportedOracle ASM, 5-1

filesOracle ASM, 1-11templates, 1-14

filter driverOracle ASM, 12-2

Index

Index-6

Page 411: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

find commandASMCMD utility, 10-60

flex disk groupsOracle ASM, 4-72

fully qualified file namesOracle ASM, 5-4

Ggrid plug and play (GPnP)

retrieving the location of an ASM SPFILE,10-39

setting the location of the ASM SPFILE,10-40

groupsOSASM, 3-29, 3-33–3-35

groups commandASMCMD utility, 10-110

grpmod commandASMCMD utility, 10-111

Hhelp command

ASMCMD utility, 10-22

IIDP.BOUNDARY disk group attribute, 4-7IDP.TYPE disk group attribute, 4-7incomplete file name template form

Oracle ASM, 5-8initialization parameter files

backing up, copying, and moving, 3-4creating an SPFILE in a disk group, 3-5Oracle ASM, 3-3search order for Oracle ASM, 3-3

initialization parametersCOMPATIBLE, 4-51database for use with Oracle ASM instance,

3-18Oracle ASM instance, 3-8Oracle Automatic Storage Management, 3-2setting for Oracle ASM instance, 3-7

instance management commandsASMCMD utility, 10-22

INSTANCE_TYPE initialization parameterOracle ASM instance, 3-15

instancesOracle ASM, 1-5

iostat commandASMCMD utility, 10-73

LLARGE_POOL_SIZE initialization parameter

Oracle ASM instance, 3-16logical sector size

disk groups, 4-16validations for disk groups, 4-16

logical unit numberstorage resources, 2-1

logical volumesstorage resources, 2-1

LOGICAL_SECTOR_SIZE disk group attribute,4-7

ls commandASMCMD utility, 10-61

lsattr commandASMCMD utility, 10-75

lsaudcleanupjobs commandASMCMD utility, 10-10

lsaudconfigparams commandASMCMD utility, 10-11

lscc commandASMCMD utility, 10-43

lsct commandASMCMD utility, 10-25

lsdg commandASMCMD utility, 10-76

lsdsk commandASMCMD utility, 10-78

lsfg commandASMCMD utility, 10-97

lsgrp commandASMCMD utility, 10-112

lsod commandASMCMD utility, 10-80

lsof commandASMCMD utility, 10-63

lsop commandASMCMD utility, 10-26

lspwusr commandASMCMD utility, 10-27

lsqg commandASMCMD utility, 10-98

lstmpl commandASMCMD utility, 10-104

lsusr commandASMCMD utility, 10-112

Mmanaging aliases

Oracle ASM, 5-14managing capacity in disk groups, 4-36managing file access control

Oracle Enterprise Manager, 7-18

Index

Index-7

Page 412: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

managing file access control for disk groupsOracle Enterprise Manager, 7-18

managing Oracle ASM filesOracle Enterprise Manager, 7-18

managing Oracle ASM templatesOracle Enterprise Manager, 7-19

managing Oracle ASM templates pageOracle Enterprise Manager, 7-19

managing templatesOracle Automatic Storage Management, 5-20

managing usersOracle ASM in Oracle Enterprise Manager,

7-3md_backup command

ASMCMD utility, 10-81md_restore command

ASMCMD utility, 10-83memory management

Oracle Automatic Storage Management, 3-7migrating a database

to Oracle ASM, 3-39migrating data

Oracle ASM with Recovery Manager, 8-1migrating data to alternative storage

Oracle ASM, 8-9migrating data to Oracle ASM

with Recovery Manager, 8-6migrating to Oracle ASM

Oracle Enterprise Manager, 7-23mirror

fast resync, 4-43, 7-8, 7-9mirroring

failure groups, 4-38failure groups, and, 4-38Oracle ASM, 1-9with failure groups, 1-9

mkalias commandASMCMD utility, 10-64

mkcc commandASMCMD utility, 10-44

mkdg commandASMCMD utility, 10-85

mkdir commandASMCMD utility, 10-65

mkfg commandASMCMD utility, 10-99

mkgrp commandASMCMD utility, 10-113

mkqg commandASMCMD utility, 10-101

mktmpl commandASMCMD utility, 10-105

mkusr commandASMCMD utility, 10-114

monitoring Oracle ASM performanceOracle Enterprise Manager, 7-21

monitoring Oracle Flex ASMOracle Enterprise Manager, 7-25

mount commandASMCMD utility, 10-87

mounting and dismounting disk groups, 4-66mounting disk groups, 1-15

using force, 4-67moving data between disk groups

Oracle ASM, 8-9multipathing

with Oracle ASM, 2-3multiple file creation form

Oracle ASM, 5-4mvfg command

ASMCMD utility, 10-101mvfile command

ASMCMD utility, 10-102

Nnaming

disk groups, 4-11network file systems

storage resources, 2-1NOWAIT keyword

in REBALANCE clause, 4-20

Ooffline command

ASMCMD utility, 10-87online command

ASMCMD utility, 10-88open files

and chgrp command, 10-108and chmod command, 10-109and chown command, 10-110

operating system authenticationfor Oracle Automatic Storage Management,

3-34Oracle ASM, 3-34SYSASM, 3-34

Oracle ACFSSee Oracle Automatic Storage ManagementCluster File System

Oracle ADVM volumesmanaging, 4-32

Oracle ASM, 1-1instance administration, 3-18

See also Oracle Automatic StorageManagement

Oracle ASM audit files commandsASMCMD utility, 10-1

Index

Index-8

Page 413: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Oracle ASM Configuration Assistant, 9-1about, 9-1addDisk command, 9-10commands to manage Oracle ASM, 9-6configureASM command, 9-6configureParameter command, 9-8configuring disk groups, 9-3createDiskGroup command, 9-8creating an Oracle ASM instance, 9-2creating disk groups, 9-3running in command-line mode, 9-5running in silent mode, 9-5starting, 9-1updating Oracle ASM instance parameters,

9-2Oracle ASM directories

administering, 5-1Oracle ASM Extended Disk Groups, 4-83Oracle ASM file access control commands

ASMCMD utility, 10-107Oracle ASM file group commands

ASMCMD utility, 10-95Oracle ASM File Groups, 4-72, 4-74

properties, 4-77quota groups, 4-82

Oracle ASM filesadministering, 5-1

Oracle ASM Filter Driverabout, 12-2and extended partition tables, 12-2and Oracle ASMLIB, 12-2deconfiguring, 12-6determining the state, 12-3managed by Oracle Enterprise Manager,

7-19managing labels, 12-5overview, 12-1updating AFD_DISKSTRING, 12-3updating ASM_DISKSTRING, 12-4

Oracle ASM Filter Driver managementcommands

ASMCMD utility, 10-46Oracle ASM flex disk groups

point-in-time database clones, 4-85Oracle ASM Flex Disk Groups, 4-72

about, 4-72Oracle ASM instances

administration, 3-18Oracle ASM performance

Oracle Enterprise Manager, 7-21Oracle ASM preferred read

failure groups, 4-46Oracle ASM proxy instance

Oracle ACFS and Oracle ADVM, 11-1Oracle ASM Quota Groups, 4-72

Oracle ASM templatesadministering, 5-1

Oracle Automatic Storage Management, 1-1accessing files with the XML DB virtual folder,

5-17active session history sampling, 3-26adding aliases, 5-14administering, 3-1administering Oracle Flex ASM, 11-6advanced topics, 1alias file names, 5-6aliases, 5-14and Oracle Enterprise Manager, 7-1ASM_POWER_LIMIT initialization parameter,

3-12ASM_PREFERRED_READ_FAILURE_GROUPS

initialization parameter, 3-13ASMSNMP, 9-2ASMSNMP user in Oracle Enterprise Manager,

7-3authentication, 3-29backing up initialization parameter files, 3-4command-line utility, 10-1components, 1-5concepts, 1-1configuring initialization parameters, 3-2connecting to an instance, 3-20copying initialization parameter files, 3-4creating a database example, 13-1creating a database in, 13-1creating a new directory, 5-16creating archive log files in, 13-4creating control file example, 13-3creating control file in, 13-3creating database files in, 13-1creating files in the database, 5-9creating files using a default file location, 5-9creating redo logs in, 13-2creating SPFILE in a disk group, 3-5creating tablespaces in, 13-2data files with alias names, 5-7database initialization parameters, 3-18DB_CACHE_SIZE initialization parameter, 3-14diagnostic directory, 3-15DIAGNOSTIC_DEST initialization parameter,

3-15directories, 5-16discovering disks, 1-15, 4-33disk discovery, 4-33disk discovery string, 1-15disk failures in, 4-41disk groups, 1-8disk partitions for storage resources, 2-1disks, 1-10dropping a directory, 5-17

Index

Index-9

Page 414: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Oracle Automatic Storage Management (continued)dropping aliases, 5-15dropping files, 5-15extents, 1-11failure groups, 4-40failure groups recommendations, 4-40file access control, 4-61file names, 5-3file names with template form, 5-7file templates, 1-14file types supported, 5-1files, 1-11fully qualified file names, 5-4home page on Oracle Enterprise Manager, 7-1incomplete file name form

Oracle ASM, 5-8incomplete file name template form, 5-8initialization parameter files, 3-3initialization parameters, 3-8INSTANCE_TYPE initialization parameter, 3-15instances, 1-5LARGE_POOL_SIZE initialization parameter,

3-16logical volumes for storage resources, 2-1LUNs for storage resources, 2-1managing aliases, 5-14memory management, 3-7migrating a database to, 3-39migrating data, 8-1, 8-3migrating data to, 8-6migrating data to alternative storage, 8-9mirroring and failure groups, 1-9moving data between disk groups, 8-9moving initialization parameter files, 3-4multipathing, 2-3multiple file creation form, 5-4network file systems for storage resources, 2-1one operating system group for all privileges,

3-31operating system authentication for, 3-34Oracle Database file mapping, 5-11Oracle Flex ASM, 11-1Oracle IOServer, 11-1ORACLE_HOME, 3-20ORACLE_SID, 3-20overview, 1-3password file authentication for, 3-35preparing storage resources, 2-1privileges, 3-30PROCESSES initialization parameter, 3-16recommendations for storage preparation, 2-4Recovery Manager, and, 8-1, 8-3referencing files in the database, 5-9REMOTE_LOGIN_PASSWORDFILE initialization

parameter, 3-17

Oracle Automatic Storage Management (continued)renaming a directory, 5-17renaming aliases, 5-15rolling patches, 3-28rolling upgrades, 3-27search order for initialization parameter files, 3-3separate operating system groups for privileges,

3-31setting initialization parameters, 3-7setting up Oracle Flex ASM, 11-6SHARED_POOL_SIZE initialization parameter,

3-17shutting down an instance, 3-23shutting down an instance with OCR or voting

files in a disk group, 3-23shutting down an instance with Oracle ACFS,

3-23single file creation form, 5-4starting up an instance, 3-20starting up an instance with incorrect SPFILE

path, 3-22storage considerations, 2-1storage limits, 4-49storage resources, 2-1striping, 1-12types of ASMCMD commands, 10-12users page in Oracle Enterprise Manager, 7-3using file names in SQL statements, 5-10views, 6-1XML DB virtual folder, 5-17

Oracle Automatic Storage Management ClusterFile System, 1-5

Oracle ASM proxy instance, 11-1overview, 1-5restrictions for storage resource, 2-1

Oracle Cluster Registry (OCR)in disk groups, 4-19

Oracle Database file mappingwith Oracle ASM, 5-11

Oracle Enterprise Manager, 7-1accessing the Oracle ASM home page, 7-1adding disks to a disk group, 7-6and Oracle ASM, 7-1backing up Oracle ASM files, 7-22bad block recovery in Oracle ASM disks,

7-23checking Oracle ASM disk group integrity,

7-22creating disk groups, 7-5disk group compatibility, 7-13disk group file access control, 7-14disk group properties, 7-13disk group repair time, 7-14disk group smart scan compatibility, 7-14dismounting disk groups, 7-12

Index

Index-10

Page 415: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

Oracle Enterprise Manager (continued)dropping disk groups, 7-11dropping disks from disk groups, 7-9managing fast mirror resync, 7-8managing file access control for disk groups,

7-18managing Oracle ASM files, 7-18managing Oracle ASM Filter Driver, 7-19managing Oracle ASM templates, 7-19migrating to Oracle ASM, 7-23monitoring Oracle ASM disk group space

usage, 7-12monitoring Oracle Flex ASM, 7-25mounting disk groups, 7-12Oracle ASM configuration page, 7-2Oracle ASM performance page, 7-21Oracle ASM users page, 7-3setting disk group compatibility, 7-5support workbench for Oracle ASM, 7-25

Oracle Flex ASMadministering, 11-6database clients, 11-1direct Oracle ASM clients, 11-1INSTANCE_TYPE initialization parameter,

11-1local Oracle ASM clients, 11-1managing, 11-1multiple Oracle ASM instances, 11-1Oracle ASM proxy instance, 11-1overview, 11-1relocating clients, 11-6setting up, 11-6

Oracle Grid Infrastructure for a standaloneserver, 3-19

with Oracle ASM, 3-19Oracle Grid Infrastructure for independent

servers, 3-19Oracle Restart, 3-19

See also Oracle Grid Infrastructure for astandalone server

Oracle Home user on Windowslower privileged user, 3-26

Oracle IOServerASM_IO_PROCESSES initialization

parameter, 3-11Oracle Flex ASM, 11-1

Oracle RestartSee Oracle Grid Infrastructure for a standaloneserver

ORACLE_HOMEOracle ASM, 3-20

ORACLE_SIDOracle ASM, 3-20

orapwusr commandASMCMD utility, 10-27

OSASM group, 3-29, 3-31, 3-33–3-35OSDBA group, 3-31OSOPER group, 3-31overview

Oracle ACFS, 1-5Oracle ASM, 1-3

Ppasswd command

ASMCMD utility, 10-114password file

backing up and restoring in a disk group,3-38

creating in a disk group, 3-37password file authentication

for Oracle Automatic Storage Management,3-35

Oracle ASM, 3-35PHYS_META_REPLICATED disk group attribute,

4-7point-in-time database clones

and flex disk groups, 4-85preferred read

failure groups, 4-46preferred read failure groups, 3-13, 4-46

administering, 4-46PREFERRED_READ.ENABLED disk group

attribute, 4-8privileges

ASMCMD utility, 10-19for one operating system group, 3-31Oracle ASM, 3-30separate operating system groups, 3-31SYSASM, 3-32, 3-33, 3-35SYSASM and Oracle Enterprise Manager,

7-1, 7-3SYSASM in Oracle Enterprise Manager, 7-5,

7-6SYSDBA with Oracle ASM, 3-33

PROCESSES initialization parameterOracle ASM instance, 3-16

pwcopy commandASMCMD utility, 10-28

pwcreate commandASMCMD utility, 10-29

pwd commandASMCMD utility, 10-65

pwdelete commandASMCMD utility, 10-30

pwget commandASMCMD utility, 10-31

pwmove commandASMCMD utility, 10-31

Index

Index-11

Page 416: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

pwset commandASMCMD utility, 10-32

Qquorum failure group, 4-19

Rread errors

recovery, 4-42rebal command

ASMCMD utility, 10-89rebalance

and CONTENT.CHECK disk group attribute,4-29

and THIN_PROVISIONED disk groupattribute, 4-29

REBALANCE NOWAIT clause, 4-20REBALANCE WAIT clause, 4-20rebalancing

BALANCE phase, 4-27COMPACT phase, 4-27disk groups, 1-16, 4-27phases of operation, 4-27PREPARE phase, 4-27RESTORE phase, 4-27RESYNC, RESILVER, and REBUILD

operations, 4-27rebalancing disk groups

tuning, 4-29rebalancing process

ASM_POWER_LIMIT initializationparameter, 3-12

recommendations for storage preparationfor Oracle ASM, 2-4

recoveryread errors, 4-42write errors, 4-43

redo logscreating in Oracle ASM, 13-2

redundancydisk groups, 4-38

referencing files in the databaseOracle ASM, 5-9

remap commandASMCMD utility, 10-90

remote instancesASMCMD client cluster management

commands, 10-41REMOTE_LOGIN_PASSWORDFILE initialization

parameterOracle ASM instance, 3-17

renamedg toolrenaming disk groups, 4-70

renamedg tool (continued)updating resources, 4-71

renaming a directoryOracle ASM, 5-17

renaming aliasesOracle ASM, 5-15

renaming disk groups, 4-70renamedg and updating resources, 4-71

renaming disks in a disk group, 4-24replacing disks

altering disk groups, 4-23replacing disks in a disk group, 4-23replicated environments

disk group compatibility considerations, 4-59resizing disks in disk groups, 4-26restricting at startup, 3-23resync

fast mirror, 4-43, 7-8, 7-9reverting compatibility settings

disk groups, 4-56rm command

ASMCMD utility, 10-66rmalias command

ASMCMD utility, 10-67rmcc command

ASMCMD utility, 10-45rmfg command

ASMCMD utility, 10-102rmgrp command

ASMCMD utility, 10-115rmqg command

ASMCMD utility, 10-103rmtmpl command

ASMCMD utility, 10-106rmusr command

ASMCMD utility, 10-115rolling patches

Oracle ASM, 3-28rolling upgrades

Oracle Automatic Storage Management, 3-27rpusr command

ASMCMD utility, 10-116running

ASMCMD utility, 10-17ASMCMD utility in a database home, 10-17ASMCMD utility in an Oracle grid

infrastructure, 10-17

SSCRUB_ASYNC_LIMIT disk group attribute, 4-8scrubbing disk groups, 4-31sector size

disk groups, 4-16validations for disk groups, 4-16

Index

Index-12

Page 417: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

SECTOR_SIZE disk group attribute, 4-9setattr command

ASMCMD utility, 10-92setsparseparent command

ASMCMD utility, 10-91shared password file

for Oracle ASM instance, 3-35, 3-36for Oracle Database instance, 3-36in a disk group, 3-36managing in a disk group, 3-35

SHARED_POOL_SIZE initialization parameterOracle ASM instance, 3-17

showclustermode commandASMCMD utility, 10-33

showclusterstate commandASMCMD utility, 10-33

showpatches commandASMCMD utility, 10-34

showversion commandASMCMD utility, 10-34

shutdown commandASMCMD utility, 10-35

shutting down an Oracle ASM instanceabout, 3-23with OCR or voting files in a disk group, 3-23with Oracle ACFS file system mounted, 3-23

single file creation formOracle ASM, 5-4

spbackup commandASMCMD utility, 10-36backing up an Oracle ASM SPFILE, 10-36

spcopy commandASMCMD utility, 10-37copying an Oracle ASM SPFILE, 10-37

spget commandASMCMD utility, 10-39retrieving the location of an ASM SPFILE,

10-39spmove command

ASMCMD utility, 10-39moving an Oracle ASM SPFILE, 10-39

spset commandASMCMD utility, 10-40setting the location of an ASM SPFILE, 10-40

stamp commandASMCMD utility, 10-92

stamplist commandASMCMD utility, 10-93

standalone serversGrid Infrastructure for a standalone server,

3-19starting up an Oracle ASM instance

about, 3-20with incorrect SPFILE path, 3-22

startupmounting disk groups, 3-23restricting disk groups, 3-23

startup commandASMCMD utility, 10-40

storage considerationsfor Oracle ASM, 2-1

storage limitsdisk groups, 4-49Oracle ASM disks, 4-49Oracle Automatic Storage Management, 4-49

storage resourcesdisk partitions and Oracle ASM, 2-1for Oracle ASM, 2-1logical volumes and Oracle ASM, 2-1LUNs and Oracle ASM, 2-1network file systems and Oracle ASM, 2-1preparation for Oracle ASM, 2-1restrictions for Oracle ACFS, 2-1

STORAGE.TYPE disk group attribute, 4-9striping

files, 1-12Oracle ASM, 1-12

support for allocation unitsdifferent sizes enabled by compatibility

attributes, 4-57support for altering sector size

enabled by compatibility attributes, 4-58support for appliance mode for Oracle Data

Appliance (ODA)enabled by compatibility attributes, 4-58

support for appliance mode for Oracle Exadata(no fixed partnering)

enabled by compatibility attributes, 4-58support for ASM SPFILE in a disk group

enabled by compatibility attributes, 4-58support for ASM_POWER_LIMIT initialization

parametervalues enabled by compatibility attributes,

4-58support for content type of a disk group

enabled by compatibility attributes, 4-58support for converting normal or high redundancy

disk groups to flex disk groups withoutrestricted mount

enabled by compatibility attributes, 4-59support for double parity redundancy in flex disk

groupsenabled by compatibility attributes, 4-59

support for Exadata storageenabled by compatibility attributes, 4-57

support for extentsvariable size, 4-57

support for fast mirror resyncenabled by compatibility attributes, 4-57

Index

Index-13

Page 418: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

support for file access controlenabled by compatibility attributes, 4-58

support for fixed partnering for Oracle Exadataenabled by compatibility attributes, 4-58

support for greater than 2 TB Oracle ASM disksenabled by compatibility attributes, 4-58

support for LOGICAL_SECTOR_SIZEenabled by compatibility attributes, 4-58

support for managing a shared password file in adisk group

enabled by compatibility attributes, 4-58support for OCR in disk groups

enabled by compatibility attributes, 4-57support for Oracle ASM flex and extended disk

groupsenabled by compatibility attributes, 4-58

support for Oracle ASM flex group multitenantcloning

enabled by compatibility attributes, 4-59support for Oracle Exadata sparse disk groups

enabled by compatibility attributes, 4-58support for PREFERRED_READ.ENABLED

enabled by compatibility attributes, 4-59support for replication status of a disk group

enabled by compatibility attributes, 4-58support for resync checkpoint

enabled by compatibility attributes, 4-58support for SCRUB_ASYNC_LIMIT

enabled by compatibility attributes, 4-59support for sector size

enabled by compatibility attributes, 4-58support for single parity redundancy in flex disk

groupsenabled by compatibility attributes, 4-59

support for storage conversion for memberclusters

enabled by compatibility attributes, 4-59support for V$ASM_ATTRIBUTE view

enabled by compatibility attributes, 4-57support for Virtual Allocation Metadata (VAM) on

non-sparse normal and high redundancydisk groups

enabled by compatibility attributes, 4-59support workbench for Oracle ASM

Oracle Enterprise Manager, 7-25SYSASM privilege, 3-32, 3-33, 3-35

accessing the Oracle ASM home page inOracle Enterprise Manager, 7-1

Oracle Enterprise Manager, 7-3, 7-5, 7-6SYSDBA privilege with Oracle ASM, 3-33

Ttablespaces

creating in Oracle ASM, 13-2

template management commandsASMCMD utility, 10-103

templatesadding to a disk group, 5-22attributes, 5-21dropping, 5-23for specifying redundancy and striping, 5-23managing Oracle ASM, 5-20modifying an Oracle ASM, 5-23Oracle ASM, 1-14user-defined for Oracle ASM, 5-23

THIN_PROVISIONED disk group attribute, 4-10tracking the replication status

for disk groups, 4-7tuning rebalance operations, 4-29

Uumount command

ASMCMD utility, 10-94undropping disks in disk groups, 4-27

VV$ASM_ALIAS view, 6-1V$ASM_ATTRIBUTE view, 4-56, 6-1V$ASM_AUDIT_CLEANUP_JOBS view, 6-2V$ASM_AUDIT_CONFIG_PARAMS view, 6-2V$ASM_AUDIT_LAST_ARCH_TS view, 6-2V$ASM_CLIENT view, 6-2V$ASM_DBCLONE_INFO view, 6-2V$ASM_DISK view, 6-2V$ASM_DISK_IOSTAT view, 6-2V$ASM_DISK_STAT view, 6-2V$ASM_DISKGROUP view, 4-56, 6-2V$ASM_DISKGROUP_STAT view, 6-2V$ASM_ESTIMATE view, 6-2V$ASM_FILE view, 6-2V$ASM_FILEGROUP view, 6-2V$ASM_FILEGROUP_FILE view, 6-2V$ASM_FILEGROUP_PROPERTY view, 6-3V$ASM_OPERATION view, 6-3V$ASM_QUOTAGROUP view, 6-3V$ASM_TEMPLATE view, 6-3V$ASM_USER view, 6-3V$ASM_USERGROUP view, 6-3V$ASM_USERGROUP_MEMBER view, 6-3VAM_MIGRATION_DONE disk group attribute,

4-10variable size extents, 1-10, 1-11, 4-36

enabled by compatibility attributes, 4-57views

displaying Oracle ASM information, 6-1voting files in disk groups, 4-19

enabled by compatibility attributes, 4-57

Index

Index-14

Page 419: Management Oracle® Automatic Storage Administrator's Guide...Oracle ASM and Multipathing 2-3 Recommendations for Storage Preparation 2-4 Storage Device Path and Permission Persistence

WWAIT keyword

in REBALANCE clause, 4-20wildcard characters

using quotes in ASMCMD commands, 10-20write errors

recovery, 4-43

XXML DB

virtual folder for Oracle ASM, 5-17

Index

Index-15