LVM Snapshot Problem: "snapshot: Required device-mapper target(s) not detected in your kernel"
Applies To:
Linux OS – Version Oracle Linux 7.0
Linux x86_64 on Oracle Public Cloud
Goal:
Create an LVM snapshot using lvcreate
Symptoms:
[root@test /]# lvcreate -L 1G -s -n root_snap /dev/mapper/vgRoot-lv_root /usr/sbin/modprobe failed: 1 snapshot: Required device-mapper target(s) not detected in your kernel. Run `lvcreate --help' for more information. [root@test /]#
Solution:
This error means that the module snapshot is not present in the current kernel, this can be validated by running:
[root@test /]# uname -r 3.10.0-862.11.6.el7.x86_64 [root@test /]# find /lib/modules | grep snapshot /lib/modules/3.10.0-1160.49.1.el7.x86_64/kernel/drivers/md/dm-snapshot.ko.xz /lib/modules/3.10.0-1160.88.1.0.1.el7.x86_64/kernel/drivers/md/dm-snapshot.ko.xz
Tagged:
0