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

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]
Line 1: Line 1:
-====== Create And Remove Physical Volumes Assign Physical Volumes To Volume Groups And Create And Delete Logical Volumes ====== 
- 
-**General Information** 
- 
-About this page/how-to/script.  
- 
----- 
- 
-Parition that is prepared for type LVM (8e00) 
-<code bash> 
-gdisk /dev/sdb 
-n 
-Partition number: 1 
-First sector: default 
-Last sector: +30G 
-Hex code type: 8e00 
-w 
-</code> 
- 
-Create physical volume 
-<code bash> 
-pvcreate /dev/sdb1 
-</code> 
- 
-Assign physical volume to new volume group 
-<code bash> 
-vgcreate vglocal /dev/sdb1 
-</code> 
- 
-Assign physical volume to existing volume group 
-<code bash> 
-vgextend vglocal /dev/sdb1 
-</code> 
- 
-Create logical volume 
-<code bash> 
-lvcreate --name lvhome --size 30G vglocal 
-</code> 
- 
-Create filesystem and mount logical volume 
-<code bash> 
-mkfs -t xfs /dev/mapper/vglocal-lvhome 
-mount /dev/mapper/vglocal-lvhome /home 
-</code> 
- 
-Display physical volumes, volume groups, or logical volumes 
-<code bash> 
-pvdisplay 
-vgdisplay 
-lvdisplay 
-</code> 
- 
-Delete logical volume 
-<code bash> 
-lvremove /dev/mapper/vglocal-lvhome 
-</code> 
- 
-Delete volume group 
-<code bash> 
-vgremove vglocal 
-</code> 
- 
-Remove physical volume 
-<code bash> 
-pvremove /dev/sdb1 
-</code> 
- 
----- 
  
  • 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)