创建 LVM 快照时出错:未找到模块 dm_snapshot

创建 LVM 快照时出错:未找到模块 dm_snapshot

我已经通过 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 ...

因此,尝试创建快照卷时出现以下错误:

(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.

我意识到这和正常情况有点不同,但这是一台通过 crouton 运行 linux (3.8.11) 的 arm chromebook。希望这能有所帮助。感谢你们提供的任何帮助。

答案1

你的内核可能缺少 dm-snapshot.ko 模块。你可以运行以下命令检查:

find /lib/modules | grep snapshot

查看安装的内核中是否有可用的模块。ubuntu 有一个错误,因此您可能至少应该运行 3.2.0-49.75 以避免出现该问题。无论如何,请尝试升级内核并重新启动。

相关内容