You can check the current priority of the swap file from /proc/swaps.
1 |
$ cat /proc/swaps |
Inorder to change the priority of the swap partitions, you need to edit the “fstab” and append the new priority. If you have the fstab entry for your swap file /swap1 as:
1 |
/swap1 swap swap defaults 0 0 |
then append the following:
1 2 |
/swap1 swap swap pri=x,defaults 0 0 where x is the new priority you have set. |
You can re-mount it by using ‘mount -a’ command.