我已经关注Google和此论坛上的几个链接,以减少Amazon AWS上的EBS卷,包括这些链接:
http://wiki.jokeru.ro/shrink-amazon-ebs-root-volume
和
http://www.lantean.co/shrinking-ebs-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
有人可以告诉我哪里出错了,还是我完全不在赛道上?
答案 0 :(得分:0)
我发现了一个优雅的解决方案,它存在于AWS的知识库中。
它使用了分开的工具。
注意:您需要将卷附加到其他实例才能调整其大小。