1

I created an LVM logical volume. I partitioned it manually. I ran partprobe. I found the new device in /dev/mapper, then I mounted it where I needed it. Everything works.

...except on reboot, obviously, the mount point is gone since I didn't update /etc/fstab. On the other hand, however, I can't just do that because the device files do not show up under /dev until I actually run partprobe again.

How can I fix this?

  • 3
    You... partitioned a logical volume? That's probably not the way that LVM is supposed to be used. – Martin von Wittich Sep 25 '13 at 14:53
4

Your best bet is to use LVM as intended: logical volumes should not be partitioned. Instead, create more logical volumes (you can have as many as you need).

Other than that, you'll need to arrange to have partprobe added to the initramfs, and called. Partprobe is actually just setting up some device-mapper mappings to emulate the partition support (which doesn't actually exist in the kernel for logical volumes). You could also use dmsetup to do this, which might be easier since its already in the initramfs. See man 8 initramfs-tools for details on how to add your own scripts to the initramfs.

  • tries to think of a reason why he was partitioning stuff to begin with; fails – badp Sep 25 '13 at 19:07
  • I don't agree with deprecating the use of partitions inside crypted volumes. Take the case of a deniable encrypted system, the installer still requires to install this system's bootloader (GRUB phase 1) somewhere. And it'd better be on an encrypted MBR/GPT, or it won't be deniable. And have a separate fake bootloader unencrypted. By the way, partprobe didn't work for me from initramfs, I'm stuck. – KrisWebDev Oct 23 '16 at 14:33
  • @KrisWebDev you can use your encrypted volume as an LVM PV, then create LVs in it. Not sure how you're going to get that encrypted bootloader to run anyway, unless you boot it as a VM, in which case the host not seeing the partitions doesn't matter. – derobert Oct 23 '16 at 15:39

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.