05.09.2013 Views

Automatic Storage Management - Midwest Oracle Users Group

Automatic Storage Management - Midwest Oracle Users Group

Automatic Storage Management - Midwest Oracle Users Group

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Automatic</strong> <strong>Storage</strong><br />

<strong>Management</strong><br />

(ASM)


Speaker Introduction<br />

Michael Messina<br />

Senior Managing Consultant Rolta, TUSC Infrastructure<br />

Services<br />

Working with <strong>Oracle</strong> Approximately 17 years<br />

Background includes Performance Tuning, High Availability<br />

and Disaster Recovery<br />

<strong>Oracle</strong> Database OCP<br />

<strong>Oracle</strong> ACE<br />

Mike.Messina@roltasolutions.com<br />

www.tusc.com / www.roltasolutions.com


Contents<br />

<strong>Automatic</strong> <strong>Storage</strong> <strong>Management</strong> (ASM)<br />

Overview<br />

ASM Structure / Components<br />

Benefits of ASM<br />

Any Issues?<br />

Infrastructure<br />

<strong>Storage</strong> Options<br />

Redundancy<br />

External, Normal, High<br />

Multiple Paths to <strong>Storage</strong><br />

Database <strong>Storage</strong><br />

File <strong>Storage</strong> (ASM Clustered File System)


Contents<br />

Volume <strong>Management</strong><br />

Comparison to other Volume Managers<br />

Use with Other Volume Managers<br />

How ASM can replace other Logical Volume Managers<br />

ASM in a High Availability Environment<br />

Fail <strong>Group</strong>s<br />

Real Application Clusters (RAC) Database<br />

DataGuard<br />

Prepare Volumes for ASM<br />

Requirements<br />

ASMLib for Linux<br />

Create disks for ASM


Contents<br />

Installing ASM<br />

Software and OS Requirements for <strong>Oracle</strong> Enterprise Linux<br />

Installation Basics<br />

ASM Command Line Utility<br />

What is the ASM Command Line Utility<br />

ASMCMD Commands


Contents<br />

Working with ASM Disk <strong>Group</strong>s<br />

Discovering Disks<br />

Mounting/Un-mounting Disk <strong>Group</strong>s<br />

Create ASM Disk <strong>Group</strong>s<br />

Add Disk/Space to ASM Disk <strong>Group</strong><br />

Remove Disk/Space from ASM Disk <strong>Group</strong><br />

Change ASM Disk <strong>Group</strong> Compatibility<br />

Rename Disk <strong>Group</strong><br />

Managing ASM File Access Control for Disk <strong>Group</strong>s<br />

Drop ASM Disk <strong>Group</strong>


Contents<br />

ASM Cluster File System<br />

Overview<br />

<strong>Oracle</strong> ACFS Driver Model<br />

<strong>Oracle</strong> ACFS Mount Model and Namespace<br />

<strong>Oracle</strong> ACFS Mount Registry<br />

<strong>Oracle</strong> ACFS Snapshots<br />

<strong>Oracle</strong> ACFS and Backup and Restore<br />

<strong>Oracle</strong> ACFS Integration with ASM<br />

Loading ACFS Drivers / Modules<br />

Create/Manage ACFS File System


AUTOMATIC STORAGE<br />

MANAGEMENT (ASM)


Overview<br />

A Volume Manager for Databases<br />

A File System for Databases<br />

11gR2 a File System<br />

11gR2 a Cluster File System


ASM Structure / Components<br />

ASM Instance<br />

ASM Disk <strong>Group</strong>s<br />

ASM Disks<br />

ASM Files<br />

Control files<br />

Data files, temporary data files, and data file copies<br />

SPFILEs<br />

Online redo logs, archive logs, and Flashback logs<br />

RMAN backups<br />

Disaster recovery configurations<br />

Change tracking bitmaps<br />

Data Pump dumpsets


ASM Structure / Components<br />

September 12 / Slide 11 / Title of Document


Benefits of ASM<br />

