Displaying present location in the site.

How to Resolve and Prevent LVM Logical Volumes Not Being Recognized After Disk Replacement (Linux)

EXPRESSCLUSTER Official Blog

October 19th, 2026

Machine translation is used partially for this article. See the Japanese version for the original article.

Introduction

In this article, we introduce how to re-recognize LVM logical volumes that are no longer detected after replacing a disk containing those volumes, as well as preventive measures for this issue.

On Linux OS, when a second or subsequent disk is connected in addition to the OS disk, the disk recognition order may change at OS boot time, causing device file names to swap, a problem known as device file name mismatch. Since EXPRESSCLUSTER X for Linux requires specifying device file names when configuring disk-related resources such as disk resources, mirror disk resources, and others, a mismatch will cause a resource to fail to start. One recommended method to avoid this problem is to use LVM logical volumes.

On the other hand, after replacing a disk containing LVM logical volumes (for example, for data recovery purposes), the logical volumes on the new disk may not be recognized in certain environments. This article explains the conditions under which this issue occurs and how to resolve it.

Contents

1. Symptoms

When LVM logical volumes are properly recognized, they can be verified using the following methods. In the configuration used in this article, we can see that there is a volume group named vg1, with two logical volumes beneath it: cluster and data.

Logical volume list:

$ sudo lvdisplay
  --- Logical volume ---
  LV Path                /dev/vg1/cluster
  LV Name                cluster
  VG Name                vg1
                 :
                 :
  --- Logical volume ---
  LV Path                /dev/vg1/data
  LV Name                data
  VG Name                vg1
                 :
                 :

Block device list:

$ lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
nvme0n1         259:0    0   10G  0 disk
├─nvme0n1p1     259:1    0    1M  0 part
├─nvme0n1p2     259:2    0  200M  0 part /boot/efi
├─nvme0n1p3     259:3    0    1G  0 part /boot
└─nvme0n1p4     259:4    0  8.8G  0 part /
nvme1n1         259:5    0   10G  0 disk
└─nvme1n1p1     259:7    0   10G  0 part
  ├─vg1-cluster 253:0    0    1G  0 lvm    # Logical volume 1
  └─vg1-data    253:1    0    9G  0 lvm    # Logical volume 2

After replacing the disk containing these logical volumes (nvme1n1 in this case), depending on the environment, the logical volumes may no longer be recognized and will not appear in the output of the following commands.

Logical volume list:

$ sudo lvdisplay
  (No information for the relevant logical volumes is displayed)

Block device list:

$ lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
nvme0n1         259:0    0   10G  0 disk
├─nvme0n1p1     259:1    0    1M  0 part
├─nvme0n1p2     259:2    0  200M  0 part /boot/efi
├─nvme0n1p3     259:3    0    1G  0 part /boot
└─nvme0n1p4     259:4    0  8.8G  0 part /
nvme1n1         259:5    0   10G  0 disk
└─nvme1n1p1     259:7    0   10G  0 part
  (No information for the relevant logical volumes is displayed)

2. Cause and Conditions

The issue where logical volume information is no longer recognized or displayed may be caused by the LVM devices file feature being enabled. When this feature is enabled, PV recognition is performed by referencing the /etc/lvm/devices/system.devices file. However, the information written to this file does not account for changes in device recognition order, which can result in an issue equivalent to the device file name mismatch.

You can check whether the LVM devices file feature is enabled with the following command:

$ sudo lvmconfig --type full devices/use_devicesfile

If the output shows use_devicesfile=1, the devices file feature is enabled. If the value is 0, it is disabled.

  • *
    You can also check the value of use_devicesfile in the configuration file (/etc/lvm/lvm.conf). However, some distributions may omit this entry, so using the lvmconfig command is the most reliable method.

On Red Hat Enterprise Linux 9 and Oracle Linux 9, use_devicesfile is set to 1 (enabled). On Amazon Linux 2, it is set to 0 (disabled). However, default values may vary depending on the environment. For example, on Microsoft Azure, Red Hat Enterprise Linux 9 has use_devicesfile=0 (disabled) set in the configuration file. Always verify the setting on the actual system.

3. Resolution

This section describes the steps to re-recognize logical volumes when this issue occurs after disk replacement.
When the devices file feature is enabled, only the devices listed in /etc/lvm/devices/system.devices are visible and usable. Since the new device information after disk replacement is not automatically registered in this file, running the appropriate commands to update the file will allow the logical volume information to be recognized and displayed again.

  • 1.
    Add all devices belonging to the volume group to the system.devices file.

$ sudo vgimportdevices --all

  • *
    Alternatively, running 'sudo lvmdevices --update --refresh' will produce the same result.
  • 2.
    Activate the volume group.

$ sudo vgchange -ay

  • 3.
    Verify that the logical volumes are recognized using the lvdisplay and lsblk commands.

$ sudo lvdisplay
$ lsblk

If the logical volumes are still not recognized using this method, first deactivate them with 'sudo vgchange -an' , or reboot the server. Then, re-activate them with 'sudo vgchange -ay' , which may allow them to be recognized.

4. Preventive Measure

As a preventive measure, you can disable the devices file feature in advance. This ensures that new devices and logical volumes are automatically recognized after disk replacement, eliminating the need for manual re-recognition steps.

  • 1.
    Disable the devices file feature by changing the value of use_devicesfile to 0 in the configuration file (/etc/lvm/lvm.conf). If the entry does not exist in the configuration file, add the following line:

use_devicesfile=0

  • 2.
    Reboot the server.
  • 3.
    After reboot, verify that the devices file feature is disabled (use_devicesfile=0).

$ sudo lvmconfig --type full devices/use_devicesfile

Conclusion

In this article, we covered an issue caused by the LVM devices file feature and its resolution, useful knowledge for operational environments that use EXPRESSCLUSTER with LVM. We hope this article serves as a helpful reference for understanding the re-recognition procedure when replacing disks containing LVM logical volumes, so you can be prepared for production environment operations.