Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
linux_wiki:extend_existing_logical_volumes [2016/03/03 21:54] billdozor [Basic LVM Setup] |
linux_wiki:extend_existing_logical_volumes [2016/03/03 22:00] billdozor [Extend a volume group] |
||
---|---|---|---|
Line 55: | 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 63: | Line 63: | ||
</ | </ | ||
+ | \\ | ||
**Create physical volume from created partition** | **Create physical volume from created partition** | ||
<code bash> | <code bash> | ||
Line 68: | Line 69: | ||
</ | </ | ||
+ | \\ | ||
**Extend the " | **Extend the " | ||
<code bash> | <code bash> | ||
vgextend vglocal /dev/sdc1 | vgextend vglocal /dev/sdc1 | ||
- | vgdisplay | + | pvs |
</ | </ | ||
---- | ---- | ||
- | ==== Move physical extents ==== | ||
- | **Move physical extents off /dev/sdb1** | ||
- | <code bash> | ||
- | pvmove /dev/sdb1 | ||
- | OR | ||
- | pvmove /dev/sdb1 /dev/sdc1 | ||
- | </ | ||
- | |||
- | **Remove /dev/sdb1 from volume group** | ||
- | <code bash> | ||
- | vgreduce vglocal /dev/sdb1 | ||
- | </ | ||
- | |||
- | ---- | ||
==== Extend a logical volume ==== | ==== Extend a logical volume ==== | ||
Line 96: | 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 / | + | lvextend -L 30G --resizefs |
OR | OR | ||
- | lvextend -L +10G / | + | lvextend -L +10G --resizefs |
</ | </ | ||
* 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 | ||
- | **Resize the filesystem** | + | \\ |
+ | **Resize the filesystem | ||
<code bash> | <code bash> | ||
xfs_growfs / | xfs_growfs / |