Dynamically Add and Remove Disk/Space while database is running<br />

Works with <strong>Oracle</strong> Managed Files (OMF)<br />

ASM can coexist with other storage types<br />

ASM Can Improve I/O Performance<br />

When in a Cluster ASM Supports Rolling Upgrades<br />

ASM Reduces <strong>Management</strong> and Administrative Overhead<br />

ASM can support storage for multiple Databases and Database Versions<br />

Flexible Redundancy Options<br />

<strong>Oracle</strong> Enterprise Manager Integration<br />

September 12 / Slide 12 / Title of Document


Any Issues?<br />

ASM Requires additional Home location for single instance<br />

implementations, meaning additional space for install is required.<br />

For Normal or High Redundancy Disk <strong>Group</strong>s the disk for the failgroup(s)<br />

are required when the disk group is created.<br />

RMAN is required to backup databases using ASM.<br />

ASM does not provide any power management features, all power<br />

management features are controlled outside the ASM technology stack.<br />

September 12 / Slide 13 / Title of Document


INFRASTRUCTURE<br />

September 12 / Slide 14 / Title of Document


<strong>Storage</strong> Options<br />

ASM works with virtually any storage type<br />

Direct Attached <strong>Storage</strong><br />

Network Attached <strong>Storage</strong><br />

<strong>Storage</strong> Area Networks<br />

Solid State Disk<br />

<strong>Storage</strong> regardless of the type is presented to the server as<br />

a RAW device(s)<br />

Operating System on the Server Controls disk use<br />

September 12 / Slide 15 / Title of Document


Redundancy<br />

External<br />

Disk hardware controls the Redundancy<br />

Normal<br />

1 disk mirror or failgroup<br />

High<br />

2 disk mirrors or failgroups<br />

September 12 / Slide 16 / Title of Document


Redundancy<br />

Multipathing<br />

provide failover by using redundant physical paths between server<br />

and the storage subsystem.<br />

If one or more components fails, then applications can still access<br />

data on the storage<br />

Multipathing used with <strong>Storage</strong> Area Network (SAN), Host<br />

Bus Adapter, interface cable, or host port on a multiported<br />

storage array.<br />

September 12 / Slide 17 / Title of Document


Database <strong>Storage</strong><br />

Disks assigned to ASM Disk <strong>Group</strong>s<br />

ASM Instance manages database storage to disk groups<br />

Database datafiles, tempfiles, controlfiles, spfiles and redo<br />

logs stored in ASM Disk <strong>Group</strong>s<br />

Database can store files in one or more Disk <strong>Group</strong>s<br />

September 12 / Slide 18 / Title of Document


File <strong>Storage</strong> (ASM Clustered File System)<br />

ASM Clustered File System (ACFS)<br />

11gR2 added the capability for ASM to act as a file system for<br />

all operating system files with ACFS<br />

Can act as a local filesystem or a cluster filesystem<br />

Works natively at the OS layer to act just like any other<br />

filesystem<br />

ASM Creation Assistant can be used to create ACFS<br />

filesystems<br />

ASM command line utility can be used to create and manage<br />

ACFS file systems (asmcmd)<br />

September 12 / Slide 19 / Title of Document


VOLUME MANAGEMENT<br />

September 12 / Slide 20 / Title of Document


Comparison to other Volume Managers<br />

ASM Requires RMAN for Database Backups while other<br />

volume managers will allow non-RMAN backups.<br />

ASM is being taught with all <strong>Oracle</strong> Database Training and it<br />

<strong>Oracle</strong>’s Direction for the future. Other volume managers<br />

may require additional training to utilize effectively.<br />

ASM Cluster File System adds capability to utilize ASM as a<br />

regular native OS filesystem.<br />

ASM is a no-cost cluster file system option, 3 rd party volume<br />

managers require additional license purchase and support<br />

costs.<br />

ASM typically provides better performance


Use with Other Volume Managers<br />

ASM co-exists with other cluster file system or native OS file<br />

