I am trying to install my first Linux system and I am stuck setting up the hard drives. Given my lack of experience I decided to use the guided setup from the hard drive setup screen figuring I would go back after the completed Debian installation and simply resize my drives as needed.

However when trying to run

sudo service lvm2 start
I get a message "unit lvm2.service is masked".

Any ideas as to why this is happening? all I could find was a note that LVM as not compatible with grub /boot and should be outside the storage disk managed by LVM.

If so is it truly referring to the entire disk on which /boot is loaded or can it be simply a separate logical partition on that disk?


/lib/systemd/system/lvm2.service is created as a symbolic link to /dev/null by the lvm2 Debian package, causing the service to be permanently masked, because the job of the SysVinit-style /etc/init.d/lvm2 start-up script is actually split into multiple native systemd units.

lvm2.service needs to exist, though, because otherwise the SysVinit compatibility logic would automatically create a systemd unit that would just run that script. Since a systemd-native /lib/systemd/system/lvm2.service exists, that won't happen - but because all the actual work is done by instances of lvm2-pvscan@.service and the lvm2-monitor.service, the only job of unit lvm2.service is to mask out the redundant SysVinit-style startup script.

Also, you're correct that LVM can be used on a Debian system disk, as long as /boot is placed into a traditional non-LVM partition that the system firmware can understand - as GRUB is using the services of the system firmware to access files from that filesystem.

(Yes, modern versions of GRUB do include the capacity to read filesystems on LVM. Debian 9's version of GRUB even includes the lvm.mod GRUB module. But the problem is mostly that the Debian Installer cannot yet set it up reliably - or could not at the time of Debian 9 release. I would guess it's probably mostly about getting the installer to "understand" the new possibilities when having /boot inside LVM, and getting it to warn the user about configurations that won't work.)

| improve this answer | |
  • thanks for that, while I don't yet understand all the detail you have provided at least I know I'm not heading into a brick wall. By the way I have installed Ver. 9.5 so even better I assume. – lynx Sep 17 '18 at 13:24
  • Thanks. What is the solution to start LVM service then? unix.stackexchange.com/questions/502363/… – Tim Feb 22 '19 at 23:36

Try use the command:

/etc/init.d/lvm2 start
| improve this answer | |
  • 1
    Welcome to the site. As it stands, the post is qualified as "low-quality-post". You might want to add additional information as to what's the purpose of the command, how does it address OP's specific concerns, and why exactly you recommend this solution to OP's question. – Sergiy Kolodyazhnyy Feb 27 '19 at 2:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.