https://lug.wur.nl/index.php?title=Grow_Multipath_Block_Device&feed=atom&action=history
Grow Multipath Block Device - Revision history
2024-03-29T15:45:33Z
Revision history for this page on the wiki
MediaWiki 1.34.1
https://lug.wur.nl/index.php?title=Grow_Multipath_Block_Device&diff=395&oldid=prev
Dawes001 at 14:48, 3 January 2018
2018-01-03T14:48:43Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 14:48, 3 January 2018</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l54" >Line 54:</td>
<td colspan="2" class="diff-lineno">Line 54:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> `- 1:0:1:2 sdg 8:96 active ready running</nowiki></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> `- 1:0:1:2 sdg 8:96 active ready running</nowiki></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Now you can proceed to enlarge the upper level components<del class="diffchange diffchange-inline">, the Physical Volume, and/or the filesystem:</del></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Now you can proceed to enlarge the <ins class="diffchange diffchange-inline">[[Grow Logical Volume|</ins>upper level components<ins class="diffchange diffchange-inline">]]</ins>.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"><code># pvresize /dev/mapper/san4_Data</code></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> <nowiki> Physical volume "/dev/dm-10" changed</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> 1 physical volume(s) resized / 0 physical volume(s) not resized</nowiki></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> </del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"><code># lvresize /dev/mapper/Vsan4-Ldata -l +100%FREE</code></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> <nowiki> Extending logical volume Vsan4/Ldata to 350.00 GB</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> Logical volume Ldata successfully resized</nowiki></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">Lastly, resize the filesystem. First example, ext4:</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"><code># resize2fs /dev/mapper/Vsan4-Ldata</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> <nowiki>resize2fs 1.39 (29-May-2006)</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">Filesystem at /dev/mapper/Vsan4-Ldata is mounted on /san4; on-line resizing required</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">Performing an on-line resize of /dev/mapper/Vsan4-Ldata to 30145536 (4k) blocks.</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">The filesystem on /dev/mapper/Vsan4-Ldata is now 30145536 blocks long</del>.<del class="diffchange diffchange-inline"></nowiki></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">Or for XFS:</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"><code># xfs_growfs /dev/mapper/Vsan4-Ldata</code></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> <nowiki>meta-data=/dev/mapper/Vsan4-Ldata isize=256 agcount=16, agsize=3276796 blks</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> = sectsz=512 attr=2, projid32bit=1</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> = crc=0 finobt=0</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">data = bsize=4096 blocks=52428736, imaxpct=25</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> = sunit=4 swidth=4096 blks</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">naming =version 2 bsize=4096 ascii-ci=0 ftype=0</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">log =internal bsize=4096 blocks=25600, version=2</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> = sectsz=512 sunit=4 blks, lazy-count=1</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">realtime =none extsz=4096 blocks=0, rtextents=0</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">data blocks changed from 52428736 to 78643200</nowiki></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"><code># df -h /san4</code></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> <nowiki>Filesystem Size Used Avail Use% Mounted on</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">/dev/mapper/Vsan4-Ldata 350G 185G 66G 74% /san4</nowiki></del></div></td><td colspan="2"> </td></tr>
<!-- diff cache key wikidb:diff::1.12:old-386:rev-395 -->
</table>
Dawes001
https://lug.wur.nl/index.php?title=Grow_Multipath_Block_Device&diff=386&oldid=prev
Dawes001: Dawes001 moved page Resize Multipath Block Device to Grow Multipath Block Device
2018-01-03T14:13:52Z
<p>Dawes001 moved page <a href="/index.php?title=Resize_Multipath_Block_Device" class="mw-redirect" title="Resize Multipath Block Device">Resize Multipath Block Device</a> to <a href="/index.php?title=Grow_Multipath_Block_Device" title="Grow Multipath Block Device">Grow Multipath Block Device</a></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 14:13, 3 January 2018</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Dawes001
https://lug.wur.nl/index.php?title=Grow_Multipath_Block_Device&diff=366&oldid=prev
Dawes001: Created page with "= Enlarging a multipath device = multipath -ll should show you: <code># multipath -ll san4_Data</code> <nowiki>san4_Data (360002ac00000000000000dfa00004ca6) dm-3 3PARdata,V..."
2018-01-03T12:26:07Z
<p>Created page with "= Enlarging a multipath device = multipath -ll should show you: <code># multipath -ll san4_Data</code> <nowiki>san4_Data (360002ac00000000000000dfa00004ca6) dm-3 3PARdata,V..."</p>
<p><b>New page</b></p><div>= Enlarging a multipath device =<br />
<br />
multipath -ll should show you:<br />
<br />
<code># multipath -ll san4_Data</code><br />
<nowiki>san4_Data (360002ac00000000000000dfa00004ca6) dm-3 3PARdata,VV <br />
size=250G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw<br />
`-+- policy='round-robin 0' prio=50 status=active<br />
|- 0:0:1:2 sdb 8:16 active ready running<br />
`- 1:0:1:2 sdg 8:96 active ready running</nowiki><br />
<br />
Or possibly, after peer persistence:<br />
<br />
<nowiki>san4_Data (360002ac000000000000003bb0000d16e) dm-9 3PARdata,VV<br />
size=1.5T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw<br />
|-+- policy='round-robin 0' prio=50 status=active<br />
| |- 0:0:1:2 sdg 8:96 active ready running<br />
| `- 1:0:1:2 sdq 65:0 active ready running<br />
`-+- policy='round-robin 0' prio=1 status=enabled<br />
|- 0:0:0:2 sdb 8:16 active ghost running<br />
`- 1:0:0:2 sdl 8:176 active ghost running</nowiki><br />
<br />
Also, dmsetup should give you something like this: <br />
<br />
<code># dmsetup status san4_Data</code><br />
<nowiki>0 524288000 multipath 2 0 1 0 1 1 A 0 2 0 8:16 A 0 8:96 A 0</nowiki><br />
<br />
One way to do this is to rescan the partition table for each device:<br />
<br />
<code># blockdev --rereadpt /dev/sdg</code><br />
<br />
But by far the quickest method is to rescan each SCSI device from the kernel. This is done with:<br />
<br />
<code># echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan</code><br />
<br />
Either way, once the capacity changes you should see this in dmesg:<br />
<code># dmesg</code><br />
</nowiki>[4849955.387134] sdg: detected capacity change from 214748364800 to 322122547200</nowiki><br />
<br />
Having trouble? Try rescanning the entire scsi bus again with:<br />
<code># echo "- - -" > /sys/class/scsi_host/host1/scan</code><br />
<br />
Once you see the dmesg line, then resize the path in multipathd with:<br />
<br />
<code># multipathd -k"resize multipath san4_Data"</code><br />
<br />
Once that's done, multipath will now report the larger size:<br />
<br />
<code># multipath -ll san4_Data</code><br />
<nowiki>san4_Data (360002ac00000000000000dfa00004ca6) dm-3 3PARdata,VV <br />
size=350G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw<br />
`-+- policy='round-robin 0' prio=50 status=active<br />
|- 0:0:1:2 sdb 8:16 active ready running<br />
`- 1:0:1:2 sdg 8:96 active ready running</nowiki><br />
<br />
Now you can proceed to enlarge the upper level components, the Physical Volume, and/or the filesystem:<br />
<br />
<code># pvresize /dev/mapper/san4_Data</code><br />
<nowiki> Physical volume "/dev/dm-10" changed<br />
1 physical volume(s) resized / 0 physical volume(s) not resized</nowiki><br />
<br />
<code># lvresize /dev/mapper/Vsan4-Ldata -l +100%FREE</code><br />
<nowiki> Extending logical volume Vsan4/Ldata to 350.00 GB<br />
Logical volume Ldata successfully resized</nowiki><br />
<br />
Lastly, resize the filesystem. First example, ext4:<br />
<br />
<code># resize2fs /dev/mapper/Vsan4-Ldata<br />
<nowiki>resize2fs 1.39 (29-May-2006)<br />
Filesystem at /dev/mapper/Vsan4-Ldata is mounted on /san4; on-line resizing required<br />
Performing an on-line resize of /dev/mapper/Vsan4-Ldata to 30145536 (4k) blocks.<br />
The filesystem on /dev/mapper/Vsan4-Ldata is now 30145536 blocks long.</nowiki><br />
<br />
Or for XFS:<br />
<br />
<code># xfs_growfs /dev/mapper/Vsan4-Ldata</code><br />
<nowiki>meta-data=/dev/mapper/Vsan4-Ldata isize=256 agcount=16, agsize=3276796 blks<br />
= sectsz=512 attr=2, projid32bit=1<br />
= crc=0 finobt=0<br />
data = bsize=4096 blocks=52428736, imaxpct=25<br />
= sunit=4 swidth=4096 blks<br />
naming =version 2 bsize=4096 ascii-ci=0 ftype=0<br />
log =internal bsize=4096 blocks=25600, version=2<br />
= sectsz=512 sunit=4 blks, lazy-count=1<br />
realtime =none extsz=4096 blocks=0, rtextents=0<br />
data blocks changed from 52428736 to 78643200</nowiki><br />
<br />
<code># df -h /san4</code><br />
<nowiki>Filesystem Size Used Avail Use% Mounted on<br />
/dev/mapper/Vsan4-Ldata 350G 185G 66G 74% /san4</nowiki></div>
Dawes001