Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Recently I resized my swap partition to make it bigger, but swap space staid the same. Why is that so and how can I change it?

Here is what I get when I run swapon:

swapon: /dev/sda6: pagesize=4096, swapsize=999292928, devsize=3798990848
share|improve this question
how did you resize the swap partition? – Avinash Raj Feb 7 '14 at 15:36
up vote 1 down vote accepted

You probably need to re-setup the swap partition, even if it was resized there's a step missing.

Turn off swap first:

sudo swapoff /dev/sda6

Reinitialize it:

sudo mkswap /dev/sda6

Then reenable it:

sudo swapon -a
share|improve this answer
Thanks, it helped. For other users: mkswap generated new UUID, so I needed to modify /etc/fstab. Again, thanks a lot! – james Feb 7 '14 at 15:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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