linux_wiki:create_and_remove_physical_volumes_assign_physical_volumes_to_volume_groups_and_create_and_delete_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: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/how-to/script+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
 </code> </code>
 +
 +----
 +
 +===== Physical Volumes =====
  
 Create physical volume Create physical volume
Line 22: Line 28:
 pvcreate /dev/sdb1 pvcreate /dev/sdb1
 </code> </code>
 +
 +\\
 +Summary of physical volumes
 +<code bash>
 +pvs
 +</code>
 +
 +\\
 +Full display of physical volumes
 +<code bash>
 +pvdisplay
 +</code>
 +
 +----
 +
 +===== Volume Groups =====
  
 Assign physical volume to new volume group Assign physical volume to new volume group
Line 28: Line 50:
 </code> </code>
  
 +\\
 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
 </code> </code>
 +
 +\\
 +Summary of volume groups
 +<code bash>
 +vgs
 +</code>
 +
 +\\
 +Full display of volume groups
 +<code bash>
 +vgdisplay
 +</code>
 +
 +----
 +
 +===== Logical Volumes =====
  
 Create logical volume Create logical volume
Line 38: Line 77:
 </code> </code>
  
-Create filesystem and mount logical volume+\\ 
 +Summary of logical volumes
 <code bash> <code bash>
-mkfs -t xfs /dev/mapper/vglocal-lvhome +lvs
-mount /dev/mapper/vglocal-lvhome /home+
 </code> </code>
  
-Display physical volumes, volume groups, or logical volumes+\\ 
 +Full display of logical volumes
 <code bash> <code bash>
-pvdisplay 
 vgdisplay vgdisplay
-lvdisplay 
 </code> </code>
 +
 +----
 +
 +===== File System and Mounting =====
 +
 +Create filesystem and mount logical volume
 +<code bash>
 +mkfs -t xfs /dev/mapper/vglocal-lvhome
 +mount /dev/mapper/vglocal-lvhome /home
 +</code>
 +
 +----
 +
 +===== Removals =====
  
 Delete logical volume Delete logical volume
Line 56: Line 108:
 </code> </code>
  
 +\\
 +Remove a physical volume (/dev/sdb1) from a volume group (vglocal)
 +<code bash>
 +vgreduce vglocal /dev/sdb1
 +</code>
 +
 +\\
 Delete volume group Delete volume group
 <code bash> <code bash>
Line 61: Line 120:
 </code> </code>
  
 +\\
 Remove physical volume Remove physical volume
 <code bash> <code bash>
  • linux_wiki/create_and_remove_physical_volumes_assign_physical_volumes_to_volume_groups_and_create_and_delete_logical_volumes.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)