报错信息
这种情况可能的报错信息有:
The device contains ‘LVM2_member’ signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.
或
Device already contains a LVM2_member signature; it will be removed by a write command
或
设备已包含一个 ‘LVM2_member’ 签名,写入命令会将其移除。请参见 fdisk(8) 的手册页和 --wipe 选项以了解更多细节。
或
设备已包含一个 LVM2_member 签名;写入命令会将其移除。
报错原因分析
从报错信息可以看出,正在编辑的设备,包含了LVM2_member 签名,这说明可能当前该设备已经直接被创建了PV而没有在分区中创建PV,所以无法再此基础上进行分区或者使用fdisk修改设备。
使用lsblk
命令查看,该设备被直接创建了PV:
相较于/dev/sda
来说,是在/dev/sda2分区上创建的PV,所以设备sda可以使用