赞
踩
在阿里云控制台选择不关机扩容后, 如何在线无损扩容
在线扩容前, 需要满足的条件:
- uname -a 内核需要3.6以上
yum install cloud-utils-growpart
yum install xfsprogs
[root@ecshost ~]# growpart /dev/vda 1
CHANGED: partition=1 start=2048 old: size=41940992 end=41943040 new: size=209710462,end=209712510
有时会报错误,设置一下编码就好了:
[root@ecshost ~]# growpart /dev/vda 1
unexpected output in sfdisk --version [sfdisk,来自 util-linux 2.23.2]
[root@ecshost ~]# LANG=en_US.UTF-8
[root@ecshost ~]# resize2fs /dev/vda1
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/vda1 is mounted on /; on-line resizing required
old_desc_blocks = 2, new_desc_blocks = 7
The filesystem on /dev/vda1 is now 26213807 blocks long.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。