我更改了Amazon EC2实例大小,但是我的 /dev /nvme0n1p1分区的大小不会增加

发布于 2025-01-25 11:31:38 字数 1565 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

逐鹿 2025-02-01 11:31:38

这与您的案例相匹配:

假设您已将实例的引导量(例如T2实例)从8 GB到16 GB进行了调整,并从8 GB到30 GB。

因此,您需要按照以下步骤来扩展卷:

扩展了EBS卷的文件系统

编辑:

看,您知道有尺寸 16TB (terrabytes 不是 gigabytes)。如前所述,该卷格式为MBR。

您需要将其转换为GPT格式驱动器。请按照此指南

警告!备份可能会丢失您的数据。 这是如何创建EBS Snapshot

另外,您可以缩小尺寸 EBS卷,但这需要一点EBS魔术。

- Snapshot the volume
- Create a new smaller EBS volume
- Attach the new volume
- Format the new volume
- Mount the new volume
- Copy data from old volume to the new volume
- Prepare the new volume
- Detach and unmount old volume

This matches your case:

suppose that you have resized the boot volume of an instance, such as a T2 instance, from 8 GB to 16 GB and an additional volume from 8 GB to 30 GB.

So, you need to extend the volume, by following these steps:

Extend the file system of EBS volumes.

EDIT:

Look, you know have a volume of size 16TB (terrabytes not gigabytes). As mentioned already, the volume formatted as MBR.

You need to convert it to a GPT format drive. Follow this guide.

WARNING! Make back-up as might lose your data. Here's how to create an EBS snapshot

Alternatively, you can downsize the EBS volume, but that's requires a little bit of EBS magic.

- Snapshot the volume
- Create a new smaller EBS volume
- Attach the new volume
- Format the new volume
- Mount the new volume
- Copy data from old volume to the new volume
- Prepare the new volume
- Detach and unmount old volume
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文