How to delete Oracle ASM Disk in RHEL 5 & 4

ASM is the volume manager and filesystem for Oracle database. At one point of time may need to drop the disks. The procedure is quite different compare to Linux LVM disks. How to delete Oracle ASM disk in RHEL 5 and RHEL 4?

This article helps you to delete disks from ASM library. It also helps to remove all the traces of LUN/disk from OS. This procedure applies to both RHEL 5 and RHEL 4. These steps can be executed by Linux system admin. No need to be database specialist.

Note:  This article does not work for RHEL 6 and RHEL 7.

The steps are divided into below two topics.

  1. Deletion of ASM disk
  2. Remove traces of deleted LUN/disk


ASM disk to be deleted: ORACLE_ASM_D1

  • Ensure disk has been removed from database ASM disk group before proceeding with any of these steps.

Operating System: RHEL 5 / RHEL 4

Disk source: Netapp SAN storage

Step1: Collect necessary details

  • Query ASM disk and note major & minor number
# service oracleasm querydisk ORACLE_ASM_D1
Disk "ORACLE_ASM_D1" is a valid ASM disk on device [253, 35]
  • Using major and minor number find kernel device name.
# ls -ltr /dev/mapper | grep “253, 35”
brw-rw----  1 root disk 253, 35 Sep 15  2015 mpatha
  • Using device name validate disk size & wwid. Here we make ensure to choose correct disk.
#fdisk –l /dev/mapper/mpatha

#dmsetup info /dev/mapper/mpatha
Name:              mpatha
State:             ACTIVE
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      253, 35
Number of targets: 1
UUID: part1-mpath-360a98000486e616e504a512345678908

# cat /etc/multipath.conf |grep -C 2 "360a98000486e616e504a512345678908"

        multipath {
                wwid                    360a98000486e616e504a512345678908
                alias                   mpatha

Step2: Optional only for Netapp SAN

The sanlun tool must have been installed for this command to work. This is to identify LUN id. The LUN id may be helpful while deleting the LUN from SAN storage.

#sanlun lun show –pv all  > sanlun_output

Collect the sanlun path

#vi sanlun_output ( search with WWID of the disk)
NetappSAN1:/vol/testdata/oracle_asm_d1.lun (LUN 12)

Step3: Delete Oracle ASM disk

#service oracleasm deletedisk ORACLE_ASM_D1
#service oracleasm listdisks | grep ORACLE_ASM_D1

The target Oracle ASM disk “ORACLE_ASM_D1” has been removed from ASM library. The disk no more visible for ASM commands. Still we have to delete Oracle ASM disk from OS. Please click here to continue with further steps.

One thought on “How to delete Oracle ASM Disk in RHEL 5 & 4

Comments are closed.