I am playing around with swap and added my own swap partition. but when I do I noticed something odd.
test@ubuntu:~/5Gdisk$ cat /proc/swaps
Filename Type Size Used Priority
/dev/sda5 partition 4192252 0 -1
/dev/sdb2 partition 5242876 0 -2
and my /etc/fstab
UUID=<bla bla> none swap sw 0 0
/dev/sdb2 swap swap sw 0 0
sdb2 is the swap partition that I added. I also checked the man page of swapon, and it says for priority it should be from -1 to 32767. So why does my swap parition has a priority of -2?
This is ubuntu 15. Thanks
From
man swapon
it reads:so, that means in your
/etc/fstab
you would have your lines read as follows:I just used the priorities of
20
for the first one since it reads that the"Higher numbers indicate higher priority"
in themanpage
, then10
for the lower priority. Options in the/etc/fstab
file are separated by commas,
.Technically,
-1
is higher than-2
so you are probably OK.Hope this helps!