Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I’m using two swap disks. Changing the order they are in in /etc/fstab and using pri in fstab doesn’t seem to have any effect.

This is what it looks like in the /etc/fstab:

#swap on other disk
UUID=90a1550c-84d6-4bde-8bc1-7c15292980f1 none            swap    sw,pri=-1              0       0

#swap on same disk
UUID=13b70e65-f1c3-4728-920f-9e92467d1df0 none            swap    sw,pri=-2              0       0

This is the output of swapon -s:

Filename            Type        Size       Used   Priority
/dev/sda1           partition   2562328 176    -1
/dev/sdb1           partition   2562328 0      -2

It’s the opposite of what it is in fstab, and changes to fstab seem to have no effect.

share|improve this question

All seems fine.

pri=-1 and pri=-2 in your fstab means sda1 is a priority.

If you want the inverse, remove the '-'. You should have sw,pri=1 for sda1 and sw,pri=2 for sda2.

Reboot and re-check.

share|improve this answer
my fstab doesnt show the swap priority configuration, I wonder how it is being automated here – Aquarius Power Feb 25 '15 at 21:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.