systems.<br />

Mix database and non-database files on different filesystems<br />

Use ASM for Database files and non-database files<br />

Use OCFS2, Veritas, ext3, etc. database and non database files<br />

Use ASM, OCFS2, Veritas, etc. for database and non-database files<br />

Move database and non-database files between different<br />

filesystems including ASM.


How ASM can replace other Logical Volume Managers<br />

11gR2 adds ASM Cluster File System expanding the capability<br />

of ASM to be used as a native OS filesystem.<br />

Create ASM file systems/volumes for databases<br />

Create ACFS file systems which use ASM for storage for nondatabase<br />

files.<br />

ACFS provides full volume management for virtually all file<br />

types.<br />

ASM with ACFS however can not replace the native OS<br />

volume manager for root and boot volumes and ASM/ACFS<br />

was not designed to support root or boot volumes for the<br />

operating system but to supplement and add additional<br />

capabilities


ASM IN A HIGH AVAILABILITY<br />

ENVIRONMENT


Fail <strong>Group</strong>s<br />

Fail<strong>Group</strong>s are utilized in NORMAL and HIGH Redundancy<br />

Disk <strong>Group</strong>s.<br />

Fail<strong>Group</strong>s provide Disk <strong>Group</strong> storage protection using<br />

mirrors within Disk <strong>Group</strong>s<br />

Fail<strong>Group</strong>s can be located on multiple storage systems<br />

protecting against storage system failure<br />

Failgroups can be located at a separate site based on<br />

network and latency conditions.


Real Application Clusters (RAC) Database<br />

ASM was designed to provide a Highly Available Clustered<br />

<strong>Storage</strong> for Real Application Clusters<br />

Provide highest availability for RAC<br />

External storage Redundancy using RAID 10, RAID 5, RAID 6 to<br />

protect against individual disk failures<br />

ASM Fail<strong>Group</strong>s to protect against <strong>Storage</strong> System Failures, storage<br />

systems can be located at separate sites depending on network<br />

capability and latency.<br />

Multiple Nodes in cluster provide protection against node<br />

failure.


DataGuard<br />

Data Guard Provides for long distance cross site failover<br />

Uses ASM effectively<br />

ASM can simplify the building and maintaining Data Guard<br />

Standby database<br />

RAC capable standbys from RAC primary or single instance<br />

standby from RAC primary.<br />

Closes the maximum availability and scalability gap that RAC<br />

and ASM alone can not provide.


PREPARE VOLUMES FOR ASM


Requirements<br />

For Linux ASMLib utility is not required, however<br />

recommended and considered best practice. ** Not support<br />

in Red Hat 6 for ASMLib going forward based on most<br />

recent information<br />

For Linux ASMLib should be installed and configured<br />

RAW volumes presented to the host/operating System<br />

RAW volumes partitioned<br />

Permissions and ownership of volumes for oracle and dba or<br />

ASM Admin group<br />

Make permissions and ownership of volumes persistent<br />

across host restarts


ASMLib for Linux<br />

Check Installation<br />

rpm –qa | grep oracleasm<br />

Install ASMLib<br />

http://www.oracle.com/technology/software/tech/linux/asmlib/rhel5.html<br />

rpm -i oracleasm-support-2.1.3-1.el5.i386.rpm<br />

rpm -i oracleasm-2.6.18-128.1.6.el5-2.0.5-1.el5.i686.rpm<br />

rpm -i oracleasmlib-2.0.4-1.el5.i386.rpm<br />

rpm -i oracleasm-2.6.18-128.1.6.el5debug-2.0.5-1.el5.i686.rpm<br />

rpm -i oracleasm-2.6.18-128.1.6.el5-debuginfo-2.0.5-1.el5.i686.rpm<br />

rpm -i oracleasm-2.6.18-128.1.6.el5PAE-2.0.5-1.el5.i686.rpm<br />

rpm -i oracleasm-2.6.18-128.1.6.el5xen-2.0.5-1.el5.i686.rpm<br />

