2

My cryptswap is now 4gb. I upgraded my RAM and I'd like to increase the swap accordingly to approx 8GB.

So far, I've reduced the size of my main sda1 partition with GParted by 4gb and I'm left with 4gb of unallocated space.

enter image description here

Next, I wanted to increase the swapsize of sda2 but GParted returns this error:

GParted 0.12.1 --enable-libparted-dmraid

Libparted 2.3

Move /dev/sda2 to the left and grow it from 3.88 GiB to 7.79 GiB 00:00:01 ( ERROR )

calibrate /dev/sda2 00:00:00 ( SUCCESS )

path: /dev/sda2 start: 616,994,814 end: 625,141,759 size 8,146,946 (3.88 GiB) move partition to the left and grow it from 3.88 GiB to 7.79 GiB 00:00:00 ( ERROR )

old start: 616,994,814 old end: old size: 8,146,946 (3.88 GiB) requested start: 608,800,768 requested end: 625,139,711 requested size: 16,338,944 (7.79 GiB) libparted messages ( INFO )

Unable to satisfy all constraints on the partition. Can't have overlapping partitions.

I don't understand the statement

Can't have overlapping partitions.

The partitions do not overlap.

The output of swapon -s returns

/dev/mapper/cryptswap1                  partition   4073468 0   -1

I guess the issue I encountered with GParted is related to cryptswap?

  • You probably have to turn off swap and unmount the mapper volume before you can resize. If you're using lvm, it takes more steps as well. – RobotHumans Sep 6 '13 at 21:23
2

I believe that you have encountered the following problem:

Bug 678831 - Partition End Overlap when Resizing Extended Partition

This bug was fixed in GParted 0.13.0.

Since many problems have been fixed since the 0.12.1 release of GParted, would you be able to try the latest release (currently 0.16.1)?

An easy way to do this is by booting from media containing GParted Live.

Curtis

  • Thank you Curtis. This must have been the bug - resizing worked well with GParted 0.16.1. sda2 is now 8 gb but the encrypted swap sda5 is still 4GB. Any idea how to increase the cryptswap? – Philippe Sep 8 '13 at 5:53
2

ok, with Curtis' help it worked.

GParted 0.12.1 has a bug - resizing worked with 0.16.1

Then I did following steps:

sudo swapoff -a
sudo cryptsetup remove /dev/mapper/cryptswap1
sudo mkswap /dev/sda5 8168400

now, I have an unencrypted swap. To encrypt it, swap needs to be turned on

sudo swapon /dev/sda5

and encrypted:

sudo ecryptfs-setup-swap

That's it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.