You are not logged in.
Pages: 1
i need help to do this, my swap partition is only 1G and i need it to be 6G. When I installed arch linux i followed a tutorial and i believe i used gdisk to create the partitions if that's relevant. I tried GParted but it wouldnt let me resize it.
Offline
For resizing swap you’ll need to make unpartitioned space for it to grow, it can get quite complex depending on your partitioning.
Post output of:
# fdisk -lOffline
You can also use a swap file, https://wiki.archlinux.org/index.php/Swap (and yes, it's also gonna work for hibernation)
Online
Agree with seth.
I use swap as a file. I can change its size whenever I want.
If you encrypt your root partition, then you don't even have to take care of your swap about it.
Offline
output from fdisk -l:
Disk /dev/nvme0n1: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk model: WDC PC SN520 SDAPNUW-128G-1014
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 3A2A3117-05F5-4E3F-91D5-C2AC7E34E43A
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 616447 614400 300M EFI System
/dev/nvme0n1p2 616448 2713599 2097152 1G Linux swap
/dev/nvme0n1p3 2713600 250069646 247356047 117.9G Linux filesystem
yeah this is for hibernation, last night my crontab failed to hibernate due to not enough swap space, so my options seem to be, a complicated resizing or just deleting the swap partition altogether and using a swap file. my only goal here is to get hibernation working, but i fear messing up my system, im not so great at partitioning stuff. so any further help would be much appreciated, thank you.
Offline
Please wrap shell IO and file contents in code tags, https://bbs.archlinux.org/help.php#bbcode
For swap file hibernation, see the link I previously posted about swap, there's a section on how to create a swap file.
For hibernating there see https://wiki.archlinux.org/index.php/Po … _swap_file
Resizing the existing swap is a bad idea because you'd have to shrink your root partition rightwards (move its beginning, not its end) what is not trivial.
Online
ok cool thanks so just to confirm what i should do:
1) delete the swap partition
2) create a swap file
question: will it matter that the swap was partition 2, and i'll still have a 1 and 3 partition but no 2?
Offline
You can keep the swap partition and use it in addition (but NOT for hibernation, that has to be a consecutive space)
Since you're going to refer the swap device (root partition) by its UUID, the gap doesn't matter.
It should™ also remain stable even if you wedge multiple partitions in there.
Online
Resizing the swap file will take some effort you have to resize the main partition somehow in a different environment then expand the swap to fit in the space.
Offline
I think you're conflating files and partitions there… and the hazzle about resizing the root partition isn't the need to do it offline, but that the swap partition is left of it.
Online
Pages: 1