Configure ASMLib<br />

/etc/init.d/oracleasm configure


Create disks for ASM<br />

Partition RAW volumes to be used for ASM<br />

fdisk /dev/sda<br />

Change <strong>Group</strong> at min and permissions on volume and<br />

partition<br />

chmod 660 /dev/sda<br />

chmod 660 /dev/sda1<br />

chown oracle:dba /dev/sda<br />

chown oracle:dba /dev/sda1<br />

Place <strong>Group</strong> and permission changes in /etc/rc.d/rc.local<br />

Initialize partitions on devices into ASM Disks<br />

/etc/init.d/oracleasm createdisk ASMDSK1 /dev/sda1


INSTALLING ASM


Software and OS Requirements for <strong>Oracle</strong> Enterprise<br />

Linux<br />

OS Requirements Enterprise Linux<br />

At least 1GB of free available memory on server<br />

At least 1.8GB of free swap<br />

<strong>Oracle</strong> user<br />

<strong>Oracle</strong> dba group<br />

Ensure the following exist in the /etc/security/limits.conf<br />

* hard nproc 16384<br />

* hard nofile 65536<br />

Ensure that the limits are configured to set for new sessions by<br />

ensuring the following are in the /etc/pam.d/system-auth file.<br />

session required pam_limits.so<br />

session required pam_unix.so<br />

September 12 / Slide 33 / Title of Document


Software and OS Requirements for <strong>Oracle</strong> Enterprise<br />

Linux<br />

Ensure that the following are included in the .bash_profile for the<br />

oracle user<br />

ulimit -n 65536<br />

ulimit -u 16384<br />

Ensure oracle primary group dba<br />

$ usermod –g dba oracle<br />

set the following in the /etc/sysctl.conf<br />

kernel.msgmnb = 65536<br />

kernel.msgmax = 65536<br />

kernel.shmmax = 4294967295<br />

kernel.shmall = 268435456<br />

kernel.sem=250 32000 100 128<br />

net.ipv4.ip_local_port_range = 1024 65000 < 11gR1<br />

net.ipv4.ip_local_port_range = 9000 65500 >= 11gR2<br />

net.core.rmem_default=4194304<br />

net.core.wmem_default=262144<br />

net.core.rmem_max=4194304<br />

net.core.wmem_max=1048576<br />

fs.file-max = 6815744<br />

fs.aio-max-nr = 1048576<br />

September 12 / Slide 34 / Title of Document


Software and OS Requirements for <strong>Oracle</strong> Enterprise<br />

Linux<br />

CD3<br />

rpm -Uvh libaio-0<br />

rpm -Uvh libaio-devel-0.3.105-2.i386.rpm<br />

CD4<br />

rpm -Uvh elfutils-libelf-0<br />

rpm -Uvh elfutils-libelf-devel-0.91.1-3.i386.rpm<br />

CD1<br />

rpm -Uvh unixODBC-2.2.11-1.RHEL4.1.i386.rpm<br />

September 12 / Slide 35 / Title of Document


Installation Basics<br />

Ensure OS compatibility for the ASM version to be installed<br />

Ensure all OS pre-reqs are satisfied<br />

For ASM the latest ASM version is recommended to be used<br />

even for lower versions of the database software<br />

Obtain the latest ASM Software currently 11.2 and is included<br />

in the Grid Infrastructure Software Installation<br />

The <strong>Oracle</strong> Universal Installer greatly simplifies the<br />

installation process for the Database and Grid Infrastructure<br />

software.


ASM COMMAND LINE UTILITY


What is the ASM Command Line Utility<br />

Command line interface for management of ASM disk<br />

groups and ACFS volumes<br />

Run from Grid Infrastructure home<br />

/bin/asmcmd


ASMCMD Commands<br />

Instance <strong>Management</strong><br />

iostat Displays statistics for mounted devices.<br />

lsct Lists information about current ASM clients.<br />

lsop Lists the current operations on a disk group, database, or<br />

