我的任务是调整远程服务器上的分区大小。 我已经读了它,并明白,我需要卸载并使用resize2fs /dev/sda来扩大分区大小。 有人可以帮我卸下分区或指导我做到这一点,设置的细节:
更新,磁盘空间现在是200GB,但仍然需要帮助将分区扩大到其全尺寸
fdisk -l
输出
Disk /dev/sda: 214.7 GB, 214748364800 bytes 255 heads, 63 sectors/track, 26108 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00080e9a 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 2611 20458496 8e Linux LVM Disk /dev/mapper/vg_livecd-lv_root: 18.8 GB, 18832424960 bytes 255 heads, 63 sectors/track, 2289 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg_livecd-lv_root doesn't contain a valid partition table Disk /dev/mapper/vg_livecd-lv_swap: 2113 MB, 2113929216 bytes 255 heads, 63 sectors/track, 257 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg_livecd-lv_swap doesn't contain a valid partition table
和
df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_livecd-lv_root 18G 2.8G 15G 17% / tmpfs 1004M 0 1004M 0% /dev/shm /dev/sda1 485M 33M 427M 8% /boot
在大多数情况下,您可以在线调整文件系统大小,不需要卸载它。
它看起来像你正在使用LVM所以在高层次你的步骤是: