Azure添加swap分区
Azure 虚拟机创建完毕之后,默认是没有swap分区的,可以通过以下命令添加swap分区。
fallocate -l 5g /mnt/resource/swap5g
chmod 600 /mnt/resource/swap5g
mkswap /mnt/resource/swap5g
swapon /mnt/resource/swap5g
注意:/mnt/resource目录必须存在,否则先要创建该目录。
Recover your password.
A password will be e-mailed to you.
Recover your password.
A password will be e-mailed to you.