• 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. How to Configure Device File owner/group with udev rules
  2. RHEL / CentOS : How to shrink LVM volume
  3. Oracle SQL Script to Report Tablespace Free and Fragmentation
  4. How to enable/disable SELinux Modes in RHEL/CentOS
  5. Linux File/Directory Permissions cheat sheet
  6. How To Migrate Existing Iptables rules to Nftables In CentOS/RHEL 8
  7. understanding “yum history” command output
  8. “btrfs” command examples to Create and Manage Btrfs File System
  9. “imuxsock lost # messages from pid # due to rate-limiting” – rsyslog rate-limiting in Linux
  10. How To Convert A Partitioned Table To A Non-Partitioned Table Using DataPump In Oracle 11g and 12c

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright