减小AWS EC2 根分区大小

 

https://serverfault.com/questions/673048/how-to-reduce-aws-ebs-root-volume-size

 

核心点:

1,容量小的EBS, 一定不能直接创建,而是从一个小容量ROOT EBS 克隆 (snapshot, recovery)过来的,这样克隆过来的,才有分驱表,不然根本就不能启动

2. 小容量EBS 的e2label 一定要与 /etc/fstab 里面的label  一致

3. 小容易EBS 的UUID, 应用到grub.conf , 不然照样不能启动 (可用blkid 查看 UUID)

blkid /dev/sda6

/dev/sda6: LABEL=“/” UUID=”ae6dcc02-3f7f-47cc-8a6e-e29218b4d345 ” TYPE=”ext3″ SEC_TYPE=”ext2 ”

 

 

sudo rsync -aHAXxSP /mnt/snap/ /mnt/small

 

 



This entry was posted on 2017 年 06 月 23 日 and is filed under IT DOC. Written by: . You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.