[LVM] Cannot use /dev/sdX: device is partitioned

pvcreate /dev/sdX LVM의 pv 생성하고 싶으나 아래 문구로 진행할 수 없다.

  Cannot use /dev/sdX: device is partitioned

fdisk -l /dev/sdX 살펴 보았을때 gpt 파티션 용도로 지정되어있다

root@14ZB990:~# fdisk -l /dev/sdX
Disk /dev/sdX: 14.55 TiB, 16000900661248 bytes, 31251759104 sectors
Disk model: M001G-2KK103    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: FF35CB1D-FFFF-0000-FFFF-FFFFFFFFFFF

wipefs 명령어로 디스크 타입을 없애도록 한다.

root@14ZB990:~# wipefs -a /dev/sdX
/dev/sdX: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdX: 8 bytes were erased at offset 0xe8d7ffffe00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdX: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/sdX: calling ioctl to re-read partition table: Success

다시 pvcreate 시도하면 lvm 전용 볼륨으로 정상적으로 생성할 수 있다.

root@14ZB990:~# pvcreate /dev/sdX
  Physical volume "/dev/sdX" successfully created.