WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Kernel not recognizing LVM-volumes  (Read 936 times)

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 337
Kernel not recognizing LVM-volumes
« on: June 24, 2021, 01:36:22 AM »
Hello again!

I have been trying to set-up dCore Focal on a laptop where some protected data is enclosed in a LUKS/LVM-container. After jumping through some hoops, I got LVM to find its volumes via 'lvs'. However, the kernel does not reproduce them under '/dev/mapper' or anywhere else. I have the following extensions loaded:
Code: [Select]
wireless
raid-dm-5.4.3-tinycore64
truecrypt-dep
mdadm
lvm2
Without the wireless extensions there are quite some packages missing like liblz4, something like gcrypt and possible some more. The RAID extension is necessary to provide the dm_mod kernel module as per the forum thread kernel device-mapper driver(http://forum.tinycorelinux.net/index.php/topic,16127.15.html). I threw in the Truecrypt, Mdadm packages in the hope that they might solve the problem but this was not the case.

dCore still is a fascinating marvel in the Linuxiverse. Cheers!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 9649
Re: Kernel not recognizing LVM-volumes
« Reply #1 on: June 24, 2021, 04:55:37 AM »
Hi sm8ps
Did you compare the list that Jason W attached here:
http://forum.tinycorelinux.net/index.php/topic,16127.msg101211.html#msg101211
to what you have installed?

These in particular stand out:
Code: [Select]
fuse-utils:
dmsetup:
libudev0:
libdevmapper-event1.02.1:
libdevmapper1.02.1:
coreutils:
util-linux:
libudev1:
libacl1:
udev:
libblkid1:
libuuid1:
libmount1:
mount:
libfuse2:
fuse:
libssh-4:

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 337
Re: Kernel not recognizing LVM-volumes
« Reply #2 on: June 24, 2021, 07:12:07 AM »
Thanks for your suggestion, Rich! I did notice there was a list but had not inspected it. Now I simply made an extension of the full list and had it loaded at boot-time. There is no difference in behavior, though. I issued a magic 'udevadm trigger' but that did not change anything either.
For completeness: '/dev/mapper/' exists but only contains
Code: [Select]
crw-------  1 root root 10, 236 Jun 24 16:08 control

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 337
[SOLVED] Kernel not recognizing LVM-volumes
« Reply #3 on: June 25, 2021, 03:45:47 AM »
As usual, the error was on my side.  :) The following steps are necessary to use LVM-volumes on dCore-bionic:
  • sce-load lvm2. On its own, it is not functional as it is missing dependencies like liblz4 etc.
  • sce-load wireless. Provides the missing dependencies.
  • sce-load raid-dm-<KERNEL>-tinycore64. Provides and loads the dm_mod kernel module.
  • vgchange -ay
Steps 1-2 give a functional set of LVM-tools. Step 3 introduces device mapper. However, it does not automatically activate the LVM-volumes as I had expected. This needs to be done manually as in step 4.

This is a bit a work-around rather than a fully automated set-up. Especially step 2 is not very intuitive and could be replaced by a dependency to lvm2. Though, as long as I am the only one using it or, respectively, others using it are happy with this approach, it is quite alright. Together with cryptsetup, things are working as I had hoped.