<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://stab.st-andrews.ac.uk/wiki/index.php?action=history&amp;feed=atom&amp;title=Expanding_Storage</id>
		<title>Expanding Storage - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://stab.st-andrews.ac.uk/wiki/index.php?action=history&amp;feed=atom&amp;title=Expanding_Storage"/>
		<link rel="alternate" type="text/html" href="http://stab.st-andrews.ac.uk/wiki/index.php?title=Expanding_Storage&amp;action=history"/>
		<updated>2026-04-19T20:16:36Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://stab.st-andrews.ac.uk/wiki/index.php?title=Expanding_Storage&amp;diff=3298&amp;oldid=prev</id>
		<title>Jw297: Created page with &quot;= Introduction =  Expanding purchased storage on /storage/ is actually surprisingly easy. This is all taken from Ramon&#039;s expansion of 50Tb to 56Tb (page on the wiki). More det...&quot;</title>
		<link rel="alternate" type="text/html" href="http://stab.st-andrews.ac.uk/wiki/index.php?title=Expanding_Storage&amp;diff=3298&amp;oldid=prev"/>
				<updated>2018-11-21T09:52:18Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Introduction =  Expanding purchased storage on /storage/ is actually surprisingly easy. This is all taken from Ramon&amp;#039;s expansion of 50Tb to 56Tb (page on the wiki). More det...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Expanding purchased storage on /storage/ is actually surprisingly easy. This is all taken from Ramon&amp;#039;s expansion of 50Tb to 56Tb (page on the wiki). More details taken from this page are below, but effectively it&amp;#039;s just &lt;br /&gt;
&lt;br /&gt;
 echo 1 &amp;gt; /sys/block/sdd/device/rescan &lt;br /&gt;
 echo 1 &amp;gt; /sys/block/sde/device/rescan&lt;br /&gt;
 echo 1 &amp;gt; /sys/block/sdf/device/rescan &lt;br /&gt;
 echo 1 &amp;gt; /sys/block/sdg/device/rescan &lt;br /&gt;
 multipathd -k&amp;#039;resize map mpathd&amp;#039;&lt;br /&gt;
 pvresize /dev/mapper/mpathd&lt;br /&gt;
 lvextend /dev/STORAGE/storage /dev/mapper/mpathd&lt;br /&gt;
 xfs_growfs /dev/STORAGE/storage&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
&lt;br /&gt;
== listing ==&lt;br /&gt;
 multipath -l&lt;br /&gt;
&lt;br /&gt;
will give a useful if not very understandable list of characteristics. Most important, the device: dm-6 is noted, i.e.&lt;br /&gt;
&lt;br /&gt;
 mpathd (36000d3100051f800000000000000016e) dm-6 COMPELNT,Compellent Vol&lt;br /&gt;
 size=50T features=&amp;#039;1 queue_if_no_path&amp;#039; hwhandler=&amp;#039;0&amp;#039; wp=rw&lt;br /&gt;
 `-+- policy=&amp;#039;round-robin 0&amp;#039; prio=0 status=active&lt;br /&gt;
   |- 6:0:0:1 sdd 8:48 active undef running&lt;br /&gt;
   |- 7:0:1:1 sde 8:64 active undef running&lt;br /&gt;
   |- 6:0:1:1 sdg 8:96 active undef running&lt;br /&gt;
   `- 7:0:2:1 sdf 8:80 active undef running&lt;br /&gt;
&lt;br /&gt;
== configuration ==&lt;br /&gt;
 /etc/multipath.conf&lt;br /&gt;
