Everything has been going fine for 6 months now until my swap suddenly vanished today. Now that I look into it, I find that my disk partitioning is a bit weird. What happened to it, and what should I do to recover it quickly without having to reinstall everything? (I need to finish a job before I do a fresh install again)Here is my /etc/fstab# /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>/dev/mapper/ubuntu--vg-root /               ext4    errors=remount-ro 0       1# /boot was on /dev/sda1 during installationUUID=ede3c189-5d39-4f55-b263-0d6bcafc5d7b /boot           ext4    defaults        0       2/dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0# /dev/sdb1       /media/usb0     auto    rw,user,noauto  0       0# /dev/sdc1       /media/usb1     auto    rw,user,noauto  0       0 (why is there Ubuntu there by the way?)Here is the result of sudo fdisk -l /dev/sda:Disk /dev/sda: 320.1 GB, 320072933376 bytes255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000aabb9Device Boot      Start         End      Blocks   Id  System/dev/sda1   *        2048      499711      248832   83  Linux/dev/sda2          501758   625141759   312320001    5  Extended/dev/sda5          501760   625141759   312320000   8e  Linux LVMAs for lvm information, here is the output of ls -l /dev/mappertotal 0crw------T 1 root root 10, 236 juin  29 07:28 controllrwxrwxrwx 1 root root       7 juin  29 07:28 ubuntu--vg-root -> ../dm-0lrwxrwxrwx 1 root root       7 juin  29 07:28 ubuntu--vg-swap_1 -> ../dm-1.. the output of lvscanACTIVE            '/dev/ubuntu-vg/root' [294,10 GiB] inheritACTIVE            '/dev/ubuntu-vg/swap_1' [3,74 GiB] inherit.. and the output of pvscanPV /dev/sda5   VG ubuntu-vg   lvm2 [297,85 GiB / 12,00 MiB free]Total: 1 [297,85 GiB] / in use: 1 [297,85 GiB] / in no VG: 0 [0   ].. and every day it looks more clear that we might have not wiped Ubuntu properly from my disk that night -_-Is there a way I can quickly get my swap back before I get time to wipe all this?
Swap suddenly vanished from Debian?
debian;partition;fstab;swap;fdisk
To enable the swap device you canswapon /dev/mapper/ubuntu--vg-swap_1If there is an error with that swap space, because it was destroyed somehow, you can reformat the swap device withmkswap /dev/mapper/ubuntu--vg-swap_1Check the related manual pages swapon(1) and mkswap(1) for more information.