阿里云 ecs Linux 想扩充一下硬盘,看文档操作步骤好繁琐,不敢动,有啥保险的办法吗?

2025 年 4 月 23 日
 liuliuliuliu
如题如题,没干过啊
4491 次点击
所在节点    云计算
43 条回复
F281M6Dh8DXpD1g2
2025 年 4 月 23 日
挂个新盘链接过去就行
coolcoffee
2025 年 4 月 23 日
可以备份一个镜像出来创建新机器去练手
sundong
2025 年 4 月 24 日
二楼给了一个很好的提议, 试试呗
gechang
2025 年 4 月 24 日
提 case
opengps
2025 年 4 月 24 日
用按量计费买台 ecs 先试验一遍
freaks
2025 年 4 月 24 日
不难啊,我记得 Linux 下有个工具专干这个的
realpg
2025 年 4 月 24 日
世界加钱可及
at 某个 V2 专业接活运维 id 记不住了 d 开头哪个
salmon5
2025 年 4 月 24 日
繁琐吗?简单的要死
salmon5
2025 年 4 月 24 日
文件系统支持:2005-02-05
Online resizing support for ext3 hit the mainline kernel in 2.6.10[2004-12-24]
last November or thereabouts. The tools to take advantage of this
support are in e2fsprogs 1.36.

操作系统支持:2011-12-09
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/virtualization_administration_guide/sub-sect-domain_commands-using_blockresize_to_change_the_size_of_a_domain_path

内核支持:2012-09-30
https://kernelnewbies.org/Linux_3.6#Block
Add a new operation code (BLKPG_RESIZE_PARTITION) to the BLKPG ioctl that allows altering the size of an existing partition, even if it is currently in use

很古老的成熟技术了
当然阿里云是近几年开放支持的
salmon5
2025 年 4 月 24 日
现在的系统几乎 100%具备这些条件了,除非 CentOS 6.x ,如果不是裸块设备,需要重启下
TracyMagic
2025 年 4 月 24 日
growpart /dev/vda 1
resize2fs /dev/vda1
vda 是你的磁盘号,df -HT 可以看到挂载点为/的那个
ryan4yin
2025 年 4 月 24 日
先备份,并且熟悉下备份恢复流程,确保有机会还原磁盘。
然后学习下在线扩容流程,如果不是根卷,一般会涉及到几个 resizefs 之类的 Linux 命令,可以跑台新机器玩一下这些命令,确保自己熟悉后再动手改线上的机器。
yulgang
2025 年 4 月 24 日
做好快照随便霍霍。
guanyujia5444
2025 年 4 月 24 日
先做快照,然后通过阿里云扩展硬盘,可以完全无命令行操作
wnpllrzodiac
2025 年 4 月 24 日
怕挂就挂载到新位置。熟手就扩充挂载点。后者用起来更方便。动态扩容。
hyseiya
2025 年 4 月 24 日
文档很详细,不算复杂吧,我扩充过几次
bitmin
2025 年 4 月 24 日
很简单吧,我记得现在阿里云后台还有一键帮你跑扩容脚本的功能
xuan_lengyue
2025 年 4 月 24 日
很简单的,growpart 再 resize2fs 就行了
tuotu
2025 年 4 月 24 日
真要是害怕,那做个全量快照,用快照按量创建出一台新的,数据盘你选择你想要的最终大小,创建出来后验证成功后,把 ip 切过去。
anthoy7
2025 年 4 月 24 日
做好快照即可有退路慢慢来

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://v2ex.xtra.eu.org/t/1127640

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX