[CentOS-virt] CentOS Images on AWS with partitions on /dev/xvda1 are awkwared to resize
nathan at gt.net
Thu Apr 30 20:11:26 UTC 2015
> > So you're working from the command line tools in the EPEL 'cloud-init'
> > package, not the AWS GUI? Because when I tried expanding the size of
> > the base disk image in the GUI, I wound up with an an 8 Gig default
> > /dev/xvda1 on a 20 Gig /dev/xvda. That's why I was looking at "how do
> > I resize this thing safel?"
No experience with amazon here, but I routinely resize filesystems online without issues.
Repartition xvda so that xvda1 is the size you want (make sure you use the same start sector, just change the end of the partition). Run partprobe and confirm that fdisk -l /dev/xvda1 shows the new size. (You may need to reboot). After that just run resize2fs /dev/xvda1 (works online).
More information about the CentOS-virt