My swap partition is neither mounted nor active. My system does find/recognise the swap partition but that is it
My fstab entries:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=13d93751-743e-49f4-9cd4-681aeaa2ba30 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=8CB4-46F0 /boot/efi vfat umask=0077 0 1
# /home was on /dev/sda4 during installation
# swap was on /dev/sda3 during installation
#UUID=5b41eeb7-0447-491e-b0ce-8f3d35280ea2 none swap sw 0 0
/dev/mapper/cryptswap1 none swap sw 0 0
#PARTUUID=778e6277-6364-11e3-9faa-0c54a54d3e5a
/media/ntfs -ntfs-3g ntfs defaults,umask=222 0 0
I have inserted the last UUID manually into the fstab to access an external NTFS disk. Could that be the issue?
As requested here is my crypttab:
cryptswap1 UUID=5b41eeb7-0447-491e-b0ce-8f3d35280ea2 /dev/urandom swap,offset=1024,cipher=aes-xts-plain64
And here my lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sr0
sda
├─sda4 ext4 0d497413-33f4-4147-83e1-158673893393 /home
├─sda2 ext4 13d93751-743e-49f4-9cd4-681aeaa2ba30 /
├─sda3 swap 5b41eeb7-0447-491e-b0ce-8f3d35280ea2
│ └─cryptswap1 swap 4cd2e69a-b27e-41e1-9250-3d2e65ebbf11 [SWAP]
└─sda1 vfat 8CB4-46F0 /boot/efi
The command sudo swapon -a does not give me any output at all!
The command ls -lA /dev/mapper shows
control
cryptswap1
The command swapon shows
NAME TYPE SIZE USED PRIO
/dev/dm-0 partition 3,9G 0B -1
Output of systemctl status systemd-cryptsetup@cryptswap1.service
● systemd-cryptsetup@cryptswap1.service - Cryptography Setup for cryptswap1
Loaded: loaded (/etc/crypttab; bad; vendor preset: enabled)
Active: active (exited) since Sa 2016-12-24 10:37:43 CET; 36min ago
Docs: man:crypttab(5)
man:systemd-cryptsetup-generator(8)
man:systemd-cryptsetup@.service(8)
Process: 919 ExecStartPost=/sbin/mkswap /dev/mapper/cryptswap1 (code=exited, status=0/SUCCESS)
Process: 702 ExecStart=/lib/systemd/systemd-cryptsetup attach cryptswap1 /dev/disk/by-uuid/5b41eeb7-0447-491e-b0ce-8f3d35280ea2 /dev/urandom swap,offset=1024,cipher=aes-xts-plain64 (code=exited, status=0/SUCCESS)
Main PID: 702 (code=exited, status=0/SUCCESS)
Dez 24 10:37:37 dirksson-SATELLITE-PRO-C50-A-1J1 systemd[1]: Starting Cryptography Setup for cryptswap1...
Dez 24 10:37:38 dirksson-SATELLITE-PRO-C50-A-1J1 systemd-cryptsetup[702]: Set cipher aes, mode xts-plain64, key size 256 bits for device /dev/disk/by-uuid/5b41eeb7-0447-491e-b0ce-8f3d35280ea2.
Dez 24 10:37:43 dirksson-SATELLITE-PRO-C50-A-1J1 mkswap[919]: Setting up swapspace version 1, size = 3,9 GiB (4163366912 bytes)
Dez 24 10:37:43 dirksson-SATELLITE-PRO-C50-A-1J1 mkswap[919]: no label, UUID=eb58cf21-d0aa-41c2-bd86-a81466328f93
Dez 24 10:37:43 dirksson-SATELLITE-PRO-C50-A-1J1 systemd[1]: Started Cryptography Setup for cryptswap1.
free -h shows
total used free shared buff/cache available
Mem: 3,7G 975M 1,7G 108M 1,0G 2,4G
Swap: 3,9G 0B 3,9G
swapon -h shows no entry for cryptswap
/dev/sda3 partition 4066300 0 -2
/etc/crypttab? – Byte Commander Dec 23 '16 at 22:50lsblk -fshow? What doesls -lA /dev/mappershow? What doessudo swapon -aoutput? Oh, and please leave me a comment with "@ByteCommander" so that I get notified once you have edited and updated your question. – Byte Commander Dec 23 '16 at 23:16sudo swapon -ashould have printed an error message if it was unable to turn on the configured swaps. The virtual crypt disk is also there. Can you please run plainswaponand recheck whether the swap is really not activated? Also please show the output ofsystemctl status systemd-cryptsetup@cryptswap1.service | cat. Have you rebooted since setting the swap up or doing the last changes? If not, do that. – Byte Commander Dec 24 '16 at 09:57free -htell you? – Byte Commander Dec 24 '16 at 10:32swapon -sshow an entry for/dev/mapper/cryptswap? If not, what does it show instead? – David Foerster Dec 24 '16 at 15:14swapon -h(although at least myswapondoes not have a-hoption, no idea what that's supposed to do or why it works at all) is not consistent with the stuff you showed us before and says that you're using/dev/sda3as raw swap partition and not as encrypted one. I reopened the question. As David said, please reboot and rerun all the commands and update the outputs in your question, then notify us with a comment when you're done. Thanks. – Byte Commander Dec 25 '16 at 12:09