linux_wiki:extend_existing_logical_volumes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux_wiki:extend_existing_logical_volumes [2016/02/29 21:37]
billdozor created
linux_wiki:extend_existing_logical_volumes [2019/05/25 23:50] (current)
Line 3: Line 3:
 **General Information** **General Information**
  
-About this page/how-to/script+Expanding existing logical volumes non-destructively
  
 ---- ----
  
-==== Basic LVM Setup ====+===== Basic LVM Setup =====
  
 **Create single partition on a new disk** **Create single partition on a new disk**
Line 19: Line 19:
 </code> </code>
  
 +\\
 **Create physical volume** **Create physical volume**
 <code bash> <code bash>
Line 25: Line 26:
 </code> </code>
  
 +\\
 **Create volume group** **Create volume group**
 <code bash> <code bash>
Line 31: Line 33:
 </code> </code>
  
 +\\
 **Create logical volume** **Create logical volume**
 <code bash> <code bash>
Line 37: Line 40:
 </code> </code>
  
 +\\
 **Create XFS Filesystem** **Create XFS Filesystem**
 <code bash> <code bash>
Line 42: Line 46:
 </code> </code>
  
 +\\
 **Mount the volume** **Mount the volume**
 <code bash> <code bash>
Line 50: Line 55:
 ---- ----
  
-==== Extend a volume group ====+===== Extend a volume group =====
  
 **Create a partition on a new disk** **Create a partition on a new disk**
Line 58: Line 63:
 </code> </code>
  
 +\\
 **Create physical volume from created partition** **Create physical volume from created partition**
 <code bash> <code bash>
Line 63: Line 69:
 </code> </code>
  
 +\\
 **Extend the "vglocal" volume group and verify** **Extend the "vglocal" volume group and verify**
 <code bash> <code bash>
 vgextend vglocal /dev/sdc1 vgextend vglocal /dev/sdc1
-vgdisplay+pvs
 </code> </code>
  
 ---- ----
  
-==== Move physical extents ==== 
  
-**Move physical extents off /dev/sdb1** 
-<code bash> 
-pvmove /dev/sdb1 
-OR 
-pvmove /dev/sdb1 /dev/sdc1 
-</code> 
- 
-**Remove /dev/sdb1 from volume group** 
-<code bash> 
-vgreduce vglocal /dev/sdb1 
-</code> 
- 
----- 
  
 ==== Extend a logical volume ==== ==== Extend a logical volume ====
Line 91: Line 84:
 **Extend volume to be 30G in size(from 20G original)** **Extend volume to be 30G in size(from 20G original)**
 <code bash> <code bash>
-lvextend -L 30G /dev/vglocal/lvstorage+lvextend -L 30G --resizefs /dev/vglocal/lvstorage
 OR OR
-lvextend -L +10G /dev/vglocal/lvstorage+lvextend -L +10G --resizefs /dev/vglocal/lvstorage
 </code> </code>
-  * df -h shows that filesystem still needs to be resized to fill the LV container+  * df -h shows that filesystem still needs to be resized to fill the LV container (if you did not use "--resizefs")
  
-**Resize the filesystem**+\\ 
 +**Resize the filesystem - if you did NOT use the "--resizefs" option above**
 <code bash> <code bash>
 xfs_growfs /dev/vglocal/lvstorage xfs_growfs /dev/vglocal/lvstorage
  • linux_wiki/extend_existing_logical_volumes.1456799842.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)