November 18

Linux: Removing attach storage from a server manually

If multipathing is used find your paths and drive with:
multipath -l (to collect and note the paths to the disk. You will need this information)
Be sure to copy this information to a text editor for future review

Delete paths:
multipath -f path(letter) ( to remove the device from mutipath, where is the mpathX name or alias assigned to the multipath device)

Flush drives:
blockdev –flushbufs /dev/(devicename) ( for each path you collected with multipath -l. This part is especially important when deleting )

Delete drives:
echo 1 > /sys/block/devicename/device/delete

If the above does not work you can do the following:
dmsetup remove -f serialnumberfromthemultipathcommand


Copyright 2021. All rights reserved.

Posted November 18, 2021 by Timothy Conrad in category "Linux

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B