EC2规模日益扩大后,不能调整音量 [英] EC2 Can't resize volume after increasing size
问题描述
我按照步骤重新调整EC2量
I have followed the steps for resizing an EC2 volume
- 停止了实例
- 接过当前卷的快照
- 在创建新卷了previous快照与同一区域的一个更大尺寸的
- 从实例Deattached旧卷
- 连接新卷的实例在同一挂载点
古量为5GB,我创建的是100GB
现在,当我重新启动该实例,并运行 DF -h我
仍然可以看到这种
Old volume was 5GB and the one I created is 100GB
Now, when i restart the instance and run df -h I
still see this
Filesystem Size Used Avail Use% Mounted on
/dev/xvde1 4.7G 3.5G 1021M 78% /
tmpfs 296M 0 296M 0% /dev/shm
这是我所得到的运行时,
This is what I get when running
sudo resize2fs /dev/xvde1
The filesystem is already 1247037 blocks long. Nothing to do!
如果我跑执行cat / proc /分区
我看
202 64 104857600 xvde
202 65 4988151 xvde1
202 66 249007 xvde2
据我了解,如果我按照正确的步骤xvde应该有相同的数据,xvde1,但我不知道如何使用它
From what I understand if I have followed the right steps xvde should have the same data as xvde1 but I don't know how to use it
我如何使用新的卷或卸除xvde1并安装xvde呢?
How can I use the new volume or umount xvde1 and mount xvde instead?
我不明白我在做什么错
我也试过须藤ifs_growfs的/ dev / xvde1
xfs_growfs: /dev/xvde1 is not a mounted XFS filesystem
顺便说一句,这是一个Linux机器在CentOS 6.2 x86_64的
Btw, this a linux box with centos 6.2 x86_64
在此先感谢您的帮助
推荐答案
感谢您Wilman你的命令工作正常,小的改进需要的,如果我们增加EBSS到更大的尺寸要考虑
Thank you Wilman your commands worked correctly, small improvement need to be considered if we are increasing EBSs into larger sizes
- 停止实例
- 从卷创建一个快照
- 基于快照增加大小创建一个新的卷
- 检查并记住当前的卷装入点(即
的/ dev / sda1的
) - 在分离当前的音量
- 附加最近创建的卷到该实例,设置准确的安装点
- 重新启动实例
-
通过SSH访问实例并运行
FDISK的/ dev / xvde
- Stop the instance
- Create a snapshot from the volume
- Create a new volume based on the snapshot increasing the size
- Check and remember the current's volume mount point (i.e.
/dev/sda1
) - Detach current volume
- Attach the recently created volume to the instance, setting the exact mount point
- Restart the instance
Access via SSH to the instance and run
fdisk /dev/xvde
警告:DOS兼容模式是pcated德$ P $。它强烈建议 关闭模式(命令C),并改变显示单位 部门(命令'U')
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u')
按<大骨节病> P 骨节病>显示当前分区
这篇关于EC2规模日益扩大后,不能调整音量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!