linux parted 사용법

다들 사용하는 명령을 이제 와서 알아보자는건 아니고…
무심코 사용하다 지나칠 수 있는 내용에 대해 한번 알아봅시다.

parted /dev/sdb

명령을 이용해서 parted 콘솔로 진입해 보자…

 

현황 확인

(parted) print

Model: ATA ST3500630NS (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 500GB 500GB primary ext3

 

기존 파티션 삭제

(parted) rm 1
(parted) print

Model: ATA ST3500630NS (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags

********  이부분이 비었다 *******

 

일단 GPT 레이블 생성 (2TB 미만 용량이면 굳이 필요하지는 않은데….)

(parted) mklabel gpt

Warning: The existing disk label on /dev/sdb will be destroyed and all data on this
disk will be lost. Do you want to continue?
Yes/No? y

 

파티션 생성 : 0 ~ 100%

(parted) mkpart primary 0 100%

Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? i

  • 뭔가 찜짐한 warning 메세지 발생

 

파티션 확인

(parted) p

Model: ATA ST3500630NS (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 17.4kB 500GB 500GB primary

(parted) align-check optimal 1

1 not aligned

  • 1번 파티션이 정렬되지 않았다고…

 

파티션 재생성 : 1 ~ 100% or 0% ~ 100%

(parted) rm 1
(parted) mkpart primary 1 100%
or
(parted) mkpart primary 0% 100%
(parted) print

Model: ATA ST3500630NS (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 500GB 500GB primary

(parted) align-check optimal 1

1 aligned

  • 아까 발생했던 warning 메세지가 나오지 않음
  • 1번 파티션이 정렬되었다고 출력됨

 

딱히 크리티컬한 부분이라기 보단
그냥 한번 알아보면 좋을것 같아서…

About KENNETH 19688 Articles
지락문화예술공작단

Be the first to comment

Leave a Reply

Your email address will not be published.


*


이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.