Home » Questions » Computers [ Ask a new question ]

What is the meaning of pri=42

What is the meaning of pri=42

When mounting a swap partition on Linux, what does the mount option pri=42 mean?

Asked by: Guest | Views: 363
Total answers/comments: 2
Guest [Entry]

"Not on any linux distro, I believe ubuntu does not set any swap priority by default, some others might.
You may call man swapon to the rescue ... here is an excerpt:

-p priority
Specify the priority of the swap device. This option is only available if swapon was compiled and is used under a 1.3.2 or later kernel. priority is a value between 0 and 32767. Higher numbers indicate higher priority. See swapon(2) for a full description of swap priorities. Add pri=value to the option field of /etc/fstab for use with swapon -a.

As a side note, you might wonder why set swap default priority to 42, I believe it to be just another reference to the Great Answer."
Guest [Entry]

"assume you have 2 swap-partitions, with 'pri' you can tell the os, which swap partion to use first:

pri=n Specifies the swap space priority. The n variable can
be 0, 1, 2, 3, 4, with 0 being lowest priority, and 4
being highest priority."