CentOS 7 서버는 LUKS 및 /boot
. /boot/efi
그런 다음 대규모 LUKS 암호화된 나머지 파티션(1.8TB)에 추가 파티셔닝이 필요했습니다. CentOS 7을 설치하는 동안 하드 드라이브의 필요한 부분을 LUKS 암호화할 수 있었지만 이제는 대규모 LUKS 파티션 내에 추가 파티션을 생성할 수 없습니다. 대규모(1.8TB) LUKS 암호화 파티션에 파티션을 생성하는 방법은 무엇입니까? 지금까지 시도한 실제 터미널 로그는 다음과 같습니다.
[root@localhost ~]# fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt
# Start End Size Type Name
1 2048 411647 200M EFI System EFI System Partition
2 411648 1435647 500M Microsoft basic
3 1435648 105850879 49.8G Microsoft basic
4 105850880 121841663 7.6G Linux swap
Disk /dev/mapper/luks-fb2eda94-fcff-4624-8b04-a9786845504a: 53.5 GB, 53458501632 bytes, 104411136 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/luks-08f8bdb9-85bf-45ef-9519-3f38906c489a: 1938.0 GB, 1938005426176 bytes, 3785166848 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
[root@localhost ~]# df -T -h
Filesystem Type Size Used Avail Use% Mounted on
/dev/dm-0 ext4 49G 1.1G 46G 3% /
devtmpfs devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs tmpfs 3.8G 0 3.8G 0% /dev/shm
tmpfs tmpfs 3.8G 8.7M 3.8G 1% /run
tmpfs tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/sda2 ext4 477M 110M 338M 25% /boot
/dev/sda1 vfat 200M 9.8M 191M 5% /boot/efi
/dev/dm-1 ext4 1.8T 77M 1.7T 1% /home
[root@localhost ~]# parted
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA WDC WD20EZRX-00D (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 211MB 210MB fat16 EFI System Partition boot
2 211MB 735MB 524MB ext4
3 735MB 54.2GB 53.5GB
4 54.2GB 62.4GB 8187MB linux-swap(v1)
5 62.4GB 2000GB 1938GB
(parted) unit compact
(parted) select /dev/dm
Error: Could not stat device /dev/dm - No such file or directory.
Retry/Cancel? cancel
(parted) select /dev/dm-1
Using /dev/dm-1
(parted) rm 5
Error: Partition doesn't exist.
(parted) print
Model: Linux device-mapper (crypt) (dm)
Disk /dev/dm-1: 1938GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 1938GB 1938GB ext4
(parted) quit
[root@localhost ~]# parted
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA WDC WD20EZRX-00D (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 211MB 210MB fat16 EFI System Partition boot
2 211MB 735MB 524MB ext4
3 735MB 54.2GB 53.5GB
4 54.2GB 62.4GB 8187MB linux-swap(v1)
5 62.4GB 2000GB 1938GB
(parted) unit compact
(parted) rm 5
Error: Partition(s) 5 on /dev/sda have been written, but we have been
unable to inform the kernel of the change, probably because it/they are
in use. As a result, the old partition(s) will remain in use. You
should reboot now before making further changes.
Ignore/Cancel? cancel
(parted) quit
Information: You may need to update /etc/fstab.
편집하다:
@TomHunt의 제안에 따라 컴퓨터에 CentOS 7을 다시 설치했습니다.이 시간을 활용하세요LVM
대형 1.8TB 파티션을 포함하여 모든 관련 파티션에 대한 파티션 유형. 그런데 1.8TB 파티션을 준비하려고 하면 parted
여전히 같은 오류가 발생합니다. rm 3
가장 최근 시도에 대한 터미널 로그는 다음과 같습니다.
[root@localhost ~]# fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt
# Start End Size Type Name
1 2048 411647 200M EFI System EFI System Partition
2 411648 1435647 500M Microsoft basic
3 1435648 3906914303 1.8T Microsoft basic
Disk /dev/mapper/luks-75fe4a52-a76f-4dfb-8cb9-da59ba955a55: 1999.6 GB, 1999602974720 bytes, 3905474560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/centos-swap: 8187 MB, 8187281408 bytes, 15990784 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/centos-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/centos-home: 1937.7 GB, 1937718116352 bytes, 3784605696 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
[root@localhost ~]# df -T -h
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/centos-root ext4 50G 836M 46G 2% /
devtmpfs devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs tmpfs 3.8G 0 3.8G 0% /dev/shm
tmpfs tmpfs 3.8G 8.6M 3.8G 1% /run
tmpfs tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/sda2 xfs 494M 115M 379M 24% /boot
/dev/sda1 vfat 200M 9.8M 191M 5% /boot/efi
/dev/mapper/centos-home ext4 1.8T 77M 1.7T 1% /home
[root@localhost ~]# parted
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA WDC WD20EZRX-00D (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 211MB 210MB fat16 EFI System Partition boot
2 211MB 735MB 524MB xfs
3 735MB 2000GB 2000GB
(parted) rm 3
Error: Partition(s) 3 on /dev/sda have been written, but we have been unable to inform
the kernel of the change, probably because it/they are in use. As a result, the old
partition(s) will remain in use. You should reboot now before making further changes.
Ignore/Cancel? cancel
(parted) quit
Information: You may need to update /etc/fstab.
그렇다면 이 드라이브를 어떻게 분할합니까?