Hello. I can’t figure out why swap is not enabled on my system.
Running free gives
root@truenas:~# free -h
total used free shared buff/cache available
Mem: 15Gi 14Gi 341Mi 90Mi 945Mi 894Mi
Swap: 0B 0B 0B
My TrueNAS Scale 24.04.2 installation has the following drives
root@truenas:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 223.6G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 512M 0 part
├─sda3 8:3 0 207.1G 0 part
└─sda4 8:4 0 16G 0 part
└─md127 9:127 0 16G 0 raid1
└─md127 253:0 0 16G 0 crypt
sdb 8:16 0 16.4T 0 disk
├─sdb1 8:17 0 4G 0 part
└─sdb2 8:18 0 16.4T 0 part
sdc 8:32 0 223.6G 0 disk
├─sdc1 8:33 0 1M 0 part
├─sdc2 8:34 0 512M 0 part
├─sdc3 8:35 0 207.1G 0 part
└─sdc4 8:36 0 16G 0 part
└─md127 9:127 0 16G 0 raid1
└─md127 253:0 0 16G 0 crypt
sdd 8:48 0 3.6T 0 disk
├─sdd1 8:49 0 2G 0 part
└─sdd2 8:50 0 3.6T 0 part
sde 8:64 0 3.6T 0 disk
├─sde1 8:65 0 2G 0 part
└─sde2 8:66 0 3.6T 0 part
sdf 8:80 0 3.6T 0 disk
├─sdf1 8:81 0 2G 0 part
└─sdf2 8:82 0 3.6T 0 part
sdg 8:96 0 3.6T 0 disk
├─sdg1 8:97 0 2G 0 part
└─sdg2 8:98 0 3.6T 0 part
sdh 8:112 0 232.9G 0 disk
├─sdh1 8:113 0 4G 0 part
└─sdh2 8:114 0 228.9G 0 part
sdi 8:128 0 232.9G 0 disk
├─sdi1 8:129 0 4G 0 part
└─sdi2 8:130 0 228.9G 0 part
zd0 230:0 0 204G 0 disk
zd16 230:16 0 32G 0 disk
sda and sdc are the mirrored boot drives which clearly have the 16GiB partitions created during installation.
How can I diagnose why swap is not enabled and not used? I tried the logs but found no errors related to swap.
The only related messages are these:
Jul 18 17:02:46 tnsbuilds01.tn.ixsystems.net kernel: Adding 16759804k swap on /dev/mapper/md127. Priority:-2 extents:1 across:16759804k
Jul 18 17:02:46 tnsbuilds01.tn.ixsystems.net systemd[1]: dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dPLAIN\x2dmd127.swap: Deactivated successfully.
Jul 18 17:02:46 tnsbuilds01.tn.ixsystems.net systemd[1]: dev-mapper-md127.swap: Deactivated successfully.
Jul 18 17:02:46 tnsbuilds01.tn.ixsystems.net systemd[1]: dev-disk-by\x2did-dm\x2dname\x2dmd127.swap: Deactivated successfully.
Jul 18 17:02:46 tnsbuilds01.tn.ixsystems.net systemd[1]: dev-dm\x2d0.swap: Deactivated successfully.
Jul 18 17:02:46 tnsbuilds01.tn.ixsystems.net systemd[1]: Finished ix-swap.service - Configure swap filesystem on boot pool.
How can I configure to enable swap?