AWS resize root partition on HVM (specially centos)

By | November 23, 2015

Here the step by step instructions

1. Launch another instance using same AMI to do work on in same AZ as
instance with device we want to resize.
2. Shut down instance with device we want to resize
3. Detach device and attach to new instance.

4. sudo parted /dev/xvdf (run parted with the device….NOT THE PARTION)
5. unit s (switch using from gigs to sections)
6. print (print so we have something to compare against)
7. rm 1
8. mkpart primary 2000s 100% (starting block starts at 2000 and not 2048
like normal)
9. ignore (type ignore if it complains about the starting sector)
10. set 1 boot on (make sure boot flag is set)

11. sudo e2fsck -f /dev/xvdf1 (takes long time)

 

Сomments аrchive