Doesn&amp;#039;t really have much. The only actives are:&lt;br /&gt;
 defaults {&lt;br /&gt;
    user_friendly_names yes&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 blacklist {&lt;br /&gt;
     wwid 3600605b006c5f11019eadc840e589ae9&lt;br /&gt;
     wwid 3600605b006a1af8019ee9a2d1036bfa7&lt;br /&gt;
     wwid 3600605b006a1af801b46c4773d54b7d4&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== interpreter ==&lt;br /&gt;
&lt;br /&gt;
There is also a interpreter available to query status and other things. To fire it up, type&lt;br /&gt;
 multipathd -k&lt;br /&gt;
&lt;br /&gt;
The &lt;br /&gt;
 show maps topology&lt;br /&gt;
&lt;br /&gt;
command in this interpeter will give you the same output as the &amp;quot;multipath -l&amp;quot; command. It mayy be necessary to find out more about the tool. For example, this command&lt;br /&gt;
&lt;br /&gt;
 paths count&lt;br /&gt;
&lt;br /&gt;
gives 4 as the answer, which probably refers to sdd, sde, sdg, sdf mentioned in the above output. Indeed the &lt;br /&gt;
 show devices&lt;br /&gt;
&lt;br /&gt;
gives these four as the output. Unfortunately, there is nothign about rescanning here. I think this tool is at a higher-level than what is required for the rescanning, which seems to be a lower level jobs (multipath&amp;#039;s understanding of &amp;quot;devices&amp;quot; gives this away somewhat).&lt;br /&gt;
&lt;br /&gt;
Indeed this tool will be useful for resizing, but unfortunately not for rescanning.&lt;br /&gt;
&lt;br /&gt;
==SCSI Considerations ==&lt;br /&gt;
There is a way to see the SCSI devices:&lt;br /&gt;
&lt;br /&gt;
 cat /proc/scsi/scsi&lt;br /&gt;
&lt;br /&gt;
Output: &lt;br /&gt;
 Attached devices:&lt;br /&gt;
 Host: scsi8 Channel: 00 Id: 08 Lun: 00&lt;br /&gt;
   Vendor: AIC CORP Model: SAS 6G Expander  Rev: 0b05&lt;br /&gt;
   Type:   Enclosure                        ANSI  SCSI revision: 05&lt;br /&gt;
 Host: scsi8 Channel: 00 Id: 09 Lun: 00&lt;br /&gt;
   Vendor: AIC CORP Model: SAS 6G Expander  Rev: 0b05&lt;br /&gt;
   Type:   Enclosure                        ANSI  SCSI revision: 05&lt;br /&gt;
 Host: scsi8 Channel: 00 Id: 10 Lun: 00&lt;br /&gt;
   Vendor: AIC CORP Model: SAS 6G Expander  Rev: 0b05&lt;br /&gt;
   Type:   Enclosure                        ANSI  SCSI revision: 05&lt;br /&gt;
 Host: scsi8 Channel: 00 Id: 11 Lun: 00&lt;br /&gt;
   Vendor: AIC CORP Model: SAS 6G Expander  Rev: 0b05&lt;br /&gt;
   Type:   Enclosure                        ANSI  SCSI revision: 05&lt;br /&gt;
 Host: scsi8 Channel: 02 Id: 00 Lun: 00&lt;br /&gt;
   Vendor: LSI      Model: MR9286-8e        Rev: 3.29&lt;br /&gt;
   Type:   Direct-Access                    ANSI  SCSI revision: 05&lt;br /&gt;
 Host: scsi9 Channel: 02 Id: 00 Lun: 00&lt;br /&gt;
   Vendor: LSI      Model: MR9261-8i        Rev: 2.13&lt;br /&gt;
   Type:   Direct-Access                    ANSI  SCSI revision: 05&lt;br /&gt;
 Host: scsi9 Channel: 02 Id: 01 Lun: 00&lt;br /&gt;
   Vendor: LSI      Model: MR9261-8i        Rev: 2.13&lt;br /&gt;
   Type:   Direct-Access                    ANSI  SCSI revision: 05&lt;br /&gt;
 Host: scsi6 Channel: 00 Id: 00 Lun: 01&lt;br /&gt;
   Vendor: COMPELNT Model: Compellent Vol   Rev: 0602&lt;br /&gt;
   Type:   Direct-Access                    ANSI  SCSI revision: 05&lt;br /&gt;
 Host: scsi7 Channel: 00 Id: 01 Lun: 01&lt;br /&gt;
   Vendor: COMPELNT Model: Compellent Vol   Rev: 0602&lt;br /&gt;
   Type:   Direct-Access                    ANSI  SCSI revision: 05&lt;br /&gt;
 Host: scsi7 Channel: 00 Id: 02 Lun: 01&lt;br /&gt;
   Vendor: COMPELNT Model: Compellent Vol   Rev: 0602&lt;br /&gt;
   Type:   Direct-Access                    ANSI  SCSI revision: 05&lt;br /&gt;
 Host: scsi6 Channel: 00 Id: 01 Lun: 01&lt;br /&gt;
   Vendor: COMPELNT Model: Compellent Vol   Rev: 0602&lt;br /&gt;
   Type:   Direct-Access                    ANSI  SCSI revision: 05&lt;br /&gt;
&lt;br /&gt;
There is a relationship to the &amp;quot;multipath -l&amp;quot; output in terms of the vendor and model.&lt;br /&gt;
&lt;br /&gt;
There is also a rescan tool for SCSI&lt;br /&gt;
&lt;br /&gt;
 rescan-scsi-bus.sh&lt;br /&gt;
&lt;br /&gt;
Out put is a bit voluminous, but here goes:&lt;br /&gt;
&lt;br /&gt;
 Scanning SCSI subsystem for new devices&lt;br /&gt;
 Scanning host 0 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs&lt;br /&gt;
 Scanning host 1 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs&lt;br /&gt;
 Scanning host 2 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs&lt;br /&gt;
 Scanning host 3 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs&lt;br /&gt;
 Scanning host 4 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs&lt;br /&gt;
 Scanning host 5 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs&lt;br /&gt;
 Scanning host 6 for  all SCSI target IDs, all LUNs&lt;br /&gt;
 &lt;br /&gt;
 sg7 changed:  device 6 0 0 1 ...&lt;br /&gt;
 from:Direct-Access                     : 01&lt;br /&gt;
 to: Direct-Access      Model: Compellent Vol   Rev: 0602&lt;br /&gt;
       Type:   Direct-Access                    ANSI SCSI revision: 05&lt;br /&gt;
 &lt;br /&gt;
 sg10 changed: device 6 0 1 1 ...&lt;br /&gt;
 from:Direct-Access                     : 01&lt;br /&gt;
 to: Direct-Access      Model: Compellent Vol   Rev: 0602&lt;br /&gt;
       Type:   Direct-Access                    ANSI SCSI revision: 05&lt;br /&gt;
 &lt;br /&gt;
 Scanning host 7 for  all SCSI target IDs, all LUNs&lt;br /&gt;
 sg8 changed:  device 7 0 1 1 ...&lt;br /&gt;
 from:Direct-Access                     : 01&lt;br /&gt;
 to: Direct-Access      Model: Compellent Vol   Rev: 0602&lt;br /&gt;
       Type:   Direct-Access                    ANSI SCSI revision: 05&lt;br /&gt;
 &lt;br /&gt;
 sg9 changed:  device 7 0 2 1 ...&lt;br /&gt;
 from:Direct-Access                     : 01&lt;br /&gt;
 to: Direct-Access      Model: Compellent Vol   Rev: 0602&lt;br /&gt;
       Type:   Direct-Access                    ANSI SCSI revision: 05&lt;br /&gt;
 &lt;br /&gt;
 Scanning host 8 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs&lt;br /&gt;
 sg2 changed:  device 8 0 10 0 ...&lt;br /&gt;
 from:Enclosure                         : 00&lt;br /&gt;
 to: Enclosure          Model: SAS 6G Expander  Rev: 0b05&lt;br /&gt;
       Type:   Enclosure                        ANSI SCSI revision: 05&lt;br /&gt;
 &lt;br /&gt;
 sg3 changed:  device 8 0 11 0 ...&lt;br /&gt;
 from:Enclosure                         : 00&lt;br /&gt;
 to: Enclosure          Model: SAS 6G Expander  Rev: 0b05&lt;br /&gt;
       Type:   Enclosure                        ANSI SCSI revision: 05&lt;br /&gt;
 &lt;br /&gt;
 sg0 changed:  device 8 0 8 0 ...&lt;br /&gt;
 from:Enclosure                         : 00&lt;br /&gt;
 to: Enclosure          Model: SAS 6G Expander  Rev: 0b05&lt;br /&gt;
       Type:   Enclosure                        ANSI SCSI revision: 05&lt;br /&gt;
 &lt;br /&gt;
 sg1 changed:  device 8 0 9 0 ...&lt;br /&gt;
 from:Enclosure                         : 00&lt;br /&gt;
 to: Enclosure          Model: SAS 6G Expander  Rev: 0b05&lt;br /&gt;
       Type:   Enclosure                        ANSI SCSI revision: 05&lt;br /&gt;
 &lt;br /&gt;
 sg4 changed:  device 8 2 0 0 ...&lt;br /&gt;
 from:Direct-Access                     : 00&lt;br /&gt;
 to: Direct-Access      Model: MR9286-8e        Rev: 3.29&lt;br /&gt;
       Type:   Direct-Access                    ANSI SCSI revision: 05&lt;br /&gt;
 &lt;br /&gt;
 Scanning host 9 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs&lt;br /&gt;
 sg5 changed:  device 9 2 0 0 ...&lt;br /&gt;
 from:Direct-Access                     : 00&lt;br /&gt;
 to: Direct-Access      Model: MR9261-8i        Rev: 2.13&lt;br /&gt;
       Type:   Direct-Access                    ANSI SCSI revision: 05&lt;br /&gt;
 &lt;br /&gt;
 sg6 changed:  device 9 2 1 0 ...&lt;br /&gt;
 from:Direct-Access                     : 00&lt;br /&gt;
 to: Direct-Access      Model: MR9261-8i        Rev: 2.13&lt;br /&gt;
       Type:   Direct-Access                    ANSI SCSI revision: 05&lt;br /&gt;
 &lt;br /&gt;
 0 new or changed device(s) found.&lt;br /&gt;
 0 remapped or resized device(s) found.&lt;br /&gt;
 0 device(s) removed.&lt;br /&gt;
&lt;br /&gt;
Despite some mentions of changed devices, the final summary is of no changes.&lt;br /&gt;
&lt;br /&gt;
There is a pattern to the device numbered 6 however, which is always a Compellent volume.&lt;br /&gt;
&lt;br /&gt;
= Procedure =&lt;br /&gt;
&lt;br /&gt;
The rescan operation is most definitely required. Both Red Hat and Ubuntu guides give the same method of doing this&lt;br /&gt;
 # echo 1 &amp;gt; /sys/block/device_name/device/rescan&lt;br /&gt;
&lt;br /&gt;
However, under /sys/block/dm-6, there is no device subdirectory, and, needless to say, no rescan file. Mind, this is for SCSI.&lt;br /&gt;
&lt;br /&gt;
Other sites repeat the recipe ad nauseam. There is no mention about whether this can in fact be done live.&lt;br /&gt;
&lt;br /&gt;
== Breakthrough ==&lt;br /&gt;
&lt;br /&gt;
Here is the raw recipe:&lt;br /&gt;
 # echo 1 &amp;gt; /sys/block/&amp;lt;device_name&amp;gt;/device/rescan &lt;br /&gt;
 # multipathd -k&amp;#039;resize map mpatha&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The realisation is that the device name is not &amp;#039;&amp;#039;&amp;#039;dm-6&amp;#039;&amp;#039;&amp;#039;, and there could be more than one device. Namely, the sd{d,e,f,g} mentioned in the &amp;quot;multipath -l&amp;quot; command are the referred-to &amp;#039;&amp;#039;devices&amp;#039;&amp;#039;. This becomes clear when we see that each have a &amp;#039;&amp;#039;&amp;#039;device/rescan&amp;#039;&amp;#039;&amp;#039; file which is write-only (we noted above that dm-6 has no such directory nor file). Also, attempts to create such a path/rescan directory and file in &amp;#039;&amp;#039;&amp;#039;/sys/block/dm-6&amp;#039;&amp;#039;&amp;#039; were fruitless. Therefore &amp;#039;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;#039; wa echo&amp;#039;d to each of the four &amp;#039;&amp;#039;&amp;#039;rescan&amp;#039;&amp;#039;&amp;#039; files in the &amp;#039;&amp;#039;&amp;#039;device&amp;#039;&amp;#039;&amp;#039; subdirectory of &amp;#039;&amp;#039;&amp;#039;/sys/block/sd{d,e,f,g}&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This was accepted. Then came the resize command in the multipath interpreter. This returned a &amp;quot;fail&amp;quot;. This is because &amp;#039;&amp;#039;&amp;#039;mpatha&amp;#039;&amp;#039;&amp;#039; is a placeholder (recipe was mute about this) and that it should be replaced with the target map in your own configuration. In the interpreter&lt;br /&gt;
 show maps&lt;br /&gt;
will offer the name of the map whihc is marvin&amp;#039;s case was &amp;#039;&amp;#039;&amp;#039;mapthd&amp;#039;&amp;#039;&amp;#039;. So,  to resize, the command really is&lt;br /&gt;
&lt;br /&gt;
 multipathd -k&amp;#039;resize map mpathd&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This returned a positive message, and finally &amp;quot;multipath -l&amp;quot; gave the new size as 56T, hurrah.&lt;br /&gt;
&lt;br /&gt;
The next thing that has to be done is extend the logical volumes and grow the XFS.&lt;br /&gt;
&lt;br /&gt;
== LVM ==&lt;br /&gt;
A quick &amp;#039;&amp;#039;&amp;#039;pvscan&amp;#039;&amp;#039;&amp;#039; will reveal that the &amp;#039;&amp;#039;&amp;#039;/dev/mapper/mpathd&amp;#039;&amp;#039;&amp;#039; device has no free space on it. So the extra 6TB has not been recognised? Well, it&amp;#039;s because the PV needs to be resized. This can be done with:&lt;br /&gt;
&lt;br /&gt;
 pvresize /dev/mapper/mpathd&lt;br /&gt;
&lt;br /&gt;
This will show how one PV was resized and 0 were not changed (unusually phrased message), and a quick pvscan will show that the PV now has 6TB extra space. Next up is the logical volume .. this must be extended into newly resized PV. This is done with the follwong command:&lt;br /&gt;
&lt;br /&gt;
 lvextend /dev/STORAGE/storage /dev/mapper/mpathd&lt;br /&gt;
&lt;br /&gt;
== XFS ==&lt;br /&gt;
&lt;br /&gt;
xfs is very easy to resize and can famously be done while filesystem is already mounted.&lt;br /&gt;
&lt;br /&gt;
 xfs_growfs /dev/STORAGE/storage&lt;br /&gt;
&lt;br /&gt;
This command returned extremely quickly and showed that the filesystem had been resize from 50T to 56T. Mission accomplished!&lt;br /&gt;
&lt;br /&gt;
= Summary of successful operation =&lt;br /&gt;
&lt;br /&gt;
 echo 1 &amp;gt; /sys/block/sdd/device/rescan &lt;br /&gt;
 echo 1 &amp;gt; /sys/block/sde/device/rescan&lt;br /&gt;
 echo 1 &amp;gt; /sys/block/sdf/device/rescan &lt;br /&gt;
 echo 1 &amp;gt; /sys/block/sdg/device/rescan &lt;br /&gt;
 multipathd -k&amp;#039;resize map mpathd&amp;#039;&lt;br /&gt;
 pvresize /dev/mapper/mpathd&lt;br /&gt;
 lvextend /dev/STORAGE/storage /dev/mapper/mpathd&lt;br /&gt;
 xfs_growfs /dev/STORAGE/storage&lt;br /&gt;
&lt;br /&gt;
= Links=&lt;br /&gt;
&lt;br /&gt;
Both of these are almost the same, but clearly the RedHat was hte preferred reference.&lt;br /&gt;
&lt;br /&gt;
* [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html-single/DM_Multipath/ Red Hat DM-Multipath guide]&lt;br /&gt;
* [https://help.ubuntu.com/lts/serverguide/multipath-admin-and-troubleshooting.html ubuntu troubleshooting guide to DM-Multipath]&lt;br /&gt;
&lt;br /&gt;
This turned out to be not so relevant, included here for interest&amp;#039;s sake:&lt;br /&gt;
&lt;br /&gt;
* [http://kb.kristianreese.com/index.php?View=entry&amp;amp;EntryID=127 Kristian Reese&amp;#039;s LUN solution]&lt;/div&gt;</summary>
		<author><name>Jw297</name></author>	</entry>

	</feed>