PFA the current partitions on my disk. The second partition (selected one) is the swap partition (8gb), but recently I upgraded ram and want to make swap 16gb.
I get this message when using systemctl hibernate
:
Failed to hibernate system via logind: Not enough swap space for hibernation
Originally I wanted to shrink nvme0n1p3
and shift it towards right end and then expand the 2nd partition. However life isn't so easy and Gparted
doesn't allow those kind of operations (at least I wasn't able to figure that out).
Another idea I have is to delete the swap partition, and expand the nvme0n1p3
partition to left, and the shrink it from right to make space for swap. However I am not sure whether that will work or is that the best way to go around it. Also if I do this, are there any chances that GRUB would somehow manage to not boot into my OS. I have only one OS, no dual boot.
Can someone pls guide me.
Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.
Keep these things in mind:
always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition
a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor
a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor
if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)
you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window
Do the following...
Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.
gparted