2025.05.29 | vance | 325次围观
阿里云的ECS,磁盘不足,控制台进行在线扩容后,进行服务器内的分区扩容步骤:
➜ ~ cat /etc/issue
Ubuntu 16.04.6 LTS \n \l
➜ ~ fdisk -l
Disk /dev/vda: 65 GiB, 69793218560 bytes, 136314880 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: 0xe2eb87fa
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 136314846 136312799 40G 83 Linux
➜ ~ apt install cloud-guest-utils
...
➜ ~ growpart /dev/vda 1
CHANGED: partition=1 start=2048 old: size=83883999 end=83886047 new: size=136312799,end=136314847
➜ ~ resize2fs /dev/vda1
resize2fs 1.42.13 (17-May-2015)
Filesystem at /dev/vda1 is mounted on /; on-line resizing required
old_desc_blocks = 3, new_desc_blocks = 5
The filesystem on /dev/vda1 is now 17039099 (4k) blocks long.
done
发表评论