1
My computer has quite some memory (6GB) which is enough for most of what I do. A while back I was messing with my swap, turning it on and off with sudo swapon -a
and sudo swapoff -a
. In then end I must have left it turned off, since I now seem to have 0MBs of swap.
No problem normally, but I am now running some hefty analyses which are now using about 5GB of my swap and growing. So in order to avoid the analyses to terminate I wanted to turn on my swap again. So I ran "sudo swapon -a", but unfortunately this results in:
swapon: /dev/mapper/cryptswap1: stat() has failed: File or folder does not exist.
(I translated the output from Dutch to English, so the words may be off a little bit).
Does anybody know how I can enable my swap again? Since I don't want to halt my analyses, it is of course quite important that I can do it while the machine is running.
[EDIT] I'm on Ubuntu 12.04 and the contents of my fstab are as follows:
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=f2ef1c1b-f606-44ed-9405-979fb6fa8ca4 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda3 during installation
UUID=7a1f29ef-3fcd-40ce-8e2a-4b9181a46863 /home ext4 defaults 0 2
# swap was on /dev/sda2 during installation
#UUID=d0ef2314-6a84-432d-94f8-0d46c91c3d99 none swap sw 0 0
/dev/mapper/cryptswap1 none swap sw 0 0
See also: http://superuser.com/questions/22081/turn-on-swap-memory-on-ubuntu/1124085#1124085
– Jonathan – 2016-09-14T00:29:34.697Which version of linux? – Aaron Digulla – 2013-06-24T09:41:26.753
Do you try to swap to a partition or to a file ? If partition: Is there swap defined in
/etc/fstab
? If a file, which file. Is it still present? Can you rerunmkswap
on that file? Did you try to use encrypted swap (/dev/mapper/cryptswap1 seems to indicate that). Please add more information. – Hennes – 2013-06-24T09:44:54.387@AaronDigulla - I'm on Ubuntu 12.04. Added it to my question. – kramer65 – 2013-06-24T09:56:16.857
@Hennes - I've barely done anything with fstab or swaps, apart from swapon and swapoff. I didn't even know you could swap to a partition as well as a file, so I hope you can bear with me. I added the contents of fstab to my question. Does that tell you anything? – kramer65 – 2013-06-24T09:56:33.063