当尝试创建 vdo 时,我收到以下消息:
# vdo create --name=vdo1 --device=/dev/sdb2 --vdoLogicalSize=1T
Creating VDO vdo1
vdo: ERROR - Kernel module kvdo not installed
vdo: ERROR - modprobe: FATAL: Module kvdo not found in directory /lib/modules/4.18.0-240.1.1.el8_3.x86_64
有人知道我为什么会收到错误以及如何修复它吗?
我还安装了额外的软件包
# dnf install *4.18.0-240.1.1.el8* -y
它安装了更多软件包,包括一些内核软件包,但我仍然收到错误。
所有软件包也已安装并且 vdo 也已启用:
# systemctl status vdo
● vdo.service - VDO volume services
Loaded: loaded (/usr/lib/systemd/system/vdo.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2020-12-11 12:44:55 UTC; 3h 49min ago
Process: 782 ExecStart=/usr/bin/vdo start --all --confFile /etc/vdoconf.yml (code=exited, status=0/SUCCESS)
Main PID: 782 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 23438)
Memory: 0B
CGroup: /system.slice/vdo.service
Dec 11 12:44:53 node systemd[1]: Starting VDO volume services...
Dec 11 12:44:55 node systemd[1]: Started VDO volume services.
# rpm -qa | grep -i vdo
vdo-6.2.3.114-14.el8.x86_64
alsa-plugins-vdownmix-1.1.9-1.el8.x86_64
vdo-support-6.2.3.114-14.el8.x86_64
kmod-kvdo-6.2.2.117-65.el8.x86_64
libblockdev-vdo-2.24-1.el8.x86_64
答案1
运行更新后,我在 Oracle Linux 8 上遇到了同样的问题。最新的 kmod-kvdo 软件包似乎不包含较新内核的 kvdo 内核模块。这可以通过查询最新的 kmod-kvdo 包来验证(首先使用 查找版本dnf list kmod-kvdo
):
rpm -ql kmod-kvdo-6.2.8.7-88.0.1.el8
/etc/depmod.d/kvdo.conf
/lib/modules/4.18.0-477.el8.x86_64
/lib/modules/4.18.0-477.el8.x86_64/extra
/lib/modules/4.18.0-477.el8.x86_64/extra/kmod-kvdo
/lib/modules/4.18.0-477.el8.x86_64/extra/kmod-kvdo/uds
/lib/modules/4.18.0-477.el8.x86_64/extra/kmod-kvdo/uds/uds.ko
/lib/modules/4.18.0-477.el8.x86_64/extra/kmod-kvdo/vdo
/lib/modules/4.18.0-477.el8.x86_64/extra/kmod-kvdo/vdo/kvdo.ko
我的活动内核5.4.17-2136.320.7.1.el8uek.x86_64
不在列表中。
为了让 VDO 运行,我使用 grubby 将活动内核更改为4.18.0-477.el8.x86_64
,然后重新启动。希望他们很快就能修复 kmod-kvdo。
答案2
在另一台主机上我也收到以下错误:
Creating VDO vdo1
vdo: ERROR - Found existing signature on /dev/disk/by-id/usb-iOS_devi_FLASH_DRIVE_00000000CY02-0:0-part1 at offset 0: LABEL="(null)" UUID="c5d18b8a-7512-4193-af06-3032d519e4e0" TYPE="xfs" USAGE="filesystem".
在磁盘上创建新分区后
# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): n
Partition number (2-128, default 2):
First sector (10487808-262143966, default 10487808):
Last sector, +sectors or +size{K,M,G,T,P} (10487808-262143966, default 262143966): +10G
Created a new partition 2 of type 'Linux filesystem' and of size 10 GiB.
Partition #2 contains a stratis signature.
Do you want to remove the signature? [Y]es/[N]o: y
The signature will be removed by a write command.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
# partprobe
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
....
sdb 8:16 1 125G 0 disk
....
└─sdb2 8:18 1 10G 0 part
正如您所看到的,我之前使用 stratis 创建的测试,一些细节仍然以某种方式保留在磁盘分区上。所以我也删除了fdisk中的那些。在我终于可以创建 vdo 后:
# vdo create --name=vdo1 --device=/dev/sdb2 --vdoLogicalSize=1T
Creating VDO vdo1
The VDO volume can address 6 GB in 3 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 vdo1
Starting compression on VDO vdo1
VDO instance 0 volume is ready at /dev/mapper/vdo1
答案3
我也遇到了这个问题,并追溯到不一致的存储库。如果你用可用的 VDO 升级整个 CentOS,它就会崩溃。我今天又试了一次。由于此问题已存在数周/数月,因此我制定了一个不会因升级而中断的解决方案。一旦这个问题得到解决,它也很容易删除。
我的受影响虚拟机的操作系统详细信息:
root@vm12 tests]# rpm -qa | grep -e vdo -e release
epel-release-8-10.el8.noarch
kmod-kvdo-6.2.2.117-65.el8.x86_64
centos-linux-release-8.3-1.2011.el8.noarch
vdo-6.2.3.114-14.el8.x86_64
[root@vm12 tests]# cat /etc/centos-release
CentOS Linux release 8.3.2011
[root@vm12 tests]# dnf upgrade
Last metadata expiration check: 0:06:25 ago on Wed 06 Jan 2021 09:49:08 AM CET.
Dependencies resolved.
Nothing to do.
Complete!
安装修复程序(修改后的存储库)并修复操作系统:
curl https://raw.githubusercontent.com/joe-speedboat/ansible.vdo_nfs_appliance/main/templates/CentOS-Stream-vdo.repo.j2 > /etc/yum.repos.d/CentOS-Stream-vdo.repo
dnf makecache
dnf upgrade
reboot
删除修复(一旦不再从 baseos-vdo 存储库中获取 vdo 包):
rm -f /etc/yum.repos.d/CentOS-Stream-vdo.repo
顺便说一句,请随意使用我的整个 ansible 角色来设置基于 vdo 的存储设备。但请先 RTFM :-)
https://galaxy.ansible.com/joe-speedboat/ansible_vdo_nfs_appliance
克里斯先生