创建pv时
# pvcreate /dev/md1 Device /dev/md1 not found (or ignored by filtering).
检查一下,发现已经用分区了!
# fdisk /dev/md1 Welcome to fdisk (util-linux 2.27.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): Command (m for help): n To create more partitions, first replace a primary with an extended partition. Command (m for help): p Disk /dev/md1: 931.2 GiB, 999856013312 bytes, 1952843776 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 524288 bytes / 524288 bytes Disklabel type: dos Disk identifier: 0x538ce953 Device Boot Start End Sectors Size Id Type /dev/md1p1 2048 1952843775 1952841728 931.2G 83 Linux
再重新创建
# pvcreate /dev/md1p1 WARNING: xfs signature detected on /dev/md1p1 at offset 0. Wipe it? [y/n]: y Wiping xfs signature on /dev/md1p1. Physical volume "/dev/md1p1" successfully created ~#
成功了!