vdo:错误 - 设备 /dev/sdc 被过滤器排除

vdo:错误 - 设备 /dev/sdc 被过滤器排除

在 vagrant/virtualbox 中创建第三个磁盘后,我在尝试创建 VDO(Red Hat 的 Enterprise Linux 8 重复数据删除和压缩工具)时收到此错误。

对于 LVM,通常执行以下操作:

parted -s /dev/sdc mklabel gpt
parted -s /dev/sdc mkpart xfs 2048s 2G

因此,我完成了第一步,将分区表类型声明为 VDO 的 GPT:

parted -s /dev/sdc mklabel gpt

并省略了分区,因为这不是必需的。

该驱动器看起来像:

$ fdisk -l /dev/sdc
Disk /dev/sdc: 5 GiB, 5368709120 bytes, 10485760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 3ACED1E3-DB5A-4240-99C3-AD280212XXXX

此后,尝试创建 VDO 卷以错误结束:

vdo create --name=vdo1 --device=/dev/sdc --vdoLogicalSize=10T
Creating VDO vdo1
vdo: ERROR - Device /dev/sdc excluded by a filter.

答案1

答案与有关磁盘标签的相关 LVM 帖子中的答案类似。看来 VDO 不需要(并且不支持)将磁盘标记为 gpt,所以我们必须将其擦除:

# wipefs -a /dev/sdc
/dev/sdc: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdc: 8 bytes were erased at offset 0x13ffffe00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdc: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/sdc: calling ioctl to re-read partition table: Success

这将使磁盘没有标签:

# fdisk -l /dev/sdc
Disk /dev/sdc: 5 GiB, 5368709120 bytes, 10485760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

VDO 将创建卷:

# vdo create --name=vdo1 --device=/dev/sdc --vdoLogicalSize=10T
Creating VDO vdo1
Starting VDO vdo1
Starting compression on VDO vdo1
VDO instance 0 volume is ready at /dev/mapper/vdo1

相关内容