openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
4.05k stars 3.51k forks source link

lvm2: lvm partitions inactive, "Incompatible libdevmapper" #12396

Open clement-analogue opened 4 years ago

clement-analogue commented 4 years ago

Maintainer: @danwrt and @dangowrt (I hope I'm tagging the right person) Environment: arch: Arm Cortex V8 A72 CPU, cpu: NXP LS1046A, board: OK1046A-C from Forlinx, OpenWRT version: 19.07.2 and 19.07.3 (maybe before, I didn't try)

Description:

Logical volume are inactive and lvchange fails with the error "Incompatible libdevmapper"

# lvchange -a y /dev/server/root
  Failed to set up async io, using sync io.
  /dev/mapper/control: open failed: No such device
  Failure to communicate with kernel device-mapper driver.
  Check that device-mapper is available in the kernel.
  Incompatible libdevmapper 1.02.155 (2018-12-18) and kernel driver (unknown version).
# lvscan 
  Failed to set up async io, using sync io.
  /dev/mapper/control: open failed: No such device
  Failure to communicate with kernel device-mapper driver.
  Check that device-mapper is available in the kernel.
  Incompatible libdevmapper 1.02.155 (2018-12-18) and kernel driver (unknown version).
  inactive          '/dev/server/swap' [8.00 GiB] inherit
  inactive          '/dev/server/tmp' [2.00 GiB] inherit
  inactive          '/dev/server/root' [50.00 GiB] inherit
  inactive          '/dev/server/var' [100.00 GiB] inherit
  inactive          '/dev/server/home' [50.00 GiB] inherit
  inactive          '/dev/server/lxd_backup' [500.00 GiB] inherit
plntyk commented 4 years ago

I cannot replicate this in a qemu VM with aarch64 (armvirt target) that has an image connected

qemu-system-aarch64 \
-m 1024 -smp 2 -cpu cortex-a57 -M virt -nographic \
-kernel openwrt-19.07.3-armvirt-64-Image-initramfs \
-drive if=none,file=test.qcow2,id=hd0 -device virtio-blk-device,drive=hd0

from that fresh system I basically run

opkg update 
opkg install lvm2

lvdisplay

results in normal behavior

root@OpenWrt:/# lvscan
  Failed to set up async io, using sync io.
  ACTIVE            '/dev/vg00/vol_t1' [500.00 MiB] inherit
  ACTIVE            '/dev/vg00/vol_t2' [500.00 MiB] inherit
root@OpenWrt:/# uname -a
Linux OpenWrt 4.14.180 #0 SMP Sat May 16 18:32:20 2020 aarch64 GNU/Linux

Are you really running vanilla OpenWrt ?

Else: post a dmesg and lsmod output it might be related to /dev/mapper/control: open failed: No such device

so dm-mod should be in that list