Question spawned from a previous question found here:
Very long startup time on Ubuntu Server (network configuration)
I have two swap partitions mounted in my fstab which seems odd. I'm guessing it's a byproduct of the process of builing a RAID array (maybe I botched something somewhere).
Some relevant logs as suggested by @heynnema:
/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>
# / was on /dev/md2 during curtin installation
/dev/disk/by-id/md-uuid-4c695059:2f774b0b:9e5492d2:bcb62609 / ext4 defaults 0 0
/dev/disk/by-id/md-uuid-05f3f447:6002213f:2bb97c81:6416f121 none swap sw 0 0
# /boot was on /dev/md0 during curtin installation
/dev/disk/by-id/md-uuid-58dd9ab9:74b02d8a:10890b55:2212c9cb /boot ext4 defaults 0
0
/swap.img none swap sw 0 0
swapon -s
:
Filename Type Size Used Priority
/swap.img file 4194300 0 -2
/dev/md1 partition 8379388 0 -3
ls -al /
:
-rw------- 1 root root 4294967296 Jun 9 2020 swap.img
free -h
:
total used free shared buff/cache available
Mem: 7.7Gi 1.3Gi 5.0Gi 22Mi 1.4Gi 6.1Gi
Swap: 11Gi 0B 11Gi
The output of fdisk -l
does not list any swap partitions...
You currently have a 8G swap partition, and a 4G /swap.img file.
To reduce your two swaps down to one...
First unmount both swaps...
sudo swapoff -a
Then remove (or comment out) EITHER one of these lines from /etc/fstab using...
sudo -H gedit /etc/fstab
orsudo pico /etc/fstab
For 8G swap partition (see next choice)...
Then delete this swap partition (/dev/md1 or UUID),
sudo swapon -a
, thenreboot
.For 4G /swap.img (probably easier/safer to do)...
Then
sudo rm -i /swap.img
,sudo swapon -a
, thenreboot
.Verify operation with...
swapon -s
free -h