「LVM」- 常见错误汇总

  CREATED BY JENKINSBOT

#1 Device /dev/sdb excluded by a filter

Vgextend : “device excluded by a filter”
pvcreate –restorefile fails “/dev/sdx device not found or ignored by filtering” in XenServer
[linux-lvm] pvcreate can’t use entire disk?
How to wipe a signature from a disk device on Linux with wipefs command
[SOLVED] [LVM] pvcreate – ignored by filtering

问题描述:
执行pvcreate时,产生如下错误:

Device /dev/sdb excluded by a filter

如果想找到问题原因,可以使用-v选项来显示调试信息,使用多次可以增加调试信息的输出量。

问题原因:
执行pvcreate -vv /dev/sdb1输出调试信息,问题原因如下:

/dev/sdb: Skipping: Partition table signature found

具体的原因没有找到,难道是不能用整盘?但是我在CentOS下测试(虚拟机里的虚拟磁盘)了,没问题。

解决方法:
创建了新的分区,然后在分区上创建了PV:pvcreate /dev/sdb1

最开始,出错的时候是在/dev/sdb上创建PV的,那时候没有分区,但这个问题不是因为未分区导致的。

#2 vgcreate — volume group directory or file already exists

Re: [linux-lvm] cannot create a volume group named the same as one already removed
[linux-lvm] cannot create a volume group named the same as one already removed

问题描述:
当执行vgcreate命令创建卷组时,提示如下错误:

vgcreate -- volume group directory or file already exists
vgcreate -- please choose a different name

当执行vgremove删除该卷组时,又提示如下错误

vgremove -- volume group "volgrp2" doesn't exist

问题原因:
没有具体说明及解释。

解决办法:
使用rm命令,删除该卷组:

rm -r /dev/<your vg name>