ASM instance.<br />

lspwusr List the users from an <strong>Oracle</strong> PWFILE file.<br />

orapwusr Add, drop, or change an <strong>Oracle</strong> PWFILE user.<br />

shutdown Shuts down an ASM instance.<br />

spcopy Copies a SPFILE.<br />

startup Starts up an ASM instance.


ASMCMD Commands<br />

File Access<br />

chgrp Changes the group of a file.<br />

chmod Changes permissions of a file.<br />

chown Changes the owner of a file.<br />

groups List the user groups that a user belongs to.<br />

grpmod Adds or removes users from an existing user group.<br />

lsgrp Lists ASM access control list (ACL) groups.<br />

lsusr Lists users in a disk group.<br />

mkgrp Creates a new user group.<br />

mkusr Adds a user to disk group.<br />

passwd Changes the password of a user in a disk group.<br />

rmgrp Deletes a user group.<br />

rmusr Deletes a user from a disk group.


ASMCMD Commands<br />

File <strong>Management</strong><br />

cd Changes the current directory to the specified directory.<br />

du Displays the total disk space occupied by ASM files in the<br />

specified ASM directory and all of its subdirectories, recursively.<br />

find Lists the paths of all occurrences of the specified name (with<br />

wildcards) under the specified directory.<br />

ls Lists the contents of an ASM directory, the attributes of the<br />

specified file, or the names and attributes of all disk groups.<br />

lsof Lists the open files.<br />

mkalias Creates an alias for system-generated filenames.<br />

mkdir Creates ASM directories.<br />

pwd Displays the path of the current ASM directory.<br />

rm Deletes the specified ASM files or directories.<br />

rmalias Deletes the specified alias, retaining the file alias points to.


ASMCMD Commands<br />

Disk <strong>Group</strong> <strong>Management</strong><br />

chdg Changes a disk group (add, drop, or rebalance).<br />

chkdg Checks or repairs a disk or failure group.<br />

cp Enables you to copy files between ASM disk groups on a<br />

local instance and remote instances.<br />

dgdrop Drops a disk group.<br />

lsattr Lists the attribute and attribute settings of a disk group.<br />

lsdg Lists disk groups and their information.<br />

lsdsk Lists disks visible to ASM.<br />

lsgrp Lists ASM access control list (ACL) groups.<br />

md_backup Creates a backup of all of the mounted disk groups.<br />

md_restore Restores disk groups from a backup.<br />

mkdg Creates a disk group.<br />

mount Mounts a disk group.


ASMCMD Commands<br />

Disk <strong>Group</strong> <strong>Management</strong> (cont.)<br />

offline Offline a disk or a failure group that belongs to a disk<br />

group.<br />

online Onlines a disk or a failure group that belongs to a disk<br />

group.<br />

rebal Rebalances a disk group.<br />

remap Repairs a range of physical blocks on a disk.<br />

setattr Sets attributes in an ASM disk group.<br />

umount Dismounts a disk group.


ASMCMD Commands<br />

ACFS – ASM Clustered File System<br />

volcreate Create a volume<br />

voldelete Delete a volume<br />

voldisable Disable a volume.<br />

volenable Enable a Volume<br />

volinfo Volume Information,<br />

volresize Resize a volume<br />

volset Change existing attribute<br />

volstat Report volume I/O statistics.


WORKING WITH ASM DISK<br />

GROUPS<br />

September 12 / Slide 45 / Title of Document


Discovering Disks<br />

You can discover disk groups using ASM lib or the ASM<br />

instance.<br />

ASMLib<br />

/etc/init.d/oracleasm scandisks<br />

/etc/init.d/oracleasm listdisks<br />

ASM Instance<br />

SQL> select name, path from v$asm_disk ;


Create ASM Disk <strong>Group</strong>s<br />

Set ORACLE_HOME to Grid Infrastructure installation<br />

location<br />

SET ORACLE_SID to ASM instance name typically +ASM<br />

