Lvm

From Do you speak Drupalish? Featured Drupal wiki-like documentation
Jump to: navigation, search

Steps

Setup

Via https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html-single/Logical_Volume_Manager_Administration/index.html#physical_volumes

  • LVM allows you to create physical volumes out of disk partitions. Red Hat recommends that you create a single partition that covers the whole disk to label as an LVM physical volume for the following reasons:''
    • Administrative convenience It is easier to keep track of the hardware in a system if each real disk only appears once. This becomes particularly true if a disk fails. In addition, multiple physical volumes on a single disk may cause a kernel warning about unknown partition types at boot.
    • Striping performance LVM cannot tell that two physical volumes are on the same physical disk. If you create a striped logical volume when two physical volumes are on the same physical disk, the stripes could be on different partitions on the same disk. This would result in a decrease in performance rather than an increase.
  • MyChoice /boot and swap seaprate, the rest single physical_volumes+ volume group + multiple logical volume, on top on RAID1, ( / first at anaconda, the rest from cli)

Pro

  • The LVM (Logical Volume Manager) file system has the ability to create a snapshot of a disk partition which doesn't change while it is being backed up. The snapshot doesn't interfere with the running VM because it is instant. https://wiki.centos.org/HowTos/BackupKVMGuest

Commands

Display

  • pvdisplay, vgdisplay, lvdisplay

Resize