How to Completely Disable ‘Lvm2’ (Logical Volume Manager) in Ubuntu Server

The Logical Volume Manager (LVM2) is an incredibly powerful storage virtualization technology in Linux, allowing administrators to dynamically resize partitions, span file systems across multiple physical disks, and create live snapshots. It is the default partitioning scheme for many Ubuntu Server installations. However, if you are provisioning a fleet of lightweight virtual machines or edge devices that rely strictly on raw, static partitions (like a simple ext4 slice on /dev/sda1), the LVM2 daemon and its associated background scanning services are completely unnecessary. Leaving them running consumes memory and slightly delays the boot sequence as the system hunts for volume groups that do not exist.

This guide explains how to completely disable the lvm2 daemon and its associated services in Ubuntu Server, provided your server is not actively booting from an LVM volume.

Stop and Disable LVM Services

CRITICAL WARNING: Do not proceed with this guide if your root partition (/) or any critical mount points (like /var or /home) are actively utilizing LVM. Run lsblk and look for lvm under the “TYPE” column. If it exists, disabling LVM will render your server unbootable. Proceed only if your disks are partitioned with standard, raw partitions.

  1. Log into your Ubuntu Server via SSH or local console using an account with sudo privileges.
  2. Stop the active LVM metadata daemon:
    sudo systemctl stop lvm2-lvmpolld.socket
    sudo systemctl stop lvm2-lvmpolld.service
  3. Disable the services so they do not attempt to start during the boot sequence:
    sudo systemctl disable lvm2-lvmpolld.socket
    sudo systemctl disable lvm2-lvmpolld.service
  4. To prevent the system from aggressively scanning block devices for LVM signatures at boot (which saves boot time), mask the lvm2-monitor service:
    sudo systemctl mask lvm2-monitor.service

Verify the Deactivation

By stopping and masking these units, you have effectively severed LVM from the systemd initialization process.

To verify the lockdown is successful, reboot the server (sudo reboot). Once logged back in, check the status of the primary monitoring service:

systemctl status lvm2-monitor.service

The output must indicate that the service is masked (pointing to /dev/null) and inactive (dead). The kernel will no longer waste I/O cycles probing newly attached block devices for LVM metadata, streamlining your storage stack for a raw-partition-only environment.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.