TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Quick fix – Increase the size of your EC2 volume

4 点作者 yuvalo超过 12 年前

1 comment

tedchs超过 12 年前
What I would do instead is one of a few things. First, "data" of any size (&#62; 100 MB) should never be on the system volume... always have a separate data volume for exactly this reason. All these options allow the EC2 instance to stay powered on.<p>1. If you're using Linux with Logical Volume Manager (LVM), you can create a new EBS volume and and attach it as an additional disk device, then stop the file-related processes, unmount the filesystem, add a new Physical Volume (PV) to your Volume Group (VG), extend the Logical Volume (LV), and resize the filesystem (e.g. e2resize), then re-mount the filesystem.<p>2. Without LVM, attach a new, larger EBS volume, create a filesystem on it, mount it somewhere (/mnt), cp your data to it, unmount it, rm your old files from the / volume, then use the old, empty directory as the mountpoint for your new filesystem.<p>3. If you already had a separate data volume, and you don't want to split it across multiple EBS volumes, you could unmount it, snapshot it, re-constitute it as a new, larger EBS volume, resize the filesystem, and mount it in place of the old one.<p>Making an AMI and a whole new instance is totally unnecessary since resizing the system volume is an indication that you need a separate data volume.