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

The Geek Diary

CONCEPTS | BASICS | HOWTO

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

How to Delete ASM Disk on Multipath Device in CentOS/RHEL

By admin

The post outlines steps to remove ASM disk on multipath device (Labeled as ASMDISK01 as an example in this post) from CentOS/RHEL server.

1. First make sure that ASM disk is no longer used by any disk group, otherwise, you might risk data integrity. The DBA can check this by using asmcmd or by logging into the ASM database.

2. Find out ASM disk mapping:

# oracleasm listdisks
ASMDISK01
...
# oracleasm querydisk -p ASMDISK01
Disk "ASMDISK01" is a valid ASM disk
/dev/sdf: LABEL="ASMDISK01" TYPE="oracleasm"
...
# oracleasm querydisk -d ASMDISK01
Disk "ASMDISK01" is a valid ASM disk on device [8, 16]
...

3. Identify multipath device used for ASMDISK01 disk from ASM:

# multipath -ll
mpath1 dm-4 IBM DS
size=10G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
`- 5:0:0:1 sdf 8:16 active ready running <-
`- 5:0:0:1 sdg 8:17 active ready running
...
# dmsetup ls --tree

mpath1 (252:1)
├─ (8:16) <- sdf
└─ (8:17) <- sdg

mpath2 (252:2)
└─ (8:76)
...

4. After you have confirmed the disk to be deleted as well as its corresponding disk in device multipath, you can go ahead and delete it from ASM first.

# oracleasm deletedisk ASMDISK01
Removing ASM disk “ASMDISK01″: [ OK ]

5. Next step is to clean up the device multipath for the deleted disk. You can use any of the below commands to delete the multipath disk.

# multipath –f mpath1

or

# dmsetup remove mpath1

6. Delete SCSI devices from kernel.

# echo 1 > /sys/block/sdf/device/delete
# echo 1 > /sys/block/sdg/device/delete

7. LUN could be removed from SAN Storage Server now.

8. Make sure mpath1 is removed from multipath list:

# multipath -ll

Filed Under: ASM, CentOS/RHEL 5, CentOS/RHEL 6, Linux, oracle

Some more articles you might also be interested in …

  1. How to Enable Thin LVM Automatic Extension
  2. How to Convert STANDARD ASM to FLEX ASM in 12C
  3. Beginners Guide to Automounting File Systems in CentOS / RHEL
  4. Oracle Database : script to create a “CREATE SYNONYM Script”
  5. How to Move/Restore Oracle Database to New Host and File System using RMAN
  6. “Bad id for repo: My Repo, byte = 2” yum update error
  7. rm: cannot remove ‘doc/by-app’: Function not implemented (CentOS/RHEL 7)
  8. Unable to Run X Applications Through SSH in Linux
  9. CentOS / RHEL 7 : How to enable telnet for a group of users
  10. How to Monitor Process Memory Usage on Oracle Pluggable Databases

You May Also Like

Primary Sidebar

Recent Posts

  • What are Command Rules in oracle Database
  • Using Rule Sets in Oracle Database Vault
  • How Realms Work in Oracle Database Vault
  • How to use Privilege Analysis in Oracle Database
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary