Bug 1961890

Summary: lvcreate can't load new vdo module
Product: Red Hat Enterprise Linux 8 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: VDO QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high CC: agk, awalsh, heinzm, jbrassow, mcsontos, prajnoha, rmeggins, zkabelac
Version: 8.5   
Target Milestone: beta   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.03.12-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1989253 (view as bug list) Environment:
Last Closed: 2021-11-09 19:45:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1989253, 2028636    

Description Corey Marthaler 2021-05-18 22:57:16 UTC
Description of problem:
kernel-4.18.0-305.6.el8    BUILT: Thu May 13 14:06:29 CDT 2021

vdo-6.2.5.11-14.el8    BUILT: Fri May 14 07:54:53 CDT 2021
kmod-kvdo-6.2.5.11-78.el8    BUILT: Fri May 14 07:55:52 CDT 2021

lvm2-2.03.12-0.1.20210426git4dc5d4a.el8    BUILT: Mon Apr 26 08:23:33 CDT 2021
lvm2-libs-2.03.12-0.1.20210426git4dc5d4a.el8    BUILT: Mon Apr 26 08:23:33 CDT 2021
device-mapper-1.02.177-0.1.20210426git4dc5d4a.el8    BUILT: Mon Apr 26 08:23:33 CDT 2021
device-mapper-libs-1.02.177-0.1.20210426git4dc5d4a.el8    BUILT: Mon Apr 26 08:23:33 CDT 2021
device-mapper-event-1.02.177-0.1.20210426git4dc5d4a.el8    BUILT: Mon Apr 26 08:23:33 CDT 2021
device-mapper-event-libs-1.02.177-0.1.20210426git4dc5d4a.el8    BUILT: Mon Apr 26 08:23:33 CDT 2021

[root@hayes-02 ~]# ls /lib/modules/4.18.0-305.6.el8.x86_64/extra/
[root@hayes-02 ~]# ls /lib/modules/4.18.0-305.5.el8.x86_64/extra/
kmod-kvdo

[root@hayes-02 ~]# vgcreate VG /dev/sdb1
  Physical volume "/dev/sdb1" successfully created.
  Creating devices file /etc/lvm/devices/system.devices
  Volume group "VG" successfully created

[root@hayes-02 ~]#  lvcreate --yes --activate y --type vdo -L 5G -n vdo1 VG
modprobe: FATAL: Module dm-vdo not found in directory /lib/modules/4.18.0-305.6.el8.x86_64
  /usr/sbin/modprobe failed: 1
  vdo: Required device-mapper target(s) not detected in your kernel.
  Run `lvcreate --help' for more information.

# Create a vdo using the vdo cmd
[root@hayes-02 ~]# vdo create --name vdo2 --device /dev/sdc1
Creating VDO vdo2
      Logical blocks defaulted to 486134360 blocks.
      The VDO volume can address 1 TB in 929 data slabs, each 2 GB.
      It can grow to address at most 16 TB of physical storage in 8192 slabs.
      If a larger maximum size might be needed, use bigger slabs.
Starting VDO vdo2
Starting compression on VDO vdo2
VDO instance 0 volume is ready at /dev/mapper/vdo2

# Now the lvm create succeeds
[root@hayes-02 ~]#  lvcreate --yes --activate y --type vdo -L 5G -n vdo1 VG
    Logical blocks defaulted to 523108 blocks.
    The VDO volume can address 2 GB in 1 data slab.
    It can grow to address at most 16 TB of physical storage in 8192 slabs.
    If a larger maximum size might be needed, use bigger slabs.
  Logical volume "vdo1" created.

Comment 1 Andy Walsh 2021-05-19 13:48:06 UTC
(In reply to Corey Marthaler from comment #0)

> [root@hayes-02 ~]#  lvcreate --yes --activate y --type vdo -L 5G -n vdo1 VG
> modprobe: FATAL: Module dm-vdo not found in directory
> /lib/modules/4.18.0-305.6.el8.x86_64
>   /usr/sbin/modprobe failed: 1
>   vdo: Required device-mapper target(s) not detected in your kernel.
>   Run `lvcreate --help' for more information.
The modules aren't named 'dm-vdo'.  They are named 'kvdo' and 'uds'.

