- fdisk : msdos partition 사용, 최대 2TB의 파티션, 최대 4TB까지의 디스크만 사용 가능
- 이 이상의 대용량 사용을 위해서는 GPT Partition을 사용해야 함
1. check GPT enabled (GPT 사용 가능 여부 확인)
# cat /boot/config-3.10.0–327.el7.x86_64 | grep EFI
CONFIG_EFI_PARTITION=y
CONFIG_EFI=y
CONFIG_FB_EFI=y
CONFIG_EFI_VARS=y
위 4개가 “y”로 enable 되어 있어야 함
2. allocating disks and check them using ‘fdisk’
(1) 용량 확인
# fdisk -l
Disk /dev/sdb: 2254.9 GB, 2254857830400 bytes, 4404019200 sectors
Disk /dev/sdc: 2254.9 GB, 2254857830400 bytes, 4404019200 sectors
Disk /dev/sdd: 2254.9 GB, 2254857830400 bytes, 4404019200 sectors
(2) trying to using ‘fdisk’ to create new partitions
# fdisk /dev/sdb
WARNING: The size of this disk is 2.3 TB (2254857830400 bytes).
DOS partition table format can not be used on drives for volumes
larger than (2199023255040 bytes) for 512-byte sectors. Use parted(1) and GUID
partition table format (GPT).
3. using ‘parted’ (parted로 파티션 타입 확인 및 GPT로 변경)
# parted
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) select /dev/sdb
Using /dev/sdb
(parted) print
Error: /dev/sdb: unrecognised disk label
Model: NUTANIX VDISK (scsi)
Disk /dev/sdb: 2255GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
(parted) mklabel gpt
(parted) print
Model: NUTANIX VDISK (scsi)
Disk /dev/sdb: 2255GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
4. partition 생성
(1) 0 cylinder에서 시작할 경우 alignment에 의한 성능 경고 출력
(parted) mkpart
Partition name? []? myBigfs
File system type? [ext2]? ext4
Start? 0
End? 100%
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? Ignore
(parted) print
Model: NUTANIX VDISK (scsi)
Disk /dev/sdb: 2255GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 2255GB 2255GB myBigfs
(2) 자동으로 alignment 확인하려면 0% ~ 100% 사용
(parted) mkpart
Partition name? []? myBigfs
File system type? [ext2]? ext4
Start? 0%
End? 100%
(parted) print
Model: NUTANIX VDISK (scsi)
Disk /dev/sdb: 2255GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 2255GB 2255GB myBigfs
(3) 수동으로 alignment 확인하여 생성
# cat /sys/block/sdb/queue/optimal_io_size
1048576
# cat /sys/block/sdb/queue/minimum_io_size
262144
# cat /sys/block/sdb/alignment_offset
0
# cat /sys/block/sdb/queue/physical_block_size
512
(optimal_io_size+alignment_offset)/physical_block_size ==> 위 예에서는 (1048576+0)/512 = 2048
(parted) mkpart
Partition name? []? myBigfs
File system type? [ext2]? ext4
Start? 2048s >>> cylinder 지정 할 경우 뒤에 s 를 반드시 붙여줘야 함
End? 100%
(parted) print
Model: NUTANIX VDISK (scsi)
Disk /dev/sdb: 2255GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 2255GB 2255GB myBigfs
5. 생성된 파티션을 LVM에서 사용하게 설정
(parted) select /dev/sdb
Using /dev/sdb
(parted) set 1 lvm on
(parted) print
Model: NUTANIX VDISK (scsi)
Disk /dev/sdb: 2255GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 2255GB 2255GB myBigfs lvm
'IT > linux' 카테고리의 다른 글
SELinux 설정 : semanage (0) | 2022.06.10 |
---|---|
linux LVM (0) | 2022.06.10 |
alternatives 설정 (java 설치 후 기존 버전 선택 시) (0) | 2022.06.10 |
swap 용량 변경 (0) | 2022.06.10 |
CentOS 6에 JBoss, NGINX 설치 및 기본 연동 (0) | 2015.09.12 |