lvmconf
Configure LVM (Logical Volume Management)
SYNOPSIS
lvmconf [OPTIONS]
PARAMETERS
--disable {item}
Disable specified LVM configuration items or features, such as scan_lvs or use_lvmetad.
--enable {item}
Enable specified LVM configuration items or features.
--with-system-dir <path>
Specify an alternative system directory path where LVM expects to find certain files and binaries.
--config <filename>
Use an alternative LVM configuration file instead of the default /etc/lvm/lvm.conf.
--type <keyword>
Filter output by a specific configuration section or type (e.g., devices, metadata, activation) when dumping or checking the configuration.
--defaults
Display the compiled-in default configuration settings of LVM. This shows the baseline without any lvm.conf modifications.
--dump
Display the current effective LVM configuration, including values from lvm.conf and any command-line overrides. This is useful for auditing.
--check
Check the syntax and validity of the LVM configuration file without applying any changes. This helps to identify errors before they cause operational issues.
--update
Notify the lvmetad daemon to re-read its configuration from lvm.conf. This is crucial for applying changes made to the configuration file without a full system reboot.
--help
Display a help message outlining the command's usage and options, then exit.
--version
Display LVM version information and exit.
DESCRIPTION
The lvmconf command is an integral part of the Logical Volume Manager 2 (LVM2) suite in Linux. Its primary function is to manage and inspect the system-wide LVM configuration file, lvm.conf, which typically resides in /etc/lvm/. This file dictates various aspects of LVM behavior, including device scanning, metadata handling, locking mechanisms, and integration with other system components.
lvmconf enables system administrators and scripts to programmatically view the effective LVM configuration, display default settings, and apply changes. It allows for the controlled modification of LVM parameters, ensuring consistent operation across system reboots and during runtime. While direct manual editing of lvm.conf is possible, lvmconf offers a validated and structured approach to managing these critical settings, helping to prevent syntax errors and maintain system stability. It is also used to inform the lvmetad daemon of configuration changes.
CAVEATS
Modifying the LVM configuration requires root privileges. Incorrect changes to lvm.conf can lead to LVM malfunctions, data access issues, or system instability. Always backup lvm.conf before making significant changes. Changes made via lvmconf or direct editing of the file may not take effect until the lvmetad daemon is updated (using --update) or the system is rebooted.
COMMON USE CASES
lvmconf is frequently used for:
- Rapidly inspecting the active or default LVM settings.
- Enabling or disabling specific LVM features such as automatic volume group activation or the use of the lvmetad caching daemon.
- Forcing the lvmetad daemon to reload its configuration after manual edits to lvm.conf.
- Incorporating LVM configuration adjustments into automated deployment or system management scripts.
HISTORY
The lvmconf command is part of the Logical Volume Manager 2 (LVM2) project, which superseded the original LVM1 implementation and was integrated into the Linux kernel around version 2.6. Prior to LVM2, configuration was less centralized or relied more on manual adjustments. lvmconf provides a standardized and scriptable interface for managing LVM's central configuration file, lvm.conf, enhancing automation and consistency in LVM administration.