Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux_wiki:create_and_remove_physical_volumes_assign_physical_volumes_to_volume_groups_and_create_and_delete_logical_volumes [2016/02/29 21:31] billdozor created |
linux_wiki:create_and_remove_physical_volumes_assign_physical_volumes_to_volume_groups_and_create_and_delete_logical_volumes [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
**General Information** | **General Information** | ||
- | About this page/ | + | Working with logical volumes. |
---- | ---- | ||
+ | |||
+ | ===== Partition Setup ===== | ||
Parition that is prepared for type LVM (8e00) | Parition that is prepared for type LVM (8e00) | ||
Line 17: | Line 19: | ||
w | w | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Physical Volumes ===== | ||
Create physical volume | Create physical volume | ||
Line 22: | Line 28: | ||
pvcreate /dev/sdb1 | pvcreate /dev/sdb1 | ||
</ | </ | ||
+ | |||
+ | \\ | ||
+ | Summary of physical volumes | ||
+ | <code bash> | ||
+ | pvs | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | Full display of physical volumes | ||
+ | <code bash> | ||
+ | pvdisplay | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Volume Groups ===== | ||
Assign physical volume to new volume group | Assign physical volume to new volume group | ||
Line 28: | Line 50: | ||
</ | </ | ||
+ | \\ | ||
Assign physical volume to existing volume group | Assign physical volume to existing volume group | ||
<code bash> | <code bash> | ||
vgextend vglocal /dev/sdb1 | vgextend vglocal /dev/sdb1 | ||
</ | </ | ||
+ | |||
+ | \\ | ||
+ | Summary of volume groups | ||
+ | <code bash> | ||
+ | vgs | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | Full display of volume groups | ||
+ | <code bash> | ||
+ | vgdisplay | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Logical Volumes ===== | ||
Create logical volume | Create logical volume | ||
Line 38: | Line 77: | ||
</ | </ | ||
- | Create filesystem and mount logical | + | \\ |
+ | Summary of logical | ||
<code bash> | <code bash> | ||
- | mkfs -t xfs / | + | lvs |
- | mount / | + | |
</ | </ | ||
- | Display physical volumes, volume groups, or logical volumes | + | \\ |
+ | Full display of logical volumes | ||
<code bash> | <code bash> | ||
- | pvdisplay | ||
vgdisplay | vgdisplay | ||
- | lvdisplay | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== File System and Mounting ===== | ||
+ | |||
+ | Create filesystem and mount logical volume | ||
+ | <code bash> | ||
+ | mkfs -t xfs / | ||
+ | mount / | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Removals ===== | ||
Delete logical volume | Delete logical volume | ||
Line 56: | Line 108: | ||
</ | </ | ||
+ | \\ | ||
+ | Remove a physical volume (/dev/sdb1) from a volume group (vglocal) | ||
+ | <code bash> | ||
+ | vgreduce vglocal /dev/sdb1 | ||
+ | </ | ||
+ | |||
+ | \\ | ||
Delete volume group | Delete volume group | ||
<code bash> | <code bash> | ||
Line 61: | Line 120: | ||
</ | </ | ||
+ | \\ | ||
Remove physical volume | Remove physical volume | ||
<code bash> | <code bash> |