我有一个带有 130Gb LVM 映像的 Proxmox 磁盘。我将其移动到 235Gb 磁盘。并在 Proxmox 中调整大小。完成。
但在我的 Linux 发行版中,分区仍然是 130Gb(磁盘变成 235Gb)。
分区:
/dev/sda1
/dev/sdb1
它们是 RAID1 卷的一部分:/dev/md0
在不丢失数据的情况下将其大小从 130Gb 调整为 235Gb 的正确方法是什么?
root@debian:~# fdisk -l
Disk /dev/sdb: 235 GiB, 252329328640 bytes, 492830720 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
Disklabel type: dos
Disk identifier: 0xd098f1da
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 273436671 273434624 130.4G fd Linux raid autodetect
/dev/sdb2 273436672 291502079 18065408 8.6G fd Linux raid autodetect
Disk /dev/sda: 235 GiB, 252329328640 bytes, 492830720 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
Disklabel type: dos
Disk identifier: 0x559572cb
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 273436671 273434624 130.4G fd Linux raid autodetect
/dev/sda2 273436672 291502079 18065408 8.6G fd Linux raid autodetect
Disk /dev/md0: 130.3 GiB, 139864309760 bytes, 273172480 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 /dev/md1: 8.6 GiB, 9241100288 bytes, 18049024 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@debian:~# cat /proc/mdstat
Personalities : [raid1]
md1 : active (auto-read-only) raid1 sda2[0] sdb2[1]
9024512 blocks super 1.2 [2/2] [UU]
md0 : active raid1 sda1[0] sdb1[1]
136586240 blocks super 1.2 [2/2] [UU]
bitmap: 0/2 pages [0KB], 65536KB chunk
unused devices: <none>
root@debian:~# cat /proc/partitions
major minor #blocks name
8 16 246415360 sdb
8 17 136717312 sdb1
8 18 9032704 sdb2
8 0 246415360 sda
8 1 136717312 sda1
8 2 9032704 sda2
11 0 1048575 sr0
9 0 136586240 md0
9 1 9024512 md1
谢谢!