既に/root/swapfileをSWAP領域として拡張済であることが前提 [root@linux ~]# free -mt ← SWAP領域削除前メモリ状態確認 total used free shared buffers cached Mem: 185 84 100 0 2 30 -/+ buffers/cache: 51 133 Swap: 511 110 401 Total: 697 194 502 [root@linux ~]# sync ← メモリ上のキャッシュをディスクに書き込む [root@linux ~]# swapoff swapfile ← swapfileをSWAP領域として無効にする [root@linux ~]# free -mt ← SWAP領域削除後メモリ状態確認 total used free shared buffers cached Mem: 185 95 90 0 2 35 -/+ buffers/cache: 56 129 Swap: 255 106 149 Total: 441 201 239 [root@linux ~]# rm -f swapfile ← swapfile削除 |