linux - CentOS7 的 EC2 根卷扩展

标签 linux amazon-web-services amazon-ec2 centos centos7

我的 EC2 运行 CentOS 7 HVM 社区镜像,默认为 xfs 文件系统,我有一个 10GB 的根卷,在分离 > 创建快照 > 重新附加到/dev/sda1 后我扩展到 15GB 但我注意到我不必运行任何类型的调整大小命令,就像我们必须运行 resize2fs 和 ext 文件系统一样,分区现在显示 15GB,无需执行任何操作。虽然有一个命令 xfs_growfs 但即使这样我也没有运行。

那么,这是 xfs 在 EC2 世界(和其他世界)中扩展的正常行为,还是其他?

问候, 农场

最佳答案

这是 Amazon Linux AMI 上的正常行为。

来自 Amazon Linux AMI 2014.03 Release Notes :

Cloud-Init 0.7.2

Cloud-Init has been updated to the 0.7 series, adding a number of useful features. One example is dracut-modules-growroot, which automatically resizes your root filesystem on boot.

我注意到 CentOS 7 (x86_64) with Updates HVM说:

Starting with CentOS-7 we now include cloud-init support in all CentOS AMI's

因此,您的磁盘镜像可能正在使用此版本的 cloud-init 来自动调整大小。

请注意,Amazon Linux AMI 基于 CentOS,因此您可能希望使用它们而不是 CentOS AMI,因为它们由 AWS 直接更新。

关于linux - CentOS7 的 EC2 根卷扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30395227/

相关文章:

linux - 在 Bash 中,根据文件名将文件移动到目录

amazon-web-services - 描述卷中的 ec2-automate-backup 错误

amazon-web-services - 如何在不同的目录而不是 hive_metastore 中发布增量实时表(DLT)

linux - 如何通过backgm在网络连接之前保持闪屏直到网络正常并进入youtube页面

linux - 一次杀死多个进程只能手动工作,不能从脚本内部工作

linux - 使用大括号的 Bash for 循环出现意外输出

amazon-web-services - terraform中aws_iam_user_login_profile的PGP key

amazon-web-services - AWS EC2 - 尝试上传新文件时 FTP 返回错误 451

amazon-web-services - AWS/EC2/Ubuntu/Nginx - Web 根在哪里?

amazon-web-services - elastic-beanstalk docker应用在部署时未更新