How to remove a SAN disk or Storage device (LUN) from Linux server
Read Time:1 Minute, 54 Second

How to remove a SAN disk or Storage device (LUN) from Linux server

0 0
0 0

In this guide let us see how to safely remove a SAN disk (LUN) from Red Hat Enterprise Linux version 5, 6 or 7 and it’s variants like CentOS, Oracle Linux or Scientific Linux. Below steps can be followed for removing one or two disks. To remove the bulk number of disk we have another safe way.

Assume we are about to remove only one disk for now, our LUN id will be 32a7d0050202a7d00000226, note down all the paths of the multipath┬ádevice. To know about the devices run “multipath -ll” and make a note on device name such as “SDAS, SDAR“.


Step 1: Unmounting Filesystem:

First, we need to unmount the file system we are about to release.

# umount

Once unmount the filesystem by following we need to remove the Logical volume, Volume group and Physical volume. Moreover, we have to delete the partition which used by the Physical volume.

Still yet not completed with removing disk information, we need to clear the Alias information from multipath.conf.

Step 2: Removing disks from the multipath configuration:

Remove entries from multipath configuration under alias and blacklist exceptions.

# vi /etc/multipath.conf

Ahead we need to remove from the wwids file by editing or using the “multipath -w” command.

# vi /etc/multipath/wwids

# multipath -w 32a7d0050202a7d00000226

Flush the DM device name using -f option. To get the dm device name we can run “multipath -ll” command.

# multipath -ll
# multipath -f dm-35



Steps 3: Removing SAN paths by nulling the devices.

Remove the device paths as shown below, need more care while doing the below steps.

Remove the devices got from “multipath -ll” or can find the device name from below location.

# ls -lthr /dev/disk/by-id/*226
# echo 1 > /sys/block/sdas/device/delete
# echo 1 > /sys/block/sdar/device/delete

This will remove the Storage device (LUN) from RHEL, CentOS, Oracle Servers and variants.

Conclusion:

This guide will help us to remove SAN disks from Linux servers. To avoid any I/O error in messages log file we need to follow the above steps while removing with any SAN disks. Hope this guide straightforward for you to know about removing SAN disks from text-based operating systems.

How to remove a SAN disk or Storage device (LUN) from Linux server 1

About Post Author

Babin Lonston

Overall 14+ Years of experience in the IT field, currently working as a Senior Linux administration with Virtualization & Cloud. Being numismatist for a long time.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published.

google_cloud_www.oel7.com Previous post Creating and managing google cloud storage for google Virtual machines
Create UDEV ASM disks Next post Creating UDEV ASM Disks using UDEV in Linux servers

Subscribe

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

We promise not to spam you, and we don't usually send more than one email a week.

You have Successfully Subscribed!