딜미의 잡다한 IT 이야기...

Parted & Gdisk 사용법 본문

Server/Linux

Parted & Gdisk 사용법

딜미 2019. 9. 9. 10:39

Parted?

주로 2TB 이상의 파티션을 생성할 때 많이 사용하는 명령어로 파티션을 생성, 삭제, 축소, 확장이 가능한 명령어

parted --help

 

Parted 사용법

parted 파티셔닝할 디바이스경로

parted /dev/sdb

mklabel 라벨명(mbr or gpt 선택 2TB이상 용량은 gpt로 선언)

mklabel gpt

mkpart 파티션종류선택 시작용량 끝나는용량

mkpart primary 0% 100%

print (설정된 내용확인)

quit (parted 종료)

 

 

gdisk?

GPT fdisk 로 기존 fdisk에서 생성이 불가한 GPT Partition 전용 프로그램

일반적으로 Parted 보다 gdisk를 사용하기를 권장한다. GdiskParted보다 Data에 대한

안정적인 운영이 가능하다.

 

gdisk 사용법

gdisk 파티셔닝할 디바이스정보

gdisk /dev/sdb

Command (? For help): o <=gpt로 선언

Command (? For help): n <=새로운 파티션 선언

Partition number (1-128, default 1): <=파티셔닝 번호 sdb1,2,3…

First sector (34-209715166, default = 2048) or {+-}size{KMGTP}: <=처음시작하는 섹터 기본 2048

Last sector (2048-209715166, default = 209715166) or {+-}size{KMGTP}:<=마지막으로 끝나는 섹터

Current type is 'Linux filesystem' <=현재 파일시스템 타입

Hex code or GUID (L to show codes, Enter = 8300):<=변경할 파일시스템 코드 기본 8300

Command (? for help): p<= 설정한 내용 확인을 위해 p입력

Disk /dev/sdb: 209715200 sectors, 100.0 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 12A20D72-5DF6-4417-A64A-0C86D79990B2

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 209715166

Partitions will be aligned on 2048-sector boundaries

Total free space is 2014 sectors (1007.0 KiB)

 

Number  Start (sector)    End (sector)  Size       Code  Name

   1            2048       209715166   100.0 GiB   8300  Linux filesystem

 

Command (? for help): w <= 설정한 내용 적용을 위해 w입력

 

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING

PARTITIONS!!

 

Do you want to proceed? (Y/N): y <=진행 해야하니 yes

OK; writing new GUID partition table (GPT) to /dev/sdb.

The operation has completed successfully.

[root@localhost ~]#

'Server > Linux' 카테고리의 다른 글

FIREWALL 설정 관리  (0) 2019.09.23
SELINUX 설정 방법  (0) 2019.09.10
nmcli 사용방법  (2) 2019.09.06
강글리아(Ganglia) 설치 방법  (0) 2019.09.04
리눅스 Log 관련 확인 명령어 모음  (0) 2017.03.30
Comments