• 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 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. “yum history” command examples to display, rollback, redo, undo yum transactions
  2. How to connect to an Active Directory Domain using Realmd (Configure CentOS/RHEL 7 as active directory client)
  3. How to Create Undo Tablespace for a Newly Added RAC Instance (ORA-30012)
  4. Understanding The /etc/sysconfig Directory
  5. Encrypted vSphere vMotion
  6. poweroff Command Examples in Linux
  7. CentOS / RHEL : How to Recover from deleted /etc/passwd file
  8. How to disable swap in Linux
  9. How to Tune Btrfs Filesystem for Better Performance
  10. How to Install and configure telnet in RHEL / CentOS 5,6

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright