Steps to Mount an LVM Partition on a Linux System

  
                

LVM partitions are generally found in U disk, Linux systems access these partitions through the U disk. If you want Linux to access these partitions directly, you can mount them directly on a Linux system. This article will introduce the method of mounting these partitions on a Linux system.

LVM is a logical volume management tool that allows you to manage disk space using the concepts of logical volumes and volume groups. The biggest benefit of using LVM over traditional partitions is the flexibility to allocate space for users and programs regardless of the size of each physical disk.

In LVM, the physical storage that created the logical partition is a traditional partition (for example: /dev/sda2, /dev/sdb1). These partitions must be initialized to “ physical volume PV” plus the volume label (eg, "Linux LVM") to make them available in LVM. Once the partition is marked as being partitioned by LVM, you cannot mount it directly with the mount command.

If you try to mount an LVM partition (such as /dev/sdb2), you will get the following error.

$ mount /dev /sdb2 /mnt mount: unknown filesystem type & lsquo; LVM2_member & rsquo;

To properly mount the LVM partition, you must mount the partition created in & ldquo; Logical volume”. Here's how to do it.

First, check the available volume groups with the following command:

$ sudo pvs PV VG Fmt Attr PSize PFree /dev/sdb2 vg_ezsetupsystem40a8f02fadd0 lvm2 a-- 237.60g 0

The name of the physical volume and the name of the volume group are below the PV and VG columns, respectively. In this case, there is only one group created under dev/sdb2 “vg_ezsetupsystem40a8f02fadd0”.

Next, check the logical volume that exists in the volume group, use the lvdisplay command:

$ sudo lvdisplay "volume-group-name"

Use lvdisplay to display the available volumes Information (eg device name, volume name, volume size, etc.).

$ sudo lvdisplay /dev/vg_ezsetupsystem40a8f02fadd0

--- Logical volume ---

LV Path /dev/vg_ezsetupsystem40a8f02fadd0/lv_root

LV Name lv_root

VG Name vg_ezsetupsystem40a8f02fadd0

LV UUID imygta-P2rv-2SMU-5ugQ-g99D-A0Cb-m31eet

LV Write Access read/write

LV Creation Host, time livecd.centos, 2015-03-16 18:38:18 -0400

LV Status available

# open 0

LV Size 50.00 GiB

Current LE 12800

Segments 1

Allocation inherit

Read ahead sectors auto

- currently set to 256

Block Device 252:0 Previous12Next page Total 2 pages

Copyright © Windows knowledge All Rights Reserved