在虚拟机中添加SCSI格式的磁盘做PV时出现如下报错:Device devsdc excluded by a filter
作者:互联网
在虚拟机中添加SCSI格式的磁盘做PV时出现如下报错:Device /dev/sdc excluded by a filter.
[root@CentOS8 ~]#pvcreate /dev/sdc
Device /dev/sdc excluded by a filter.
1.导致问题的原因是添加的磁盘是在另一个虚拟机中新建的,已经有了分区表,现在的虚拟机并不能识别磁盘的分区表,运行parted命令重做分区表,中途需要输入三次命令。
[root@CentOS8 ~]#parted /dev/sdc
GNU Parted 3.2
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel msdos
Warning: The existing disk label on /dev/sdc will be destroyed and all data on this disk will be lost.
Do you want to continue?
Yes/No? yes
(parted) quit
Information: You may need to update /etc/fstab.
2.再次运行pvcreate,问是否擦除dos签名,输入y,就可以将磁盘创建为PV了。
[root@CentOS8 ~]#pvcreate /dev/sdc
WARNING: dos signature detected on /dev/sdc at offset 510. Wipe it? [y/n]: y
Wiping dos signature on /dev/sdc.
Physical volume "/dev/sdc" successfully created.
标签:parted,PV,虚拟机,dev,分区表,报错,sdc,磁盘 来源: https://blog.csdn.net/wxw327/article/details/115643426