RHEL: Remove existing SAN LUNs

RHEL: Remove existing SAN LUNs

# Tested on RHEL 5 & 6

# Given following LUN, for instance:

multipath -ll
[...]
   3600508b4000971cd0001000022fa0000 dm-0 HP,HSV210
   [size=2.0G][features=0][hwhandler=0][rw]
   \_ round-robin 0 [prio=0][active]
    \_ 1:0:0:3 sdc        8:32   [active][undef]
    \_ 1:0:2:3 sdk        8:160  [active][undef]
    \_ 2:0:0:3 sds        65:32  [active][undef]
    \_ 2:0:1:3 sdw        65:96  [active][undef]
   \_ round-robin 0 [prio=0][enabled]
    \_ 2:0:2:3 sdaa       65:160 [active][undef]
    \_ 2:0:3:3 sdae       65:224 [active][undef]
    \_ 1:0:1:3 sdg        8:96   [active][undef]
    \_ 1:0:3:3 sdo        8:224  [active][undef]



# Run following commands to remove it from the system:

multipath -f 3600508b4000971cd0001000022fa0000
echo 1>/sys/block/sdc/device/delete
echo 1>/sys/block/sdk/device/delete
echo 1>/sys/block/sds/device/delete
echo 1>/sys/block/sdw/device/delete
echo 1>/sys/block/sdaa/device/delete
echo 1>/sys/block/sdae/device/delete
echo 1>/sys/block/sdg/device/delete
echo 1>/sys/block/sdo/device/delete




# Take care of not running any HBA rescan before definitively detaching LUNs from server.
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
A Simple Guide to Oracle Cluster File System (OCFS2) using iSCSI on Oracle Cloud Infrastructure
Viewed 8628 times since Sat, Jun 2, 2018
ZFS: Remove an existing zfs filesystem
Viewed 2242 times since Sun, Jun 3, 2018
Szybkie sprawdzenie zewnętrznego adresu IP i hosta
Viewed 3510 times since Thu, May 24, 2018
RHEL: Reinstalling Boot Loader on the Master Boot Record (MBR)
Viewed 3539 times since Sun, May 27, 2018
How To Run Multiple SSH Command On Remote Machine And Exit Safely
Viewed 4530 times since Tue, Aug 6, 2019
rabbitmq Troubleshooting TLS-enabled Connections
Viewed 2634 times since Sun, Dec 6, 2020
RHEL: Resize/disable /dev/shm filesystem
Viewed 15172 times since Sun, May 27, 2018
linux manual tools
Viewed 2928 times since Fri, Sep 28, 2018
An easier way to manage disk decryption at boot with Red Hat Enterprise Linux 7.5 using NBDE
Viewed 7761 times since Mon, Aug 6, 2018
How to configure an SSH proxy server with Squid
Viewed 3278 times since Sun, Dec 6, 2020