我有一台物理服务器 (RHEL 6.7),使用标准分区,块设备 /dev/sda 上有 10 个分区。 /dev/sda6 /home 需要更多空间。
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 39G 18G 19G 49% /
tmpfs 16G 412K 16G 1% /dev/shm
/dev/sda1 477M 61M 392M 14% /boot
/dev/sda6 20G 17G 1.8G 91% /home
/dev/sda2 231G 66G 165G 29% /opt/data1
/dev/sda3 48G 2.0G 47G 4% /opt/data2
/dev/sda7 20G 2.8G 17G 15% /opt/data3
/dev/sda8 20G 3.3G 16G 18% /opt/data4
/dev/sda9 20G 14G 4.2G 78% /var
我想扩展/dev/sda6,它是/dev/sda4 扩展分区下的逻辑分区。
Disk /dev/sda: 599.9 GB, 599932581888 bytes
255 heads, 63 sectors/track, 72937 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk identifier: 0x00046047
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 30660 245760000 83 Linux
/dev/sda3 30660 37034 51200000 83 Linux
/dev/sda4 37034 72938 288398336 5 Extended
/dev/sda5 37034 42134 40960000 83 Linux
/dev/sda6 42134 44683 20480000 83 Linux
/dev/sda7 44684 47233 20480000 83 Linux
/dev/sda8 47233 49783 20480000 83 Linux
/dev/sda9 49783 52333 20480000 83 Linux
/dev/sda10 52333 54373 16384000 82 Linux swap / Solaris
parted 显示还有 153GB 的可用空间未分配:
Disk /dev/sda: 600GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
32.3kB 1049kB 1016kB Free Space
1 1049kB 525MB 524MB primary ext4 boot
2 525MB 252GB 252GB primary ext4
3 252GB 305GB 52.4GB primary ext4
4 305GB 600GB 295GB extended
5 305GB 347GB 41.9GB logical ext4
6 347GB 368GB 21.0GB logical ext4
368GB 368GB 104kB Free Space
7 368GB 389GB 21.0GB logical ext4
8 389GB 409GB 21.0GB logical ext4
9 409GB 430GB 21.0GB logical ext4
10 430GB 447GB 16.8GB logical linux-swap(v1)
447GB 600GB 153GB Free Space
600GB 600GB 309kB Free Space
如何从该可用空间中取出大约 50GB 并将其添加到 /dev/sda6 而不影响其他分区?我想我需要放弃当前的分区布局并从头开始,因为我担心什么需要保持不变以及在开始和结束扇区方面会发生什么变化?这还可以吗?