Linux – Error creating LVM snapshot: Module dm_snapshot not found

linuxlvm

I've installed via apt-get lvm2:

(precise)root@localhost:~# apt-get install lvm2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  lvm2
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/388 kB of archives.
After this operation, 774 kB of additional disk space will be used.
Selecting previously unselected package lvm2.
(Reading database ... 44976 files and directories currently installed.)
Unpacking lvm2 (from .../lvm2_2.02.66-4ubuntu7.4_armhf.deb) ...
Setting up lvm2 (2.02.66-4ubuntu7.4) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools ...

So here is the error when trying to create a snapshot volume:

(precise)root@localhost:/var/lib/postgresql/9.1/main/base# lvcreate -L100M -s -n lvsnapvol /var/lib/postgresql/9.1/main/base/16399
FATAL: Module dm_snapshot not found.
  /sbin/modprobe failed: 1
  snapshot: Required device-mapper target(s) not detected in your kernel
  Run `lvcreate --help' for more information.

I realize this is a bit different than normal but this is a arm chromebook running linux (3.8.11) via crouton. I hope this helps. Thank you for any assistance that y'all can provide.

Best Answer

Your kernel is probably missing dm-snapshot.ko module. You can check that by running:

find /lib/modules | grep snapshot

to see if any of the kernels installed have that module available. There was a bug at ubuntu, so you should probably be running at least 3.2.0-49.75 to try to avoid that problem. Anyway try kernel upgrade and reboot.