A disk group can be created using SQL Plus or the ASM<br />

command line utility.


Create ASM Disk <strong>Group</strong>s<br />

External Redundancy<br />

SQL Plus<br />

SQL> create diskgroup UNDO external redundancy disk 'ORCL:UNDO1' ;<br />

asmcmd<br />

Create diskgroup_config.xml<br />


Create ASM Disk <strong>Group</strong>s<br />

Normal Redundancy<br />

SQL Plus<br />

SQL> create diskgroup test_failgroup normal redundancy<br />

FAILGROUP fg1 DISK ‘ORCL:ASMDSK1' NAME ASMDSK1<br />

FAILGROUP fg2 DISK ‘ORCL:ASMDSK2' NAME ASMDSK2 ;<br />

asmcmd<br />

Create diskgroup_config.xml<br />

• <br />

• <br />

• <br />

• <br />

• <br />

• <br />

• <br />

• <br />

• <br />

• <br />

• <br />

• <br />

ASMCMD> mkdg diskgroup_config.xml


Create ASM Disk <strong>Group</strong>s<br />

High Redundancy<br />

SQL Plus<br />

SQL> create diskgroup test_failgroup high redundancy<br />

FAILGROUP fg1 DISK '/dev/oracleasm/disks/ASMDSK1' NAME ASMDSK1<br />

FAILGROUP fg2 DISK '/dev/oracleasm/disks/ASMDSK2' NAME ASMDSK2<br />

FAILGROUP fg3 DISK '/dev/oracleasm/disks/ASMDSK2' NAME ASMDSK3 ;


Create ASM Disk <strong>Group</strong>s<br />

asmcmd<br />

Create diskgroup_config.xml<br />


Mounting/Un-mounting Disk <strong>Group</strong>s<br />

Mounting and Un-mounting Disk <strong>Group</strong>s can be done via<br />

SQL Plus or the asmcmd utility<br />

Mount<br />

SQL Plus<br />

• SQL> alter diskgroup undo mount ;<br />

asmcmd<br />

• asmcmd> mount undo ;<br />

Un-mount<br />

SQL Plus<br />

• SQL> alter diskgroup undo dismount ;<br />

asmcmd<br />

• asmcmd> umount undo ;


Add Disk/Space to ASM Disk <strong>Group</strong><br />

Space is added to a disk group by the addition of ASM<br />

disks/volumes.<br />

SQL Plus<br />

SQL> alter diskgroup test add disk ‘ORCL:ASMDSK5‘


Remove Disk/Space from ASM Disk <strong>Group</strong><br />

Space is removed from an ASM Disk <strong>Group</strong> by removing<br />

disks from the diskgroup.<br />

SQL Plus<br />

SQL> alter diskgroup test_failgroup drop disk ASMDSK2 ;


Change ASM Disk <strong>Group</strong> Compatibility<br />

The Disk <strong>Group</strong> Compatibility can be change after the disk<br />

group is created provided it does not exceed compatibility in<br />

the environment being used. The COMPATIBLE.ASM and<br />

COMPATIBLE.RDBMS dictate the instance and RDBMS<br />

capability instance parameter settings.<br />

COMPATIBLE.ASM COMPATIBLE.RDBMS ASM Instance RDBMS Instance<br />

10.1 10.1 >=10.1 >=10.1<br />

11.1 10.1 >=11.1 >=10.1<br />

11.2 11.1 >=11.2 >=11.1<br />

11.2 11.2 >=11.2 >=11.2<br />

Disk <strong>Group</strong> can only be changed upward (so be careful)<br />

SQL Plus<br />

SQL> ALTER DISKGROUP data SET ATTRIBUTE 'compatible.asm' = '11.1';


Rename Disk <strong>Group</strong><br />

Starting will 11g Release 2 a disk group can be renamed using<br />

the renamedg command line utility<br />

asmcmd<br />

renamedg dgname=olddiskgroup newdgname=newdiskgroup<br />

