• 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

LVM Commands Fail With “Failed to load config file /etc/lvm/lvm.conf”

by admin

The Problem

Unable to run lvm commands after modifying lvm.conf

Errors like:

lvextend -L +549G /dev/u03/u03
Parse error at byte 61974 (line 1382): unexpected token
Failed to load config file /etc/lvm/lvm.conf

The Solution

This could happen due to extraneous characters in /etc/lvm/lvm.conf. In this case the parse error gives a hint that the error is at line 1382, but if the error is something like a missing bracket it might not be accurate.

# the redundant nature of the mirror. This policy acts like
# 'remove' if no suitable device and space can be allocated for the
ck
# replacement.
#
mirror_image_fault_policy = "remove"

To track down syntax errors, it can be helpful to eliminate comments and blank lines with something like:

# grep -vE '^\s*(#|$)' /etc/lvm/lvm.conf

Also, we can use “vim” which provides syntax highlighting capability. This is particularly helpful with errors such as missing brackets. Once these errors are rectified, run the LVM commands again to verify.

Filed Under: Linux

Some more articles you might also be interested in …

  1. ansible-vault – Encrypts & decrypts values, data structures and files within Ansible projects
  2. snmpwalk: command not found
  3. btrfs balance Command Examples in Linux
  4. CentOS / RHEL : How to mount filesystems using UUID
  5. xargs: command not found
  6. pihole Command Examples in Linux
  7. lastb: command not found
  8. slapt-get: command not found
  9. rtorrent: command not found
  10. fail2ban-client Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • diffstat: Create a histogram from the output of the diff command
  • diffoscope: Compare files, archives, and directories
  • diff-pdf: Tool for comparing two PDFs
  • dict: Command line dictionary using the DICT protocol

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright