手动添加swap分区
1.使用 dd 命令在/tmp下造一个分区
[root@localhost ~]# dd if=/dev/zero of=/tmp/newdisk bs=1M count=100
记录了100+0 的读入
记录了100+0 的写出
104857600字节(105 MB)已复制,0.200887 秒,522 MB/秒2.格式化分区
[root@localhost ~]# swapon /tmp/newdisk
swapon: /tmp/newdisk:不安全的权限 0644,建议使用 0600。
[root@localhost ~]# free -m
total used free shared buff/cache available
Mem: 974 127 596 7 250 675
Swap: 2147 0 21473.删除分区
最后更新于