Linux
lvm2 pvcreate 명령사용시 Cannot use /dev/sda device is partitioned 출력될때
CecilDeSK
2025. 3. 2. 22:10
반응형
root@Cecildebian:~# pvcreate /dev/sdb
Cannot use /dev/sdb: device is partitioned
root@Cecildebian:~# pvcreate /dev/sdd
Cannot use /dev/sdd: device is partitioned
root@Cecildebian:~# pvcreate /dev/sdc
Cannot use /dev/sdc: device is partitioned
root@Cecildebian:~# pvcreate /dev/sde
Cannot use /dev/sde: device is partitioned
원래 하드드라이브가 레이드가 구성되어있던것이라던가 lvm를 설정중이던가 하면 파일시스템정보 파티션테이블 서명 등 메타데이터가 남아있을수 있어 삭제하는 작업이 필요하다.
wipefs 명령을 사용한다.
root@Cecildebian:~# wipefs --all --backup /dev/sdb
/dev/sdb: 2 bytes were erased at offset 0x000001fe (dos): 55 aa
/dev/sdb: calling ioctl to re-read partition table: Success
root@Cecildebian:~# wipefs --all --backup /dev/sdd
/dev/sdd: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdd: 8 bytes were erased at offset 0x3a3817d5e00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdd: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/sdd: calling ioctl to re-read partition table: Success
root@Cecildebian:~# wipefs --all --backup /dev/sdc
/dev/sdc: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdc: 8 bytes were erased at offset 0x3a3817d5e00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdc: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/sdc: calling ioctl to re-read partition table: Success
root@Cecildebian:~# wipefs --all --backup /dev/sde
/dev/sde: 2 bytes were erased at offset 0x000001fe (dos): 55 aa
/dev/sde: calling ioctl to re-read partition table: Success
반응형