阿里云数据盘扩容
查看云盘分区情况
fdisk -lu
------
Disk /dev/vda: 107.4 GB, 107374182400 bytes, 209715200 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 label type: dos
Disk identifier: 0x000b2d99
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 209712509 104855231 83 Linux
Disk /dev/vdb: 1073.7 GB, 1073741824000 bytes, 2097152000 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
其中/dev/vdb原来500G,在阿里云选择在线扩容,通过 fdisk -lu 显示已经是1073.7G, 但df -Th 查看,仍然还是493G
df -Th
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 16G 0 16G 0% /dev
tmpfs tmpfs 16G 2.3M 16G 1% /dev/shm
tmpfs tmpfs 16G 804K 16G 1% /run
tmpfs tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/vda1 ext4 99G 58G 37G 61% /
/dev/vdb ext4 493G 425G 45G 91% /app
tmpfs tmpfs 3.2G 0 3.2G 0% /run/user/0
只需一个操作:
resize2fs /dev/vdb
检查扩容结果
df -Th
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 16G 0 16G 0% /dev
tmpfs tmpfs 16G 2.3M 16G 1% /dev/shm
tmpfs tmpfs 16G 804K 16G 1% /run
tmpfs tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/vda1 ext4 99G 58G 37G 61% /
/dev/vdb ext4 985G 425G 517G 46% /app
tmpfs tmpfs 3.2G 0 3.2G 0% /run/user/0
- 本文标签: Linux
- 本文链接: https://www.jimmy2k.top/article/239
- 版权声明: 本文由JimmyZ的个人博客原创发布,转载请遵循《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权