我已经在Google和这个论坛上关注了几个链接,以减lessAmazon AWS上的EBS卷,包括这些链接:
http://wiki.jokeru.ro/shrink-amazon-ebs-root-volume
和
我有一个254 GB的EBS卷,需要调整到150 GB。 以下是我所做的步骤:
Disk /dev/xvdj: 272.7 GB, 272730423296 bytes 255 heads, 63 sectors/track, 33157 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00029527 Device Boot Start End Blocks Id System /dev/xvdj1 * 1 13 102400 83 Linux Partition 1 does not end on cylinder boundary. /dev/xvdj2 13 6540 52428800 83 Linux /dev/xvdj3 6540 10457 31457280 83 Linux /dev/xvdj4 10457 33114 181998592 5 Extended /dev/xvdj5 10457 11501 8388608 82 Linux swap / Solaris /dev/xvdj6 11501 12154 5242880 83 Linux /dev/xvdj7 12154 12285 1048576 83 Linux /dev/xvdj8 12285 33114 167314432 83 Linux
Disk /dev/xvdk: 161.1 GB, 161061273600 bytes 255 heads, 63 sectors/track, 19581 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xeea3d8c8 Device Boot Start End Blocks Id System /dev/xvdk1 * 1 132 1060258+ 83 Linux /dev/xvdk2 133 9271 73409017+ 83 Linux /dev/xvdk3 9272 17105 62926605 83 Linux /dev/xvdk4 17106 19581 19888470 5 Extended /dev/xvdk5 17106 18150 8393931 82 Linux swap / Solaris /dev/xvdk6 18151 19456 10490413+ 83 Linux /dev/xvdk7 19457 19581 1004031 83 Linux
有人能告诉我我哪里出了问题吗?还是我完全离开了赛道?
我发现了一个在AWS的知识库中出现的优雅的解决方案。
链接在这里: http : //docs.aws.amazon.com/AWSEC2/latest/UserGuide/storage_expand_partition.html#expanding-partition-parted
它利用分手的工具。
注:您需要将卷附加到不同的实例以调整其大小。