Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 at 15:36

1 Answer 1

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 at 15:48

Your Answer

 
discard

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.