A Objective
Each Linux consumer will encounter this dilemma when installing Linux: How to accurately evaluate and allocate the capacity of each hard disk partition when partitioning the system , as system Management Not only takes into account the capacity required for a particular partition, but also anticipates the maximum capacity that may be required later in the partition. Because if the estimate is inaccurate, the administrator may even want to back up the entire system, clear the hard disk, re-partition the hard disk, and then restore the data to the new partition when a partition is not sufficient.
While there are a lot of dynamic disk-tuning tools available, such as partationmagic and so on, it does not solve the problem completely, because one partition may be exhausted again, another is the need to reboot the system to achieve, for many critical servers, downtime is unacceptable, And for adding a new hard disk, if you want a file system that spans multiple hard drives, the partition tuning program does not solve the problem.
Therefore, the perfect solution should be in the 0 downtime under the premise of the size of the file system can be easily adjusted to facilitate the implementation of the file system across different disks and partitions. Fortunately, the Logical Disk volume management (lvm,logicalvolumemanager) mechanism provided by Linux is a perfect solution.
LVM is the abbreviation for Logical Disk volume management (logicalvolumemanager), which is a mechanism for managing disk partitions in a Linux environment, and LVM is a logical layer built on hard disks and partitions to improve the flexibility of disk partition management. The LVM system administrator makes it easy to manage disk partitions, such as connecting several disk partitions to a single block of volume group (volumegroup), forming a storage pool. Administrators can create logical volume groups (logicalvolumes) at will on a volume group and further create file systems on logical volume groups. The administrator can easily adjust the size of the storage volume group through LVM, and the disk storage can be named, managed and assigned as a group, for example, "development" and "sales", instead of using the physical disk name "SDA" and "SDB". And when a new disk is added to the system, the LVM administrator does not have to move the disk's files to the new disk to take full advantage of the new storage space, but instead directly extend the file system across the disk.
two. Introduction to LVM
LVM (Logical Volume Manager, Logical Volume manager) is a way to allocate hard disk drive space into logical volumes so that the hard disk does not have to use partitions and can be simply re-sized. Traditionally, a partition size is static. If a user has no space on this partition, he either repartitioning (which may require the entire operating system to reload) or use the assembler like a symbolic link. With LVM, the hard drive or hard drive collection is assigned to one or more physical volumes (physical Volume). Physical volumes are combined into logical volume groups (Logical Volume Group), with the only exception being the/boot partition. Because a physical volume cannot span more than one drive, if you want the logical volume group to span more than one drive, you should create one or more physical volumes on the drive. Logical volume groups are divided into logical volumes, which are assigned mount points (such as/home and/), as well as file system types (such as ext3). When "Partitions" reach their limits, free space in logical volume groups can be added to logical volumes to increase the size of the partitions. When a new hard drive is added to the system, it can also be added to the logical volume group, which is a partition that can be extended. Because LVM allows logical volumes to be created outside the physical storage resources of the machine, logical volumes in logical volume groups are extensible partitions. Because LVM allows logical volumes to be created outside of the machine's physical storage resources, and logical volumes can be scaled and scaled down while the system is still running, Linux system administrators are given the memory flexibility they crave.
The role of LVM: The actual operation of LVM differs according to the practice. However, LVM typically consists of entity storage grouping (physical Storage Grouping), resetting the logical sector size (Logical Volume resizing), and data transfer.
Three Why use LVM
For Linux users, one of the problems encountered when installing a Linux machine is to estimate and allocate enough hard disk space for each partition. This is a very common problem for a system administrator who is looking for space for the server, or for a normal user who is about to run out of disk. Generally we will think of the solution is:
Hook up a new hard disk, and then use the symbolic link to link to the new hard disk. Use a number of tools to resize partitions to damage data.
However, these are only temporary solutions, and all require that the machine be stopped or the partition work for a long time can cause the service not to be served properly. Even if you mitigate the problem with hard disk space, you'll still face the same problem soon.
For a large site, with a number of customers, but also connected to the Internet, the server shutdown for a minute, will bring a great loss to the company. In addition, with this method, the system must be restarted every time after the partition table has been modified. Using the new technology LVM (logical Volume management program) can help us solve these problems.
Four. The history of LVM
Of course, LVM is not the latest technology, as early as in the UNIX operating system era, on like HP, IBM Aix can see the figure of the VM, as IBM's flagship product, AIX very early support for dynamic logical partition (DVM), of course, its DVM design is very strong, and then in Aix 5L, The UNIX kernel has been refactored, adding features such as logical volume Management (LVM) and log file System (JFS). Make AIX more powerful. In a variety of commercial UNIX systems, such as AIX, Hp-unix, Tru64 UNIX and other systems, logical volume management has been widely adopted, becoming a de facto standard.
The functionality of LVM is supported in the 2.3 kernel development version. In January 2001, the Linux2.4.0 kernel was released and began to formally support logical volume management, making the new Linux kernel more adaptable to server applications. Previous versions of Linux had to be patched on the kernel to implement LVM functionality. Now we see that LVM has been supported at the kernel level starting from Redhat Linux 9.0. Therefore, we can use LVM to help us manage disks more efficiently. It is important to note that LVM has two versions, LVM 1 and LVM 2, and there are some differences between the tools and settings, this article uses the LVM 2 environment introduction. The LVM 1 command works only on the 2.4 core. You cannot use the LVM 1 command when running the 2.6 kernel. For more information on LVM 2, please see/usr/share/doc/lvm2*/whats_new. A complete LVM 2 command is installed under/usr/sbin/. In the/usr/invalid startup environment, you need to add/sbin/lvm.static (for example,/sbin/lvm.static vgchange-ay) before each command. In A/USR-valid environment, it is no longer necessary to precede each command with LVM (for example,/USR/SBIN/LVM Vgchage–ay to/usr/sbin/vgchange-ay). The new LVM2 command (for example,/usr/sbin/vgchange–ay and/sbin/lvm.static Vgchange–ay) detects if you are running the 2.4 kernel. If it is, it will call the old LVM 1 command.
Five. LVM Structure and classification
LVM is the short name for Logical Disk volume management (Logical Volume Manager), a mechanism for managing disk partitions in a Linux environment, which aggregates multiple physical partitions into a volume group (Volume Group), and these physical volumes can vary in size. Even types can be different (such as SCSI, SATA disks). A volume group consists of a large hard disk and then splits a piece of logical volume (Logical Volume) and further creates the file system on the logical volume group, as shown in.
The greatest advantage of LVM is that it is different to consider the characteristics of the physical disk, the middle of a layer of "insulating layer", or a modern noun, called the service layer, to provide disk space services. Without this middle tier, there is bound to be a physical disk size limit, which is insurmountable fact, the partition on this disk is bound to be constrained by physical conditions, storage data is very inconvenient. In a computer with only a 100MB disk age, this is not a big problem, LVM design at the beginning of the realization of the nature of human laziness, in terms of performance, manageability, compatibility, functional support, etc., achieve a good balance.
LVM supports two modes of logical volumes, as shown in. One is the concatenation mode (concatenation) and the other is the Ribbon mode (Striping), and the system defaults to serial mode. What is the difference between these two modes? For example, there are two IDE interfaces for 30GB hard disks/dev/hdb,/DEV/HDC, which together form a volume group VG1, which creates a 40GB logical volume LV1 on this volume group. If this logical volume is in serial mode, the data is stored sequentially on both hard drives, and only when one hard disk is full does it go to another drive. If the logical volume is a ribbon pattern, the data will be split into a fixed-size bar, and then dispersed to two hard disks. This means that you have more effective disk bandwidth and the data reads and writes faster. The ribbon pattern, while bringing us high performance, also poses a high risk that if any piece of disk is broken, all of the logical volumes will be lost, and the result would be catastrophic. However, LVM technology has long been a precaution against this catastrophe. The implementation of LVM can be implemented not only on disk partitions, but also on RAID volumes. Both hard disk RAID and software RAID,LVM are very well supported.
Six. Snapshots(snapshot) feature of LVM
LVM provides a very good feature: Snapshots (snapshot). It allows an administrator to set up a block device: The device is an exact copy of a logical volume that freezes at some point. This feature is typically used for batch processes (such as backups) that require processing of logical volumes, but cannot stop the system. When the operation is complete, the snapshots (snapshot) device can be removed. This feature requires that the logical volume be in a compatible state when the snapshots (snapshot) device is established. Using LVM, we can take a snapshot of the LV moment, then mount it and back it up. Please note that snapshots are not permanent. If you remove LVM or reboot, they are lost and need to be recreated. is an LVM snapshots (snapshot).
Snapshots are available in two ways: one is read-only and the other is read-write. If you just copy the data, the read-only snapshot looks good, but there are several advantages to reading and writing the snapshot. First, there is no need to process the log file system-you can simply implement log recovery on the snapshot. A read-only snapshot must ensure that the file system synchronizes with the device before it starts the snapshot, and therefore requires a log replay.
Seven. Common terminology for LVM
1 . Physical storage media (the physical media)
This refers to the storage device of the system: the partition on the hard disk or hard disk, such as:/DEV/HDA1,/DEV/SDA, etc., is the storage unit of the lowest layer of storage system.
2 . Physical volume (physical Volume, PV)
A physical volume is a partition of a hard disk or a device that logically has the same function as a disk partition (for example, RAID), which is the basic storage logic block of LVM, but is compared to basic physical storage media (such as partitions, disks, etc.) and contains management parameters related to LVM.
3 . Volume Group (Volume group, VG)
The highest level of abstraction in LVM, consisting of one or more physical volumes. You can have only one volume group in a logical volume management system, or you can have multiple volume groups. LVM volume groups are similar to physical hard disks in non-LVM systems, which consist of physical volumes.
4 . Logical volumes (Logical Volume, LV)
LVM logical volumes are similar to hard disk partitions in non-LVM systems, and file systems (such as/home or/usr) can be created on top of logical volumes. Multiple logical volumes in a system can belong to the same volume group, or they can belong to different volume groups.
5 . PE(physical Extent, PE)
Each physical volume is divided into equal-sized basic units called PE (physical extents). A physical region is the smallest storage unit available for allocation in a physical volume, and the size of the physical region can be specified when a physical volume is established, depending on the implementation. Once the physical area size is determined, it cannot be changed, and the physical region size of all physical volumes in the same volume group needs to be consistent. The size of the PE is configurable and defaults to 4MB.
6 . Le(Logical Extent, le)
Logical volumes are also divided into addressable basic units called LE (logicalextents). In the same volume group, the size of Le is the same as the PE, and one by one corresponds.
7 . VGDA(Volume Group descriptor area)
and non-LVM systems The metadata that contains the partition information is saved in the partition table at the beginning of the partition, and the metadata related to the logical volume and volume group is stored in the Vgda at the beginning of the physical volume. Vgda includes the following: PV descriptors, VG descriptors, LV descriptors, and some PE descriptors. When the system initiates LVM, the VG is activated and the Vgda is loaded into memory to identify the actual physical storage location of the LV. When the system does an I/O operation, the actual physical location is accessed based on the mapping mechanism established by VGDA.
Seven Installing LVM
First determine if the LVM tool is installed in the system:
#rpm –QA|GREPLVM
Lvm-1.0.3-4
If the command result input is similar to the example above, then the LVM management tool is already installed, and if the command does not have an output then the LVM management tool is not installed, you need to download it from the network or install the LVMRPM Toolkit from the CD.
With the LVM RPM package installed, the kernel support LVM is also required to use LVM. Redhat The default kernel is LVM supported, if you need to recompile the kernel, you need to configure the kernel, enter the Multi-devicesupport (RAIDANDLVM) submenu, select the following two options:
[*] Multipledevicesdriversupport (RAIDANDLVM)
<*>logicalvolumemanager (LVM) support
Then recompile the kernel to add support for LVM to the new kernel.
In order to use LVM, to ensure that LVM is activated at system startup, fortunately in later versions of RedHat7.0, the system startup script already has support for active LVM, and in/etc/rc.d/rc.sysinit the following:
#LVMinitialization
If[-e/proc/lvm-a-x/sbin/vgchange-a-f/etc/lvmtab];then
action$ "Settinguplogicalvolumemanagement:"/sbin/vgscan&&/sbin
/vgchange-ayfi
The key is two commands, the Vgscan command implements scanning all disks to get volume group information, and creates a file volume group data file/etc/lvmtab and/etc/lvmtab.d/*;vgchange-ay command to activate all volume groups of the system.
Eight. LVM Command
LVM Command Table 1
Lvm |
Command |
Describe |
Pv |
Pvcreate |
Build a physical partition into PV |
Pvscan |
Search for any disk with PV in the current system |
Pvdisplay |
Displays the PV status on the current system |
Pvremove |
Remove the PV attribute so that the partition does not have the PV attribute |
Partprobe |
This command allows the core to immediately read the latest partition table without having to reboot |
Vg |
Vgcreate |
Build VG. It's a lot of parameters, wait a moment to introduce |
Vgscan |
Is there any VG on the search system? |
Vgdisplay |
Displays the VG status on the current system |
Vgextend |
Add additional PV to the VG |
Vgreduce |
Delete PV within VG |
Vgchange |
Set whether the VG starts (active) |
Vgremove |
Delete a VG |
Lv |
Lvcreate |
Establish LV |
Lvscan |
The LV on the query system |
Lvdisplay |
Displays the LV status on the system |
Lvextend |
Increase the capacity in LV |
Lvreduce |
Reduce the volume in LV |
Lvremove |
Delete a LV |
Lvresize |
Sizing the LV for capacity |
LVM Command Table 2
Task |
PV |
Vg |
Lv |
Search (Scan) |
Pvscan |
Vgscan |
Lvscan |
Build (Create) |
Pvcreate |
Vgcreate |
Lvcreate |
List (display) |
Pvdisplay |
Vgdisplay |
Lvdisplay |
Increase (Extend) |
|
Vgextend |
Lvextend |
Reduction (reduce) |
|
Vgreduce |
Lvreduce |
Delete (remove) |
Pvremove |
Vgremove |
Lvremove |
Change Capacity (resize) |
|
Vgresize |
|
Nine. LVM Configuration Combat
There are two ways to implement LVM in Linux: One is to use the disk Druid program when installing Linux, and the other is to use the LVM command in the character interface, the following process is based on the latter (character interface) implementation.
1 . Preparing physical partitions
First, we need to select the physical memory for LVM. These are typically standard partitions, but can also be Linux software RAID volumes that have been created. Here I use the Fdisk command to assign SDB, SDC two disk partitions sdb1, SDC1, and specify the partition as 8e type (Linux LVM) via Fdisk's T, as shown in.
2 . Create a physical volume PV
Creating a volume is created on a physical partition of the disk or on a device that has the same functionality as a disk partition (such as a raid). It only outlines a specific area in the physical partition that is used to record LVM-related management parameters.
The command to create the physical volume is pvcreate:
#pvcreate/DEV/SDB1
Physical volume "/DEV/SDB1" successfully created
#pvcreate/DEV/SDC1
Physical volume "/DEV/SDC1" successfully created
The above command initializes/DEV/SDC1,/DVE/SDD1 to physical volumes, and uses physical volumes to display commands Pvdisplay view physical volumes as follows:
#pvdisplay
---NEW physical volume---
PV NAME/DEV/SDB1
VG Name
PV Size 36.00 GB
Allocatable NO
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID QDMNUD-TUVH-U4HN-N5RY-ZGRT-OLYK-67DXBB
---NEW physical volume---
PV NAME/DEV/SDC1
VG Name
PV Size 36.00 GB
Allocatable NO
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID Ndbf68-6qrd-9he6-rotv-rdxl-azvv-7nlcos
3 . Create a volume group VG
A volume group is a combination of one or more physical volumes. A volume group combines multiple physical volumes together to form a manageable unit that resembles a physical hard disk in a non-LVM system.
The command to create a volume group is vgcreate, which is used to create a volume group named "Lvmdisk" that contains/DEV/SDB1,/DEV/SDC1 two physical volumes.
#vgcreate LVMDISK/DEV/SDB1/DEV/SDC1
Volume Group "Lvmdisk" successfully created
Use the Volume Group View command Vgdisplay to display the volume group condition:
#vgdisplay
---Volume Group---
VG Name Lvmdisk
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 1
VG Access Read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 2
ACT PV 2
VG Size 71.98GB
PE Size 4.00MB
Total PE 18428
Alloc pe/size 0/0
Free Pe/size 18428/71.98GB
VG UUID SARFUJ-WAUI-OD81-VWAC-ALNT-AAFN-JWAPVF
When multiple physical volumes are combined into a single volume group, LVM does a format-like work on all physical volumes, cutting each physical volume into a piece of space, which is called the PE (physical Extent), and its default size is 4MB.
Due to kernel limitations, a logical volume can contain up to 65,536 PE, so the size of a PE determines the maximum capacity of a logical volume, and a 4MB PE determines the maximum capacity of a single logical volume to 256GB, and if you want to use a logical volume larger than 256GB, you need to specify a larger PE when you create the volume group.
For example, if you want to create a volume group with 64MB of PE, the logical volume can have a maximum capacity of 4TB, and the command is as follows:
#vgcreate -64MB LVMDISK/DEV/SDB1/DEV/SDC1
4 . Create a logical volume LV
A logical volume (Logical volumes,lv) is a logical region that is partitioned in a volume group, similar to a hard disk partition in a non-LVM system.
The command to create the logical volume is lvcreate, with the following command, we create a logical volume with the name Pldy1 on the volume group Lvmdisk, with a size of 15GB and a device entry of/dev/lvmdisk/pldy1.
#lvcreate-L 15g-n pldy1 Lvmdisk
Logical volume "pldy1" create
You can also use the-l parameter to set the logical partition size by specifying the number of PE.
For example, if you want to create a logical volume that uses all of the space, you need to find out the total number of PE in the volume group, and by the Vgdisplay command above, the current volume group PE total is 18428, the command is as follows:
#lvcreate –l 18428–n pldy1 lvmdisk
When a logical volume is created successfully, you can use the Lvmdisplay command to view the logical volume situation:
#lvdisplay
---Logical voume---
LV name/dev/lvmdisk/pldy1
VG Name Lvmdisk
LV UUID FQCNM3-BMYQ-NKJZ-HYKW-9XG1-QY8D-8UEGCN
LV Write Access Read/write
LV Status Available
#open 0
LV Size 15.00GB
Current LE 3840
Segments 1
Allocation inherit
Read Ahead Sectors 0
Block Device 253:0
As with the volume group, the logical volume is also partitioned into a piece of space during creation, called LE (Logical extents), and the size of Le is the same as the PE in the same volume group, and one by one corresponds.
5 . Creating a file System
To create the Ext3 file system on a logical Volume:
#mkfs-T Ext3/dev/lvmdisk/pldy1
Once the file system has been created, it can be loaded using:
#mkdir/opt/oracle
#mount/dev/lvmdisk/pldy1/opt/oracle
In order to automatically load the file system when the system starts, you also need to add content to the/etc/fstab:
#dev/lvmdisk/pldy1/opt/oracle ext3 defaults 1 2
6 . Managing LVM
The biggest benefit of LVM is the ability to dynamically resize partitions without restarting the machine, let's experience it! Continuation of the above example, now assume that the logical volume/dev/lvmdisk/pldy1 space, need to increase its size, we are discussed in two cases.
(1) See if there is any remaining space in the volume group
The Vgdiskplay command allows you to check the current volume group space usage:
#vgdisplay
---Volume Group---
VG Name Lvmdisk
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 2
VG Access Read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 2
ACT PV 2
VG Size 71.98GB
PE Size 4.00MB
Total PE 18428
Alloc pe/size 3840/15.00GB
Free Pe/size 14588/56.98GB
VG UUID SARFUJ-WAUI-OD81-VWAC-ALNT-AAFN-JWAPVF
Determines the remaining space of the current volume group is 56.98GB, the remaining PE quantity is 14,588. Here all the remaining space is added to the logical volume/dev/lvmdisk/pldy1.
#lvextend-L +14588/dev/lvmdisk/pldy1
Extending logical Volume Pldy1 to 56.98 GB
Logical Volume pldy1 successfully resized
The above command uses the-l+14588 parameter, which means adding 14,588 PE to a specified logical volume. If you are not using all of your space, you can also use other forms of the lvextend command.
For example, adding a logical volume/dev/lvmdisk/pldy1 5GB of space to 20GB allows it to be written as: "#lvextend –l+5g/dev/lvmdisk/pldy1" or "#lvextend –l20g/dev/ Lvmdisk/pldy1 ". After you increase the capacity of the logical volume, you need to modify the file system size with the Ext2online command.
#ext2online/opt/oracle/
After the conversion, let's look at the current state of the file system:
#df-LH
Filesystem 1k-blocks used Available use% mounted on
/dev/sba1 7.4G 1.8G 5.3G 25%/
None 135M 0 135M 0%/dev/shm
/dev/mapper/lvmdisk-pldy1 71G 81M 68G 1%/opt/oracle
(2) Insufficient space in volume group
When there is not enough space in the volume group to extend the size of the logical volume, the capacity of the volume group needs to be increased, and the only way to increase the volume group capacity is to add a new physical volume to the volume group.
First, add a new hard disk (36GB SCSI hard disk) and partition it, create a physical volume, and so on. Next, the new physical volume (/DEV/SDD1) is added to the volume group using the Vgextend command.
The command to extend a volume group is as follows:
#vgextend LVMDISK/DEV/SDD1
Volume Group "Lvmdisk" successfully extended
Use the Vgdisplay command to view the volume group Lvmdisk:
#vgdisplay
---Volume Group---
VG Name Lvmdisk
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 3
VG Access Read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 3
ACT PV 3
VG Size 107.97GB
PE Size 4.00MB
Total PE 27640
Alloc pe/size 3840/15.00GB
Free Pe/size 23800/92.97GB
VG UUID 18RFUJ-UDUI-OD81-VWCT-ALNT-AAFN-JWAPVF
After the volume group is expanded, the capacity of the logical volume can be completed in the first case, and the dynamic adjustment of the partition will be realized.
(3) Rescue mode below, how to use the LVM tool
General Linux distributions use LVM2 commands, such as Vgscan and vgcreate, which are actually linked to lvm.static. For example:
#ls –l/sbin/vgscan
lrwxrwxrwx 1 root root 16:06/sbin/vgscan Oct 8-lvm.static
In rescue mode, these links are not automatically created, and all of these commands are not available. To execute the LVM command, use the following command:
LVM <command>
For example:
LVM Vgscan
(4) using Dm-crypt to create an encrypted logical volume on LVM (version LVM2)
<1> using command lvcreate to create a logical volume (LV) whose name is crypto:
#lvcreate-N crypto-l+100m DATA
Logical volume "CRYPTO" created
<2> Use the Cryptsetup command to set the logical volume crypto as an encrypted block device:
#cryptsetup Create Crypto/dev/data/crypto
Enter passphrase:xxxxxx
<3> Use the command cryptsetup to check the status:
#cryptsetup Status Dmcrypt
/dev/mapper/dmcrypt is active:
Cipher:aes-plain
keysize:256 bits
Devce:/dev/dm-6
offset:0 Sectors
size:204800 Sectors
<4> Create a file system on Dmcrypt using MKE2FS:
#mke2fs/dev/mapper/dmcrypt
MKE2FS 1.35 (23-feb-2008)
Max_blocks 104857600, rsv_groups=128000, rsv_gdb=256
...
...
<5> mount the file system and create files on the file system:
#mkdir/mnt/crypt;
#mount/dev/mapper/dmcrypt/mnt/crypt
#cd/mnt/crypt
Unmount the file system, remove the mapped encrypted block device, in which case, if no password is not properly obtained in the data:
#umount/mnt/crypt
#cryptsetup Remove Dmcrypt
The following can also be do after reboot.
Re-encrypt the block device, prompting for the password to be entered:
#cryptsetup Create Dmcrypt/dev/data/crypto
Enter passphrase:<--------Wrong passphrase!
#mount/dev/mapper/dmcrypt/mnt/crypt
Mount:you must secify the filesystem type
Open with the correct password:
#cryptsetup Remove Dmcrypt
#cryptsetup Create Dmcrypt/dev/data/crypto
Enter passphrase:xxxxxx
#mount/dev/mapper/dmcrypt/mnt/crypt
7 . LVM Troubleshooting tips
(1) Consistency check
Most LVM commands perform consistency checks. You can use the command Vgdisplay, Vgscan to check the VLM configuration, and find inconsistencies.
(2) Log files and trace files
LVM does not have a dedicated log file or trace file. It logs errors and warnings to/var/syslog/syslog.log.
Linux system LVM (Logical Volume Manager) Logical Volume management