Problem
I have a physical machine with 1 TB disk and it was copied via command line dd, the disk was imported into S3 and successfully converted to AMI. But now I have a cost problem and I need to reduce this machine to 30 GB. I am looking for a solution on the internet but all tutorials found do not cite cases with lvm partitions.
What i tried
https://n2ws.com/blog/how-to-guides/how-to-reduce-the-size-of-an-ebs-volume
https://medium.com/@andtrott/how-to-downsize-a-root-ebs-volume-on-aws-ec2-amazon-linux-727c00148f61
https://medium.com/@rahulian/how-to-reduce-volume-of-an-aws-ec2-instance-d493ec891698
How to reduce AWS EBS root volume size?
Useful information
SO: CENTOS 5.9
[root @] # fdisk -l
Disk / dev / hda: 1000.7 GB, 1000727379968 bytes
255 heads, 63 sectors / track, 121664 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Boot Start End Blocks Id System Device
/ dev / hda1 * 1 13 104391 83 Linux
/ dev / hda2 14 121601 976655610 8e Linux LVM
[root @] # df -h
System File Us Usa Disp Usage% Mounted on
/ dev / mapper / VolGroup00-LogVol00
897G 4.4G 847G 1% /
/ dev / hda1 99M 17M 78M 18% / boot
tmpfs 501M 0 501M 0% / dev / shm