You are not logged in.
Hello good people of the forum,
This is something I have not done in my 20 years or so of using *NIX systems. I want to increase the swap partition. Looking around, I am suspecting this can be done with a live gparted session > delete current swap > create new space choosing "free space following" > make the new space created "linux-swap". Reboot the box.
If I keep the name of the new swap partition "/dev/sda5" I should be ok with fstab.
Any other pointers or corrections will be appreciated.
Regards.
Offline
You might need to look for the uuid instead of the device. Check your fstab.
Online
I saved that UUID info from fstab. Should that line change somehow? Unless if gparted change the UUID I should match the new output in fstab.
Offline
Unless if gparted change the UUID
If you create a new swap partition it will have a different UUID.
Brianna Ghey — Rest In Power
Offline
You don't have to delete the existing swap partition.
You just need to "move" the partitions in front of it, thus freeing up space for it.
Here ( https://dev1galaxy.org/viewtopic.php?pid=39531#p39531 ) I had to do it with the sda3 partition (sda2 and sda3 were the same size).
All UUIDs remain the same
Last edited by aluma (2023-01-07 16:50:42)
Offline
Or just make another swap partition and use both at the same time. Might be simpler.
EDIT: and faster, if they both have the same priority: https://tldp.org/HOWTO/Partition/setting_up_swap.html
Last edited by Head_on_a_Stick (2023-01-08 00:12:14)
Brianna Ghey — Rest In Power
Offline
The question is in specific equipment and tasks, of course, and everyone chooses his own.
In my experience, with 4 GB of memory and normal user tasks, the swap has been empty for several years.
For tasks such as copying files that exceed the size of memory, the kernel, creating buffers, leaves approx. 100 MB without using swap.
Offline
If the OP really is filling up their swap space then the real solution is to add more RAM. Adding more swap is just a work-around to help compensate for Linux's terrible OOM handling.
Brianna Ghey — Rest In Power
Offline
Success!!!
Gparted and I had to manually re-write fstab with new UUIDs.
Cheers.
Offline
Maybe of use to some here:
https://github.com/Tookmund/swapspace
This is a system daemon for the Linux kernel that eliminates the need for large, fixed swap partitions.
Usually when you install a GNU/Linux system, it sets up a swap partition on disk. The swap partition serves as virtual memory, so you may need a lot of it. But you can't store data there, so you don't want to sacrifice too much disk space. And it's not always easy, or safe, to change its size afterwards!
Running swapspace solves that problem. You no longer need a large swap partition. You can even do without the whole thing. The program manages swap files for you. These work just like partitions, except they're normal files. You can add more when you need them, or delete some when you want the disk space back. And that is exactly what swapspace does. It constantly monitors your system's virtual-memory needs and manages a pool of swap files accordingly.
With swapspace you can install GNU/Linux in one single big partition, without regrets later about picking the wrong size. Your system can handle the occasional memory-intensive task, without eating up disk space that you'll never get back.
Offline
I expanded swap on this box because every time the machine come back from hibernation it froze. Reading around it looks like swap has to be at least x2 the RAM. I have to say that seems to have solved that issue for me.
Maybe of use to some here:
https://github.com/Tookmund/swapspace
This is a system daemon for the Linux kernel that eliminates the need for large, fixed swap partitions.
Usually when you install a GNU/Linux system, it sets up a swap partition on disk. The swap partition serves as virtual memory, so you may need a lot of it. But you can't store data there, so you don't want to sacrifice too much disk space. And it's not always easy, or safe, to change its size afterwards!
Running swapspace solves that problem. You no longer need a large swap partition. You can even do without the whole thing. The program manages swap files for you. These work just like partitions, except they're normal files. You can add more when you need them, or delete some when you want the disk space back. And that is exactly what swapspace does. It constantly monitors your system's virtual-memory needs and manages a pool of swap files accordingly.
With swapspace you can install GNU/Linux in one single big partition, without regrets later about picking the wrong size. Your system can handle the occasional memory-intensive task, without eating up disk space that you'll never get back.
Offline
That's a myth about needing 2x ram of swap.
On the asus eee pc 701 with 493MiB of ram, It can hibernate comfortably* in 300MB of swap. Assuming you close your apps first
*about half the time, because voodoo
Offline
That's a myth about needing 2x ram of swap.
On the asus eee pc 701 with 493MiB of ram, It can hibernate comfortably* in 300MB of swap. Assuming you close your apps first
*about half the time, because voodoo
Maybe that is the problem. I always leave everything I am using open.
Offline
Offline