I have an unused USB key that I don’t care about multiple writes to, and thought I’d use as swap space rather than a file on the USB stick on which I run nextcloudpi on an rpi 3B+.
I partitioned the USB into 4 equal swap spaces, then tried running them temporarily. Once all were working fine, I added the following lines to /etc/fstab to give each higher priority than /var/swap:
/dev/sdc1 swap swap defaults,pri=5 0 0
/dev/sdc2 swap swap defaults,pri=4 0 0
/dev/sdc3 swap swap defaults,pri=3 0 0
/dev/sdc4 swap swap defaults,pri=2 0 0
All seemed fine, but on reboot, my system wouldn’t load. I tried unplugging this USB drive, and lo and behold, it booted without problem. While it is now running fine, swapon -s shows /dev/zram0, /dev/zram1, /dev/zram2, and /dev/zram3 (which didn’t exist before) getting priority over /var/swap
- What have I done wrong/what can I do to recognize this extra swap on boot?
- If I use UUID info instead of /dev/sdc# in fstab, will this resolve the latter problem (or both problems)? Barring no other input on any crucial missing steps, this would be my next attempt.
Thanks in advance!