Can you run `find /lib/modules -name "kvdo*" -or -name "uds*"` ?  You should end up seeing something like this:
$ find /lib/modules -name "kvdo*" -or -name "uds*"
/lib/modules/4.18.0-297.1.el8.x86_64/extra/kmod-kvdo/uds
/lib/modules/4.18.0-297.1.el8.x86_64/extra/kmod-kvdo/uds/uds.ko
/lib/modules/4.18.0-297.1.el8.x86_64/extra/kmod-kvdo/vdo/kvdo.ko

Comment 2 Zdenek Kabelac 2021-05-19 14:04:18 UTC
Yep - it's a result of commit 5bf1dba9eb8a8b77410e386e59dadeb27801b14e
But I don't like reverting - I'll commit fix for module_present() function.

Comment 3 Zdenek Kabelac 2021-05-26 14:14:55 UTC
Pushed this small fix: https://listman.redhat.com/archives/lvm-devel/2021-May/msg00031.html

Comment 7 Corey Marthaler 2021-06-01 16:51:39 UTC
Marking Verified:Tested in the latest lvm rpms.

kernel-4.18.0-305.7.el8.kpq1    BUILT: Mon May 17 12:55:07 CDT 2021
lvm2-2.03.12-2.el8    BUILT: Tue Jun  1 06:55:37 CDT 2021
lvm2-libs-2.03.12-2.el8    BUILT: Tue Jun  1 06:55:37 CDT 2021
device-mapper-1.02.177-2.el8    BUILT: Tue Jun  1 06:55:37 CDT 2021
device-mapper-libs-1.02.177-2.el8    BUILT: Tue Jun  1 06:55:37 CDT 2021
vdo-6.2.5.11-14.el8    BUILT: Fri May 14 07:54:53 CDT 2021
kmod-kvdo-6.2.5.11-78.el8    BUILT: Fri May 14 07:55:52 CDT 2021


[root@hayes-01 ~]# ls /lib/modules/4.18.0-305.7.el8.kpq1.x86_64/extra/
[root@hayes-01 ~]# ls /lib/modules/4.18.0-305.5.el8.x86_64/extra/
kmod-kvdo

[root@hayes-01 ~]# lsmod | grep vdo
[root@hayes-01 ~]# 
[root@hayes-01 ~]# vgcreate VG /dev/sdb1
  Physical volume "/dev/sdb1" successfully created.
  Volume group "VG" successfully created
[root@hayes-01 ~]# lvcreate --yes --activate y --type vdo -L 5G -n vdo1 VG
    Logical blocks defaulted to 523108 blocks.
    The VDO volume can address 2 GB in 1 data slab.
    It can grow to address at most 16 TB of physical storage in 8192 slabs.
    If a larger maximum size might be needed, use bigger slabs.
  Logical volume "vdo1" created.

Comment 10 Corey Marthaler 2021-06-09 18:30:38 UTC
Verified with a newer kernel as well.

kernel-4.18.0-310.el8    BUILT: Thu May 27 14:24:00 CDT 2021

lvm2-2.03.12-2.el8    BUILT: Tue Jun  1 06:55:37 CDT 2021
lvm2-libs-2.03.12-2.el8    BUILT: Tue Jun  1 06:55:37 CDT 2021

vdo-6.2.5.11-14.el8    BUILT: Fri May 14 07:54:53 CDT 2021
kmod-kvdo-6.2.5.11-78.el8    BUILT: Fri May 14 07:55:52 CDT 2021

[root@hayes-01 ~]# ls /lib/modules/4.18.0-310.el8.x86_64/extra/
[root@hayes-01 ~]# ls /lib/modules/4.18.0-305.5.el8.x86_64/extra/
kmod-kvdo
[root@hayes-01 ~]# lsmod | grep vdo
[root@hayes-01 ~]# vgcreate VG /dev/sdb1
  Physical volume "/dev/sdb1" successfully created.
  Volume group "VG" successfully created
[root@hayes-01 ~]# lvcreate --yes --activate y --type vdo -L 5G -n vdo1 VG
    Logical blocks defaulted to 523108 blocks.
    The VDO volume can address 2 GB in 1 data slab.
    It can grow to address at most 16 TB of physical storage in 8192 slabs.
    If a larger maximum size might be needed, use bigger slabs.
  Logical volume "vdo1" created.

Comment 13 errata-xmlrpc 2021-11-09 19:45:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (lvm2 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:4431