** Note: If Disk <strong>Group</strong> Contains Database Files the database files<br />

will need to be relocated. This will require off lining the<br />

tablespaces that have datafiles on the diskgroup or shutting<br />

the database down prior to renaming the diskgroup. Then<br />

once diskgroup is rename relocating all files with alter<br />

database rename command for new Disk <strong>Group</strong> Name.


Managing ASM File Access Control for Disk <strong>Group</strong>s<br />

Managing file and directory is done using the asmcmd<br />

command line utility<br />

Managing access in asm is much like managing file and<br />

directory access in unix operating systems.<br />

You have users, groups, directory and file permissions<br />

controlled through the use of commands<br />

mkusr<br />

mkgrp<br />

rmgrp<br />

rmusr<br />

chown<br />

chgrp<br />

chmod


Managing ASM File Access Control for Disk <strong>Group</strong>s<br />

mkusr – Create New User<br />

asmcmd> mkusr dg1 myuser ;<br />

mkgrp – Create New <strong>Group</strong><br />

asmcmd> mkgrp dg1 mygroup ;<br />

grpmod – Add/Remove <strong>Users</strong> for <strong>Group</strong><br />

-a Add User -d Remove User<br />

grpmod –a dg1 mygroup myuser<br />

grpmod –d dg1 mygroup myuser<br />

rmgrp – Remove <strong>Group</strong><br />

asmcmd> rmgrp dg1 mygroup ;<br />

rmusr – Remove User<br />

asmcmd> rmusr dg1 myuser ;


Managing ASM File Access Control for Disk <strong>Group</strong>s<br />

chown<br />

