• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Migrate ASM Disk Groups to another Storage Online [non ASMLIB Devices]

by admin

The post explains in detail the exact steps to migrate ASM diskgroups from one storage to another storage without a downtime. This procedure will also work for diskgroups hosting OCR and Votefiles and ASM spfile.

Note: These steps are applicable to External, Normal & High redundancy diskgroups.

If your plans are replacing the current disks associated to your diskgroups with a new storage, this operation can be accomplished without any downtime, so you can follow the next steps

Add the new asm_diskstring

1. Backup all your databases and valid the backup (always required to protect your data).

2. Add the new path (new disks from the new storage) to your asm_diskstring to be recognized by ASM:

For Example:

SQL> alter system set asm_diskstring = '/dev/emcpowerc*' , '/dev/emcpowerh*';

Where,
‘/dev/emcpowerc*‘ are the current disks.
‘/dev/emcpowerh*‘ are the new disks.

Here, we have taken an example of EMC powerpath devices. You could have device from Veritas VxDMP as well or any other multipath software. Change the asm_diskstring accordingly.

Verify if the new disks are visible

1. Confirm that the new disks are being detected by ASM using the below command.

SQL> select path from v$asm_disk;

2. Validate all the new disks as described in the below post.

How To Add New Disk to An Existing Diskgroup on RAC Cluster or Standalone ASM Configuration

Add the disks to the Disk Group

1. Add the new disks to your desired diskgroup. The query syntax to add new disks to the diskgroup is as follows:

SQL> alter diskgroup [diskgroup name] add disk 
'[new disk 1]', 
'[new disk 2]', 
.
.
. 
'[new disk N]' rebalance power N;

2. Then wait until the rebalance operation completes:

SQL> select * from v$asm_operation;

no rows selected
SQL> select * from gv$asm_operation;

no rows selected

Remove the old disks

1. Finally, you can remove the old disks from the disk group. The query syntax to remove the old disks is as follows:

SQL> alter diskgroup [diskgroup name] drop disk 
[disk name A], 
[disk name B], 
. 
. 
. 
[disk name N] rebalance power X;

2. Then wait until the rebalance operation completes:

SQL> select * from v$asm_operation;

no rows selected
SQL> select * from gv$asm_operation;

no rows selected

3. Done, your ASM diskgroups and database have been migrated to the new storage.

Executing Add and delete operations together

Alternatively, we can execute add disk & drop disk statements in one operation, in that way only one rebalance operation will be started as follow:
Syntax

SQL> alter diskgroup [diskgroup name] 
add disk '[new device physical name 1]', ..., '[new device physical name N]' 
drop disk [old disk logical name 1], ..., [old disk logical name N]
rebalance power N;

This is more efficient than separated commands (add disk & drop disk statements). Then wait until the rebalance operation completes:

SQL> select * from v$asm_operation;

no rows selected
SQL> select * from gv$asm_operation;

no rows selected

Notes

– Disk from the old storage are finally expelled from the diskgroup(s) once the rebalance operation (from the drop operation) completes and when HEADER_STATUS = FORMER is reported thru the v$asm_disk view.
– On 10g, a manual rebalance operation is required to restart the diskgroup rebalance and expel the disk(s) because on 10g (if something wrong happens on disk expelling, e.g. hanging) ASM will not restart the ASM rebalance automatically (this was already enhanced on 11g and 12c), therefore you will need to restart a manual rebalance operation as follows:

SQL> alter diskgroup  rebalance power 11;
How to Migrate ASM Disk Groups to another Storage Online [When ASMLIB Devices Are Involved]

Filed Under: ASM, oracle

Some more articles you might also be interested in …

  1. RMAN ‘Duplicate From Active Database’ Feature in Oracle 11g
  2. How to reclaim entire space of an oracle database table with “Truncate Table” statement
  3. Running RMAN DUPLICATE / RESTORE on a different version than source database version.
  4. How To Set the Permission of the Files Created Using UTL_FILE
  5. How to install and configure Oracle ASMLIB on Native Linux multipath mapper devices
  6. Archived Redo File Conventions in Oracle RAC
  7. What are the .lok files used in WebLogic
  8. What Happens and What to Do when the SPFILE has been Manually Modified
  9. What is a FACTLESS FACT TABLE? Where we use Factless Fact
  10. How To Create “A CRS Managed” ACFS FileSystem On Oracle RAC Cluster (ASM/ACFS 11.2)

You May Also Like

Primary Sidebar

Recent Posts

  • pw-cat Command Examples in Linux
  • pvs: command not found
  • pulseaudio: command not found
  • pulseaudio Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright