Logical Volume Management (LVM)

From RHS Wiki
Revision as of 09:35, 7 June 2018 by Rafahsolis (talk | contribs)
Jump to navigation Jump to search

https://www.howtoforge.com/linux_lvm

Creating LVMs

  • Partition disks as Linux LVM with fdisk
  • Prepare new partitions for LVM Example:
pvcreate /dev/sdb1 /dev/sdc1 /dev/sde1  # pvremove /dev/sdb1 /dev/sdc1 /dev/sde1 to revert
pvdisplay                               # to show Physycal volumenes
  • Create a volume group example 'pilaf':
 vgcreate pilaf /dev/sdg1 /dev/sdf1  # vgremove pilaf to delete
  • Check existing Volume Groups
vgdisplay
vgscan
  • Create logical volumes in volume group
lvcreate --name pilaf_copy --size 4T pilaf
lvcreate --name pilaf_converter --size 4T pilaf
  • Check existing logical volumes with:
lvdisplay
  • Rename logical volumes with
lvrename {volume_group} {old_name} {new_name}  | example: lvrename pilaf pilaf_copy pilaf_raw