After every reboot, I'm just seeing one swap in my system.
$ sudo swapon --show
NAME TYPE SIZE USED PRIO
/swapfile file 2G 0B -2
So in /etc/rc.local
I've put this piece of instruction:
# activate two secondary swap of size 16GiB + 16GiB
sudo swapon /swapfile1
sudo swapon /swapfilesecondary
Still after restarting I get only one swap with 2 GiB of memory. How can I fix this?
NB: If I manually execute these two commands, then I get the desired output:
$ sudo swapon --show
NAME TYPE SIZE USED PRIO
/swapfile file 2G 0B -2
/swapfile1 file 16G 0B -3
/swapfilesecondary file 16G 0B -4
exit 0
. How can I make /etc/rc.local run on startup? – mikewhatever Sep 08 '23 at 09:42