ASMCMD> chown db1 +data/orcl/datafile/*<br />

ASMCMD> chown –R db1 +data/orcl<br />

ASMCMD> chown db1:backup_user +data/controlfile.f<br />

chgrp<br />

asmcmd> chgrp backup_users +data/controlfile.f ;<br />

asmcmd> chgrp –R backup_users +data/* ;<br />

chmod<br />

ASMCMD> chmod 644 +data/controlfile.f<br />

ASMCMD> chmod go+rw +data/controlfile.f<br />

ASMCMD> chmod ug-w +data/orcl/datafile/*<br />

ASMCMD> chmod –R 600 +data/orcl


Drop ASM Disk <strong>Group</strong><br />

A disk group can be dropped using either SQL Plus or the<br />

asmcmd command line utility<br />

SQL Plus<br />

DROP DISKGROUP dg1 ;<br />

** If Disk <strong>Group</strong> has files then use the INCLUDING CONTENTS clause<br />

SQL> DROP DISKGROUP disk_group_1 INCLUDING CONTENTS;<br />

asmcmd<br />

asmcmd> dgdrop dg1 ;<br />

** If Disk <strong>Group</strong> has files then use the –r option<br />

asmcmd> dgdrop –r dg1 ;


ASM CLUSTER FILE SYSTEM


Overview<br />

Requires installation of 11g Release 2 (11.2) Grid Infrastructure Software<br />

ACFS executes as a UNIX (POSIX and X/OPEN compatible) file system for<br />

Linux and UNIX and ACFS works as a Windows Filesystem on Windows.<br />

Applications and OS commands work natively against ACFS<br />

Exabyte capable files and file system capacities on 64 bit platforms<br />

Peer to peer, multi-node shared filesystem with direct, coherent and<br />

cache I/O to ASM <strong>Storage</strong>.<br />

Works as a Clustered or non-clustered filesystem<br />

<strong>Oracle</strong> ACFS are provided with “single node file system coherency” for<br />

single host or when distributed across cluster members.<br />

<strong>Oracle</strong> ACFS file system can be used for an <strong>Oracle</strong> Database Home file<br />

system.


<strong>Oracle</strong> ACFS Driver Model<br />

<strong>Oracle</strong> ACFS is installed as a dynamically loadable Operating<br />

System filesystem driver.<br />

Driver is implemented as a Virtual File System (VFS)<br />

Integrated with the native operating system


<strong>Oracle</strong> ACFS Mount Model and Namespace<br />

Hierarchical filesystem<br />

Files<br />

Sub-directories<br />

Tree-structured Namespace<br />

Files are the leaf nodes<br />

Single-filesystem naming model<br />

Not designed to be a root filesystem or bootable.


<strong>Oracle</strong> ACFS Mount Registry<br />

Multi-platform mount registration facility<br />

<strong>Automatic</strong>ally mount file systems on all nodes in a cluster<br />

that are registered<br />

Clustered and non-clustered filesystems are registered in the<br />

Mount Registry, most useful for clusters really<br />

Clustered see acfsutil command<br />

Non-clustered see srvctl add filesystem command<br />

Creates the mount point if it does not exist<br />

Registry mount actions will automatically mount associated<br />

ASM disk groups


<strong>Oracle</strong> ACFS Snapshots<br />

Point in time copy of an ACFS filesystem<br />

Works very similar to SAN Volume or Flash Copies<br />

Snapshots are immediately available for use after creation<br />

Always online while the file system is mounted<br />

Snapshot storage is maintained within the file system<br />

Snapshots are administered with the acfsutil snap<br />

commands<br />

63 snapshot views supported for each file system


<strong>Oracle</strong> ACFS and Backup and Restore<br />

Uses same backup capabilities as other filesystems for the<br />

host operating system environment.<br />

ACFS snapshots can be dynamically created and used to<br />

present a consistent view of an active file system for a<br />

backup<br />

NOTE: Windows backup applications that depend upon<br />

reparse points or the Windows Volume Shadow Copy<br />

Service (VSS) may not be supported.


<strong>Oracle</strong> ACFS Integration with ASM<br />

ACFS requires ASM for storage<br />

Always integrated with ASM<br />

Configured with a traditional device file<br />

ACFS filesystem inherits ASM storage management features<br />

like balanced distribution, mirroring, dynamic resizing, etc.<br />

Driver established connection with ASM instance<br />

Always unmount ACFS filesystems prior to ASM instance<br />

shutdown or prior t0 unmounting a disk group to avoid the<br />

filesystem being put into an error state.


Loading ACFS Drivers / Modules<br />

To utilize ACFS the ACFS drivers and modules must be<br />

loaded into the operating system<br />

For Grid Infrastructure installations in a cluster the drivers and<br />

modules are loaded automatically<br />

Single instance Grid Infrastructure installations the ACFS<br />

Drivers/Modules must be loaded Manaually<br />

Load ACFS Drivers/Modules Manually<br />

Log into the host operating system as root<br />

/bin/acfsload start<br />

Place the load command into /etc/rc.d/rc.local for the load to be<br />

persistent across node restarts


Create/Manage ACFS File System<br />

Must first have a Disk <strong>Group</strong> for the ACFS file system to use<br />

Disk <strong>Group</strong> Compatibility must be 11.2.0 or higher<br />

SQL> select group_number, name, compatibility,<br />

database_compatibility from v$asm_diskgroup;<br />

alter diskgroup avm SET ATTRIBUTE 'compatible.advm' = '11.2.0.0'<br />

Create an ACFS File System through ASMCA or asmcmd<br />

Create using asmcmd – ASM command line utility<br />

volcreate -d diskgroupa -s 10G volume<br />

Get ACFS volume information<br />

volinfo –a dg1<br />

Enable volumes in a Disk <strong>Group</strong><br />

All - volenable –a dg1<br />

Volume – volenable –d dg1


Create/Manage ACFS File System<br />

Resize a ACFS volume in a Disk <strong>Group</strong><br />

volresize -d -s 2G [ -f ] <br />

ACFS Volume Statistics<br />

volstat -d <br />

Disable ACFS volume<br />

voldisable -d <br />

Remove an ACFS volume<br />

voldelete -d


Thank You<br />

Thank you!<br />

September 12 / Slide 72 / Title of Document

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!