2TB 넘는 파일시스템은 parted로 생성해야 됨
- parted 명령어는 리눅스 환경에서 디스크 파티션을 조작하고 관리하는 데 사용
- 파티션 생성 -> 피지컬볼륨 생성 -> 볼륨그룹 생성 -> 로지컬볼륨 생성 -> 파일시스템 생성 -> 파일시스템 마운트
디스크 할당 작업 순서
Disk /dev/vde: 2684.4 GB, 2684354560000 bytes, 5242880000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@test ~]# parted /dev/vde
GNU Parted 3.1
Using /dev/vde
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Error: /dev/vde: unrecognised disk label
Model: Virtio Block Device (virtblk)
Disk /dev/vde: 2684GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
(parted) mklabel gpt
(parted) print
Model: Virtio Block Device (virtblk)
Disk /dev/vde: 2684GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
(parted) mkpart primary 0 2684GB
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? Ignore
(parted) print
Model: Virtio Block Device (virtblk)
Disk /dev/vde: 2684GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 2684GB 2684GB primary
(parted) q
Information: You may need to update /etc/fstab.
[root@test ~]# fdisk -l
Disk /dev/vda: 32.2 GB, 32212254720 bytes, 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b288e
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 62914526 31456239+ 83 Linux
Disk /dev/vde: 2684.4 GB, 2684354560000 bytes, 5242880000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt
Disk identifier: 7C2C722A-6E85-4F89-BAF7-B2159A98E237
Start End Size Type Name
1 34 5242879966 2.5T Microsoft basic primary
1. Parted 명령어
- 2TB 이상의 파일시스템을 생성할 때는 fdisk 명령어로 사용할 수 없음
- 대용량 파일시스템의 경우 parted 명령어를 사용하여 생성
- fdisk는 Write를 통해 적용 가능하지만, Parted는 명령 즉시 적용
2. 활성화 된 디스크 확인
- fdisk에서 지원하는 모든 파일시스템을 지원함
[root@ServerA]# fdisk -l
3. Parted 명령 수행
[root@ServerA]# parted /dev/sdb (해당 디스크의 Parted 명령 수행)
(parted) mklabel gpt(GPT 라벨 생성)
(parted) p (디스크 정보 표시)
Diskgeometry for /dev/sdb : 0.000-2622488.000 megabytes
(parted) mkpart(파티션 생성)
Partitiontype? [Primary]? Primary
Filesystem Type? [ext2]? ext4
Start? 0
End? 2622488
(parted) q (Parted 명령어 종료)
- End 내용을 -1s로 입력하면 남은 공간의 전부를 사용한다는 의미
- 파일시스템 생성
[root@ServerA]# mkfs-t ext4 /dev/sdb1