How to Use logical volume manager: LVM

Source: Internet
Author: User

Preface:If you are lucky to be seen by a friend and find something wrong in this article, you may want to criticize and correct it. If you have any questions, we hope you can discuss them together.

What is LVM?

LVM is short for logical volume manager (logical volume manger) and a disk management tool. LVM can integrate multiple disks or disk partitions to make these disks or partitions look like a single disk. The main advantage of LVM is that it can flexibly adjust the capacity of the file system. For more information, see


To better demonstrate the LVM implementation process, we first add three disks with a size of 10 Gb, 10 Gb, and 40 GB to the virtual machine. The procedure is as follows:

1. Click VM-> Settings on the tool menu bar or press Ctrl + D, as shown in 1;

650) This. width = 650; "src =" "Title =" Figure 1 "alt =" wKioL1PKdqTiwaAZAAIOyT-vGaY862.jpg "/>

2. Click Add in the displayed window, as shown in 2;

650) This. width = 650; "src =" "Title =" Figure 2 "alt =" wkiol1pkpl1_alaagow0jdl000004.jpg "/>

3. Select hard disk in the displayed window and click Next, as shown in 3;

650) This. width = 650; "src =" "Title =" Figure 3 "alt =" wkiol1pkvv_by6ekaafmpxnbfrw498.jpg "/>

4. Click Next on the basis of the previous step until the window shown in Figure 4 is displayed, enter and select as shown in figure 4, and click Next;

650) This. width = 650; "src =" "Title =" Figure 4 "alt =" wkiol1pkp_ej9xndaaewfpinzye677.jpg "/>

5. Click Finish to add a 10 GB disk.

Tip: add 10 GB and 40 Gb disks respectively from step 2 to Step 5.

Note: If the system has been started before the disk is added, the added disk will be valid only after the system is restarted.

LVM implementation process

It seems difficult to use LVM to manage disks, but it is very simple in the actual production process. 5 shows the implementation flowchart of each LVM component.

650) This. width = 650; "src =" "Title =" Figure 5 "alt =" wkiol1pkq3lh2_toaamzvk4jj9o483.jpg "/>

The following describes the phases in the flowchart:

Tip: the following uses two 10 Gb disks for LVM implementation demonstration. Therefore, you do not need to partition the disks. In the next section, we will partition the 40 GB disk and then demonstrate the LVM implementation process.

1. directly create two 10 Gb disks as PV for LVM demonstration (Partitions are not required.):

1. Create a PV stage (directly enter the PV stage because no partition operation is required); 650) This. width = 650; "src =" "Title =" Figure 6 "alt =" wkiom1pkvifqvcpmaaiwcnako90252.jpg "/>

2. Create the VG stage;

650) This. width = 650; "src =" "Title =" Figure 7 "alt =" wKiom1PKe7Ciz-B5AAGnIkmhxgk562.jpg "/>

3, LV stage; 650) This. width = 650; "src =" "Title =" Fig 8 "alt =" wkiom1pkucmbwujoaahv9ikcfrg939.jpg "/>

4. Create and mount a file system;

650) This. width = 650; "src =" "Title =" Fig 9 "alt =" wkiol1pkfamz08ziaaldfm3a9nc989.jpg "/>

5. Use the mounted file system;

650) This. width = 650; "src =" "Title =" Figure 10 "alt =" wkiol1pkvhlsyxydaappy1_vog446.jpg "/>

6. Expand the LV capacity. 650) This. width = 650; "src =" "Title =" Fig 11 "alt =" wkiom1pkeeezltswaawz7qw48mk980.jpg "/>

7. Reduce the LV capacity. 650) This. width = 650; "src =" "Title =" Fig 12 "alt =" wkiol1pkey2q40wjaan6mpc3xfe809.jpg "/> 650) This. width = 650; "src =" "Title =" Figure 13 "alt =" wkiom1pkeklrsrh4aarmfftfs54630.jpg "/>

Ii. Perform LVM demonstration After partitioning a 40 GB disk (Partitions required):


How to Use logical volume manager: LVM

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.