Oracle & MySQL Support

InfraStack-Labs Oracle & MySQL DBA Services help you manage, maintain, and optimize your critical Oracle systems. We deliver 24/7, year-round support with flexible monthly contracts that don’t lock you in.

Please contact me :- ajith.narayanan@infrastack-labs.in

Friday, September 21, 2012

Steps for Creating ACFS Mount For A New Oracle_Home

Use below steps for creating ACFS mount for new DB binary home.


Create ACFS Volume - OH
=======================
How To Resize An ACFS Filesystem/ASM Volume (ADVM) [ID 1173978.1]


Diskgroup should have attribute setup

'compatible.asm' = '11.2', 'compatible.advm' = '11.2';

sqlplus "/as sysasm"

SQL> alter diskgroup DATA_1 set attribute 'compatible.asm' = '11.2';
SQL> alter diskgroup DATA_1 set attribute 'compatible.advm' = '11.2';

Create the next volume (10GB) in the ACFSDG diskgroup

SQL> ALTER DISKGROUP DATA_1 ADD VOLUME DB11203_3 SIZE 10G ;

Query the new volume name

ASMCMD> volinfo -a
Diskgroup Name: DATA_1

         Volume Name: DB11203_3
         Volume Device: /dev/asm/DB11203_3
         State: ENABLED
         Size (MB): 10240
         Resize Unit (MB): 32
         Redundancy: UNPROT
         Stripe Columns: 4
         Stripe Width (K): 128
         Usage:
         Mountpath:



Create the new ACFS filesystem on the volume above (only on one node):

[grid@dbaasm ~]$ /sbin/mkfs -t acfs -b 4k /dev/asm/DB11203_3-15 -n "DB11203_3" --(as grid user - oracle)

mkfs.acfs: version                   = 11.2.0.3.0
mkfs.acfs: on-disk version           = 39.0
mkfs.acfs: volume                    = /dev/asm/DB11203_2-15
mkfs.acfs: volume size               = 10737418240
mkfs.acfs: Format complete.


File system should not be added to the Oracle ACFS mount registry - skip it

Setup ORACLE_BASE - root, oracle sessions
export ORACLE_BASE=/u01/app/oracle # this is the option we have at the moment as standard - use this option
 
Setup GRID_HOME to match the current GI installation - root, oracle sessions

export GRID_HOME=/u01/app/grid/product/11.2.0.3/grid_1

Create mount directory to link to OH - as root or oracle if have enough grants

for i in `$GRID_HOME/bin/olsnodes`
do
echo "Node: $i.."
ssh $i "mkdir -p ${ORACLE_BASE}/product/11.2.0.3/db_3;chown oracle:oinstall ${ORACLE_BASE}/product/11.2.0.3/db_3"
done

Enable a file system to be automounted in GI - root
In an Oracle Grid Infrastructure clusterware configuration, run srvctl add filesystem to enable a file system to be automounted when an Oracle Database home is installed on the Oracle ACFS file system.

cd ${GRID_HOME}/bin
./srvctl add filesystem -d /dev/asm/DB11203_3-15 -v DB11203_3 -g DATA_1 -m ${ORACLE_BASE}/product/11.2.0.3/db_3 -u oracle




Maintenance commands

srvctl status filesystem -d /dev/asm/DB11203_3-15
srvctl start filesystem -d /dev/asm/DB11203_3-15
srvctl stop filesystem -d /dev/asm/DB11203_3-15

/sbin/acfsutil size ${ORACLE_BASE}/product/11.2.0.3/db_3

$ /sbin/acfsutil info fs /u01/app/oracle/product/11.2.0.3/db_3
$ /sbin/acfsutil info fs
/u01/app/oracle/product/11.2.0.3/db_3
    ACFS Version: 11.2.0.3.0
   flags:        MountPoint,Available
    mount time:   Mon Mar 12 11:17:41 2012
    volumes:      1
    total size:   10737418240
    total free:   10573426688
    primary volume: /dev/asm/DB11203_3-15
        label:                 DB11203_3
        flags:                 Primary,Available,ADVM
        on-disk version:       39.0
        allocation unit:       4096
        major, minor:          252, 7681
        size:                  10737418240
        free:                  10573426688
        ADVM diskgroup         DATA_1
        ADVM resize increment: 33554432
        ADVM redundancy:       unprotected
        ADVM stripe columns:   4
        ADVM stripe width:     131072
    number of snapshots:  0
    snapshot space usage: 0
    replication status: DISABLED


sqlplus "/as sysasm"

SQL> column VOL_DEVICE format A30
SQL> column FS_NAME format A40
SQL> set linesize 100
SQL> select FS_NAME, VOL_DEVICE, TOTAL_MB , FREE_MB from V$ASM_ACFSVOLUMES;

FS_NAME                                  VOL_DEVICE                       TOTAL_MB    FREE_MB
---------------------------------------- ------------------------------ ---------- ----------
/u01/app/oracle/product/11.2.0.3/db_3    /dev/asm/DB11203_3-15               10240 10083.6055

$ asmcmd

ASMCMD> volinfo -a
Diskgroup Name: DATA_1

         Volume Name: DB11203_3
         Volume Device: /dev/asm/DB11203_3-15
         State: ENABLED
         Size (MB): 10240
         Resize Unit (MB): 32
         Redundancy: UNPROT
         Stripe Columns: 4
         Stripe Width (K): 128
         Usage: ACFS
         Mountpath: /u01/app/oracle/product/11.2.0.3/db_3

crsctl stat res -w "TYPE = ora.acfs.type"
crsctl stop res -n
crsctl start res -n

HAPPY LEARNING!

No comments:

Post a Comment

Thanks for you valuable comments !