Swap Change advice

(I am not a english speaker, sorry for any errors)

I did a dual boot Manjaro/Win10 and as a newbie miscalculated the swap part, now a have a 8M swap partition.
So i came here to ask for any precaution needed to have on the process of changing the swap size.

free -h                                                             
               total        used        free      shared  buff/cache   available
Mem.:          7,7Gi       2,7Gi       2,5Gi       705Mi       2,4Gi       3,9Gi
Swap:          7,0Mi       7,0Mi       0,0Ki

My swap is 0 so I wouldn’t worry about it.

Well, if you just made your installation, you can delete both partitions and start over.
Alternatively, you can check about using a Swap file instead of a Swap partition.

2 Likes

Resize the partition in front of swap, e.g. by GParted and then resize the swap partitions as well. If you use gpt partition scheme this should already suffice, if you have a fstab entry for swap correct the UUID in the /etc/fstab file to correspond to the new one after changing the size.

2 Likes

Usually, the swap size should be no less than the RAM size (especially for hibernation mode).
So, if your RAM is 8 Gb your swap part must be the same. You can go without swap if you don’t use hibernation, you can chose a swap file not a partition.

2 Likes

Thanks for all the advice
scorpp13 and maycne.sonahoz i didn’t know about the swap file and i will try mess with them just to get the knowledge.

I did all the process said by Wollie and worked fine for me.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.