How To Reclaim ASM Disks

Posted in: Technical Track

The project I have been working on is migrating GoldenGate trails from DBFS and ACFS. Now that the migration has completed and DBFS database has been dropped, the next step is to reclaim ASM disks.

DBFS is running on 2 nodes RAC.

From node1 –

Check asmcmd version:

$ asmcmd -V
asmcmd version 12.1.0.2.0

List ASM diskgroup:

$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  4194304    307184    51044                0           51044              0             N  ACFS_DATA/
MOUNTED  EXTERN  N         512   4096  4194304   9289488   793500                0          793500              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  4194304    153584    83580                0           83580              0             N  DBFS_DATA/
MOUNTED  EXTERN  N         512   4096  1048576     15344     9832                0            9832              0             Y  GRID/

Verify no open files from DBFS_DATA:

$ asmcmd lsof -G DBFS_DATA
DB_Name  Instance_Name  Path

Check candidate disk:

$ asmcmd lsdsk --candidate
Path
/dev/mapper/dbfs_data02p1

List disk for DBFS_DATA

$ asmcmd lsdsk -G DBFS_DATA
Path
/dev/mapper/dbfs_data01p1

UnMount disk for DBFS_DATA:

$ asmcmd umount -f DBFS_DATA
$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  4194304    307184    51044                0           51044              0             N  ACFS_DATA/
MOUNTED  EXTERN  N         512   4096  4194304   9289488   793500                0          793500              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  1048576     15344     9832                0            9832              0             Y  GRID/

From node2 –

List ASM diskgroup:

$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  4194304    307184    51044                0           51044              0             N  ACFS_DATA/
MOUNTED  EXTERN  N         512   4096  4194304   9289488   793500                0          793500              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  4194304    153584    83580                0           83580              0             N  DBFS_DATA/
MOUNTED  EXTERN  N         512   4096  1048576     15344     9832                0            9832              0             Y  GRID/

Verify no open files from DBFS_DATA:

$ asmcmd lsof -G DBFS_DATA
DB_Name  Instance_Name  Path

Drop DBFS_DATA and list ASM diskgroup:

$ asmcmd dropdg -r DBFS_DATA
$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  4194304    307184    51044                0           51044              0             N  ACFS_DATA/
MOUNTED  EXTERN  N         512   4096  4194304   9289488   793500                0          793500              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  1048576     15344     9832                0            9832              0             Y  GRID/

Check candidate disk: /dev/mapper/dbfs_data01p1 is now a candidate:

$ asmcmd lsdsk --candidate
Path
/dev/mapper/dbfs_data01p1
/dev/mapper/dbfs_data02p1

In summary, don’t forget to reclaim disks after dropping databases to they can be repurposed.

email

Interested in working with Michael? Schedule a tech call.

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *