如何解决如何分配内存以用作 Amazon EC2 上的交换空间?
我正在尝试使用硬盘驱动器上的分区分配内存以用作 Amazon EC2 实例上的交换空间。我正在按照 here
列出的说明进行操作但是这样做会导致出现错误消息并且不会创建分区。这是我尝试的结果:
sudo fdisk /dev/xvda1
Welcome to fdisk (util-linux 2.30.2).
Changes will remain in memory only,until you decide to write them.
Be careful before using the write command.
The old xfs signature will be removed by a write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x59fc670b.
Command (m for help): n
Partition type
p primary (0 primary,0 extended,4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4,default 1): 2
First sector (2048-16773086,default 2048):
Last sector,+sectors or +size{K,M,G,T,P} (2048-16773086,default 16773086): +4G
Created a new partition 2 of type 'Linux' and of size 4 GiB.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table Failed.: Invalid argument
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
事情是,重新启动后似乎没有应用beeb。并且尝试设置交换区域失败:
mkswap /dev/xvda2
mkswap: cannot open /dev/xvda2: No such file or directory
有人知道为什么指南中列出的步骤在这种情况下不起作用吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。