Understand LVM

This is a flexible hard disk partition, which is suitable for the production system and can be expanded without shutdown In short, there are many benefits.

  • PE

    The smallest management unit. The default unit is 4MB

  • PV

    A plate is a PV

  • VG

    One or more PVS form a VG, which is equivalent to a set of all customizations (of course, multiple sets can also be defined)

  • LV

    A space is divided from VG for mounting.

Related commands

LVM front

The drive letter format needs to be modified to LVM (fdisk / dev / SD?)

  • View disk

    fdisk -l
  • Disk modification format

    fdisk /dev/sd??

PV related commands

  • see

    #View in list form
    #View details
  • establish

    pvcreate /dev/sd??
  • delete

    Precondition: the VG has been removed from the VG

    pvremove /dev/sd??

VG related commands

  • see

    #List view VG brief information
    #View VG details
  • establish

    Vgcreate VG name / dev / sdb1 / dev / sdb2
  • extend

    Vgextend VG name / dev / sdb1
  • delete


LV related commands

  • see

    #View list brief information
    #View details
  • establish

    Create a new LV
    Lvcreate - N LV name - L? G VG name
    Format LV
    Mkfs - t ext4 or XFS LV path
  • extend

    lvextend -L +300G /dev/mapper/centos-root
  • delete


Path directory of Mount LV

Recommended Today

First knowledge of Hadoop architecture

Get to know Hadoop Google’s “troika”“ GFS MapReduce BigTable HDFS HDFSWhat is it? HDFSIt is a distributed file system based on streaming data access mode. It supports the storage of massive data and allows users to form storage clusters with hundreds of computers. Advantages: it can handle large files, support streaming data access (write once, […]