返回总目录页

阿里云系统盘扩容

创建快照,然后系统盘点击扩容,在线扩容,不需要关机。

 

[root@otter007.mcw.com mcw]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        99G  6.1G   88G   7% /
devtmpfs        1.8G     0  1.8G   0% /dev
tmpfs           1.8G   12K  1.8G   1% /dev/shm
tmpfs           1.8G  360K  1.8G   1% /run
tmpfs           1.8G     0  1.8G   0% /sys/fs/cgroup
tmpfs           365M     0  365M   0% /run/user/3001
[root@otter007.mcw.com mcw]#
[root@otter007.mcw.com mcw]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vda    253:0    0  300G  0 disk 
└─vda1 253:1    0  100G  0 part /
[root@otter007.mcw.com mcw]# yum install cloud-utils-growpart

[root@otter007.mcw.com mcw]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vda    253:0    0  300G  0 disk 
└─vda1 253:1    0  100G  0 part /
[root@otter007.mcw.com mcw]# LC_ALL=en_US.UTF-8 growpart /dev/vda 1
CHANGED: partition=1 start=2048 old: size=209711104 end=209713152 new: size=629143519 end=629145567
[root@otter007.mcw.com mcw]# resize2fs  /dev/vda1 
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/vda1 is mounted on /; on-line resizing required
old_desc_blocks = 7, new_desc_blocks = 19
The filesystem on /dev/vda1 is now 78642939 blocks long.

[root@otter007.mcw.com mcw]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vda    253:0    0  300G  0 disk 
└─vda1 253:1    0  300G  0 part /
[root@otter007.mcw.com mcw]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       296G  6.1G  277G   3% /

 

 

 

posted @ 2024-08-17 18:01  马昌伟  阅读(35)  评论(0编辑  收藏  举报
博主链接地址:https://www.cnblogs.com/machangwei-8/