• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

“Failed to Start Activation of LVM2 Logical Volumes” and “Unit lvm2-activation-net.service Entered Failed State” – CentOS/RHEL 7 booting issue

by admin

The Problem

System cannot boot-up properly with below logs:

[ OK ] Started File System Check on /dev/xvdd.
[ OK ] Started File System Check on /dev/xvdg.
[ OK ] Started File System Check on /dev/xvdb.
[ OK ] Started File System Check on /dev/xvdc.
[ OK ] Started File System Check on /dev/disk/by-label/BOOT.
Mounting /boot...
[ OK ] Mounted /boot.
[FAILED] Failed to start LVM2 PV scan on device 202:65. 
See 'systemctl status lvm2-pvscan@202:65.service' for details.
[FAILED] Failed to start LVM2 PV scan on device 202:81.
See 'systemctl status lvm2-pvscan@202:81.service' for details.
[ TIME ] Timed out waiting for device dev-disk-by\x2dlabel-DBORA.device.
[DEPEND] Dependency failed for File System Check on /dev/disk/by-label/DBORA.
[DEPEND] Dependency failed for /u01.

It shows that a LVM2 PV scan is failing to start which also timed out waiting for device dev-disk-by\x2dlabel-DBORA.device. After trying to disable lvmetad and rebuilding initramfs and then performed reboot, system boot up is stuck with below logs:

Starting Availability of block devices...

[ OK ] Started Availability of block devices.
[FAILED] Failed to start Activation of LVM2 logical volumes. 
See 'systemctl status lvm2-activation-net.service' for details. 

[ OK ] Reached target Remote File Systems (Pre).
[ OK ] Started Cellirqbalance.
Welcome to emergency mode! After logging in, typGive root password for maintenance

After entering root password to show the details of systemctl status lvm2-activation-net.service:

lvm2-activation-net.service - Activation of LVM2 logical volumes
Loaded: loaded (/etc/lvm/lvm.conf; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2020-06-29 22:10:58 EDT; 2min 55s ago
Docs: man:lvm2-activation-generator(8)
Process: 6457 ExecStart=/usr/sbin/lvm vgchange -aay --ignoreskippedcluster (code=exited, status=5)
Process: 6447 ExecStartPre=/usr/bin/udevadm settle (code=exited, status=0/SUCCESS)
Main PID: 6457 (code=exited, status=5)

Jun 29 22:10:58 hostname systemd[1]: Starting Activation of LVM2 logical volumes...
Jun 29 22:10:58 hostname lvm[6457]: Refusing activation of partial LV VolGroup/LogicalVolume. Use '--activationmode partial' to override. 
Jun 29 22:10:58 hostname lvm[6457]: 4 logical volume(s) in volume group "VolGroup" now active
Jun 29 22:10:58 hostname systemd[1]: lvm2-activation-net.service: main process exited, code=exited, status=5/NOTINSTALLED
Jun 29 22:10:58 hostname systemd[1]: Failed to start Activation of LVM2 logical volumes.
Jun 29 22:10:58 hostname systemd[1]: Unit lvm2-activation-net.service entered failed state.
Jun 29 22:10:58 hostname systemd[1]: lvm2-activation-net.service failed.

The Solution

The logical volume (/dev/VolGroup/LogicalVolume) cannot be activated because of a missing physical volume associated with the volume group. Looking at /etc/lvm/archive/VolGroup.cfg:

pv2 {
  id = "s1sKXM-29tw-ArT0-7sKW-C6mE-X8ES-QUbOor"
  device = "/dev/xvdf1" # Hint only <<<<<

  status = ["ALLOCATABLE"]
  flags = ["MISSING"] 
  dev_size = 83881985 # 39.998 Gigabytes
  pe_start = 2048
  pe_count = 10239 # 39.9961 Gigabytes
  }
}

Physical volume /dev/xvdf1 is marked as missing causing the logical volume VolGroup/LogicalVolume activation issue which resulted to start-up failure of lvm2-activation-net.service.

Using vgextend, restore devices marked as missing. Once a device is marked as missing (such as if it cannot be found during a scan and the volume group is activated in "partial" mode), it may need to be manually restored. The vgextend --restoremissing command can do this.

NOTE: This resolution only applies to situations where a device is marked as missing, but is actually available, contains the expected metadata, and shows up in the output of lvm scans.
# vgextend --restoremissing VolGroup /dev/xvdf1
Volume group "VolGroup" successfully extended

Activate Logical volume:

# lvchange -ay /dev/VolGroup/LogicalVolume
[ 1552.936304] systemd-fsck[11319]: DBORA: clean, 182121/3932160 files, 10770808/15728640 blocks

Check if lvm2-acivation-net.service can be started without errors:

# systemctl start lvm2-activation-net.service
# systemctl status lvm2-activation-net.service

Reboot the system:

# shutdown -r now

Filed Under: CentOS/RHEL, CentOS/RHEL 7

Some more articles you might also be interested in …

  1. setenforce Command Examples in Linux
  2. CentOS / RHEL : How to install and start the Apache httpd service
  3. Extend volume on non-partitioned disk (XFS) under VMware guest
  4. How To Configure Separate Override.conf For Multiple MySQL Instances Using Systemd
  5. How to Rebuild the “initramfs” with Multipath in CentOS/RHEL 6 and 7
  6. How to Stop “sudo” from Sending Emails on Failures in CentOS/RHEL
  7. Beginner’s Guide to LVM (Logical Volume Management)
  8. How to change the number of commands stored in Bash History
  9. CentOS / RHEL 7 : How to boot into Rescue Mode or Emergency Mode
  10. CentOS / RHEL 7 : How to change runlevels (targets) with systemd

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright