<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sig-I/O (Posts about iscsi)</title><link>https://sig-io.nl/</link><description></description><atom:link href="https://sig-io.nl/categories/iscsi.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2024 &lt;a href="mailto:mark@sig-io.nl"&gt;Mark Janssen&lt;/a&gt; </copyright><lastBuildDate>Wed, 12 Jun 2024 13:43:17 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Online resizing of multipath devices in Linux dm-multipath</title><link>https://sig-io.nl/posts/online-resizing-of-multipath-devices-in-linux-dm-multipath/</link><dc:creator>Mark Janssen</dc:creator><description>&lt;p&gt;Linux doesn’t automatically re-size multipath devices, so this procedure must be used to have online re-sizing of multipath.  (Offline re-size is automatic, just remove the mapping and reload)&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;this example will use multipath device /dev/mpath/testdisk, with scsi disks /dev/sdx and /dev/sdy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Resize the lun on the underlying storage layer (iscsi / san)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check which sd? devices are relevant, and re-scan these:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;multipath -ll testdisk&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;blockdev –rereadpt /dev/sdx&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;blockdev –rereadpt /dev/sdy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;blockdev –getsz /dev/sdx&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;blockdev –getsz /dev/sdy&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Take note of the new size returned by getsz.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dump the dmsetup table to a file (and a backup)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;dmsetup table testdisk | tee mapping.bak mapping.cur&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Edit the table stored in ‘mapping.cur’&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;vi mapping.cur, replace field 2 (size) with the new size from getsz&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Suspend I/O, reread the table, and resume I/O&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;dmsetup suspend testdisk; dmsetup reload testdisk mapping.cur; dmsetup resume testdisk&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The multipath device should now be resized:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;multipath -ll&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can now resize the filesystem on the multipath device, or the LVM-PV if you use LVM on the LUN.&lt;/p&gt;</description><category>dmsetup</category><category>iscsi</category><category>linux</category><category>lvm</category><category>multipath</category><category>resize</category><guid>https://sig-io.nl/posts/online-resizing-of-multipath-devices-in-linux-dm-multipath/</guid><pubDate>Thu, 07 Apr 2011 21:26:24 GMT</pubDate></item></channel></rss>