fdisk 로 GPT 타입 파티셔닝

과거(RHEL6 포함 이전)에는 fdisk로는 mbr(dos) 타입만 생성이 가능했었다. 그래서 2TB이상 파티셔닝을 하기 위해 gpt 타입으로 만들기 위해서는 parted를 사용하거나 gdisk를 사용하여 파티셔닝을 진행했었다.

하지만 RHEL 10 버전부터는 gdisk 패키지가 제거되기도 하고 fdisk 자체에도 gpt 기능이 추가된 이후로는 가급적 모든 파티셔닝 작업은 fdisk를 사용하는것을 권장합니다.

util-linux 패키지 버전 2.26부터 지원합니다.

gpt 파티셔닝

fdisk 를 이용하여 gpt파티셔닝하는것은 매우 간단하다.
간단히 g옵션으로 gpt타입으로 변경하면 된다

[root@rhcs8-1 ~]# fdisk /dev/sda

Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x2536c008.

Command (m for help): p
Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 8388608 bytes
Disklabel type: dos
Disk identifier: 0x2536c008

Command (m for help): g
Created a new GPT disklabel (GUID: 7A77764B-EDA4-1C4D-BB52-9171558C4FCF).

Command (m for help): p
Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 8388608 bytes
Disklabel type: gpt
Disk identifier: 7A77764B-EDA4-1C4D-BB52-9171558C4FCF

Command (m for help):