vgextend_error_Device devsdc excluded by a filter
1.问题描述
vgextend myvg /dev/sdc # 将/dev/sdc磁盘不分区直接扩容至myvg卷组
# 报错: Device /dev/sdc excluded by a filter.
fdisk -l /dev/sdc # 查看磁盘标签类型
2.问题分析
由于之前对/dev/sdc磁盘进行过分区,磁盘标志类型为gpt,所以扩容卷组时检测到分区中已存在分区表,于是放弃新建,遂报错:Device /dev/sdc excluded by a filter.设备/dev/sdc已被过滤器过滤。
3.解决方案
1.parted /dev/sdc
2.mklabel msdos
3.yes
4.quit退出
5.vgextend myvg /dev/sdc
6.y确认擦去dos签名
7.vgs查看卷组可用容量
[root@localhost ~]# parted /dev/sdc
GNU Parted 3.1
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.
[root@localhost ~]# vgextend myvg /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.
Volume group "myvg" successfully extended
vgs # 查看卷组可用容量