Pythian Blog: Technical Track

How To Reclaim ASM Disks

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: [code] $ asmcmd -V asmcmd version 12.1.0.2.0 [/code] List ASM diskgroup: [code] $ 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/ [/code] Verify no open files from DBFS_DATA: [code] $ asmcmd lsof -G DBFS_DATA DB_Name Instance_Name Path [/code] Check candidate disk: [code] $ asmcmd lsdsk --candidate Path /dev/mapper/dbfs_data02p1 [/code] List disk for DBFS_DATA [code] $ asmcmd lsdsk -G DBFS_DATA Path /dev/mapper/dbfs_data01p1 [/code] UnMount disk for DBFS_DATA: [code] $ 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/ [/code] From node2 - List ASM diskgroup: [code] $ 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/ [/code] Verify no open files from DBFS_DATA: [code] $ asmcmd lsof -G DBFS_DATA DB_Name Instance_Name Path [/code] Drop DBFS_DATA and list ASM diskgroup: [code] $ 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/ [/code] Check candidate disk: /dev/mapper/dbfs_data01p1 is now a candidate: [code] $ asmcmd lsdsk --candidate Path /dev/mapper/dbfs_data01p1 /dev/mapper/dbfs_data02p1 [/code] In summary, don't forget to reclaim disks after dropping databases to they can be repurposed.

No Comments Yet

Let us know what you think

Subscribe by email