<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>remove LUN Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/remove-lun/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Tue, 29 Jan 2019 15:18:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How to  remove a SAN disk or Storage device (LUN) from Linux server</title>
		<link>https://www.osradar.com/how-to-remove-a-san-disk-or-storage-device-lun-from-linux-server/</link>
					<comments>https://www.osradar.com/how-to-remove-a-san-disk-or-storage-device-lun-from-linux-server/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Tue, 29 Jan 2019 15:18:09 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[remove a SAN disk]]></category>
		<category><![CDATA[remove LUN]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=10375</guid>

					<description><![CDATA[<p>In this tutorial  i will help you to remove LUN  safely  from a running system , This method should work on All Redhat based systems  5 6 or 7,   with  command multipath -ll you can all  details about  your Luns and storage configuration The ouput of multipath  -ll #multipath -ll oradata03 (360050768018085dc7000000000000xxx) dm-8 IBM [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-remove-a-san-disk-or-storage-device-lun-from-linux-server/">How to  remove a SAN disk or Storage device (LUN) from Linux server</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In this tutorial  i will help you to remove LUN  safely  from a running system , This method should work on All Redhat based systems  5 6 or 7,   with  command multipath -ll you can all  details about  your Luns and storage configuration</p>
<p>The ouput of multipath  -ll</p>
<pre class="">#multipath -ll
oradata03 (360050768018085dc7000000000000xxx) dm-8 IBM ,2145
size=500G features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| |- 1:0:0:4 sde 8:64 active ready running
| `- 8:0:0:4 sdu 65:64 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
|- 1:0:1:4 sdm 8:192 active ready running
`- 8:0:1:4 sdac 65:192 active ready running</pre>
<p><img loading="lazy" class="alignnone size-full wp-image-10382" src="https://www.osradar.com/wp-content/uploads/2019/01/oradara11.png" alt="" width="533" height="132" srcset="https://www.osradar.com/wp-content/uploads/2019/01/oradara11.png 533w, https://www.osradar.com/wp-content/uploads/2019/01/oradara11-300x74.png 300w" sizes="(max-width: 533px) 100vw, 533px" /></p>
<p>&nbsp;</p>
<p>How to  remove LUN from Live Server ?</p>
<h3>Step 1: Unmounting  the LUN :</h3>
<p>First, we need to unmount the file system we are about to release.</p>
<pre class="">umount /dev/mapper/oradata03</pre>
<p>Once unmount the filesystem  now lets remove the related  Logical volume, Volume group and Physical volume.</p>
<pre class=""># fdisk -l /dev/mapper/oradata03

Disk /dev/mapper/oradata03: 536.9 GB, 536870912000 bytes, 1048576000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disk label type: dos
Disk identifier: 0x77e6d4cb

Device Boot Start End Blocks Id System
/dev/mapper/oradata03p1 2048 1048575999 524286976 83 Linux

</pre>
<p>Now with fdisk you can delete the  partitions .</p>
<pre class="">#fdisk /dev/mapper/oradata03
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
g create a new empty GPT partition table
G create an IRIX (SGI) partition table
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): p

Disk /dev/mapper/oradata03: 536.9 GB, 536870912000 bytes, 1048576000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disk label type: dos
Disk identifier: 0x77e6d4cb

Device Boot Start End Blocks Id System
/dev/mapper/oradata03p1 2048 1048575999 524286976 83 Linux</pre>
<p>Delete the Partition oradata03p1</p>
<pre class="">Command (m for help): d
Selected partition 1
Partition 1 is deleted

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
# partprobe /dev/mapper/oradata03</pre>
<p>&nbsp;</p>
<p>Now lets  clear the Alias information from multipath.conf.</p>
<h3>Step 2: Removing disks from the multipath config</h3>
<p>Delete  entries from multipath configuration file  under alias and blacklist exceptions.</p>
<p># vi /etc/multipath.conf</p>
<pre class="">multipaths {
multipath {
wwid 360050768018085dc7000000000000xxx
alias oradata03
}
}</pre>
<pre class="">blacklist_exceptions {
        
        wwid "360050768018085dc7000000000000xx"
       

}</pre>
<p>&nbsp;</p>
<p>Ahead we need to remove from the wwids file by editing or using the “multipath -w” command.</p>
<pre class=""># vi /etc/multipath/wwids
# multipath -w 360050768018085dc7000000000000xxx
wwid '360050768018085dc7000000000000xxx' removed</pre>
<p>Explain -w options ( multipath -help) :</p>
<p>-w remove a device from the wwids file</p>
<p>Flush the DM device name using -f option.  from above command my dm was  dm-8</p>
<pre class=""># multipath -ll
# multipath -f dm-8e</pre>
<p>Steps 3: Removing SAN paths .</p>
<p>Remove the device paths , from the  first command of multipath -ll   you see  that   my  devices paths  are   sde sdu  sdm sdac</p>
<p>Remove the devices got from “multipath -ll” or can find the device name from below location.</p>
<pre class=""># ls -lthr /dev/disk/by-id/*xxx  ( to  get  more  information) 
# echo 1 &gt; /sys/block/sde/device/delete
# echo 1 &gt; /sys/block/sdu/device/delete
# echo 1 &gt; /sys/block/sdm/device/delete
# echo 1 &gt; /sys/block/sdac/device/delete</pre>
<p>This will remove the Storage device (LUN) from RHEL, CentOS, Oracle Servers and variants.<br />
Conclusion:</p>
<p>If you are using this lun for ASM disks  please also delete the configuration from udev rules  and  reload  the configuration</p>
<p>Edit  udev rules under &#8220;/etc/udev/rules.d/&#8221;</p>
<p>Then reload the  rules</p>
<pre class=""><code> udevadm control --reload-rules &amp;&amp; udevadm trigger</code></pre>
<p>Thank you for your visit . Please let us know if this working for you</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-remove-a-san-disk-or-storage-device-lun-from-linux-server/">How to  remove a SAN disk or Storage device (LUN) from Linux server</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-remove-a-san-disk-or-storage-device-lun-from-linux-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
