The priority of swap areas and the description in /etc/fstab..
"Murakami Hiroshi" <[email protected]> Sun, 6 Oct 2002 01:14:24 +0900 (JST)
| Newsgroups | gmane.linux.redhat.ia64.general |
|---|---|
| Message-ID | <[email protected]> |
On the RedHat7.2 IA-64 , I found the swap areas does not
get the priority values as I wrote in /etc/fstab.
It seems the priorities are given in the order written in the file
/etc/fstab.
This contradict the description of the online manual about swapon
or fstab.
If I wrote the /etc/fstab about the swap areas like:
----------------------
/dev/sda5 swap swap pri=-1 0 0
/dev/sda6 swap swap pri=-3 0 0
/dev/sda7 swap swap pri=-5 0 0
/dev/sda8 swap swap pri=-7 0 0
/dev/hde5 swap swap pri=-2 0 0
/dev/hde6 swap swap pri=-4 0 0
/dev/hde7 swap swap pri=-6 0 0
/dev/hde8 swap swap pri=-8 0 0
/dev/hde9 swap swap pri=-9 0 0
----------------------
The priority given when the OS boot up or after
swapoff -a; swapon -a;
is made, the actutal assigned priority is
sda5 > sda6 > sda7 > sda8 > hde5 > hde6 > hde7 > hde8 > hde9
can be viewed by "swapon -s"
To make the priority of the swap ares in interleaved, which I desired,
I have to write in /etc/fstab about the swap areas as the
intended order like:
----------------------
/dev/sda5 swap swap pri=-1 0 0
/dev/hde5 swap swap pri=-2 0 0
/dev/sda6 swap swap pri=-3 0 0
/dev/hde6 swap swap pri=-4 0 0
/dev/sda7 swap swap pri=-5 0 0
/dev/hde7 swap swap pri=-6 0 0
/dev/sda8 swap swap pri=-7 0 0
/dev/hde8 swap swap pri=-8 0 0
/dev/hde9 swap swap pri=-9 0 0
----------------------
It seems the swap areas are added from top to bottom and
the priorities given are higher to lower in the attached order.
The option pri= seems just been ignored.
####
The repeatition of "swapoff -a; swapon -a" makes lower
and lower the priorities of those swap areas can be seen below:
-----------------------
% swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 2047952 64 -46
/dev/hde5 partition 2096096 0 -47
/dev/sda6 partition 2047952 0 -48
/dev/hde6 partition 2096096 0 -49
/dev/sda7 partition 2047952 0 -50
/dev/hde7 partition 2096096 0 -51
/dev/sda8 partition 2046928 0 -52
/dev/hde8 partition 2096096 0 -53
/dev/hde9 partition 2096096 0 -54
-----------------------
% swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 2047952 0 -181
/dev/hde5 partition 2096096 0 -182
/dev/sda6 partition 2047952 0 -183
/dev/hde6 partition 2096096 0 -184
/dev/sda7 partition 2047952 0 -185
/dev/hde7 partition 2096096 0 -186
/dev/sda8 partition 2046928 0 -187
/dev/hde8 partition 2096096 0 -188
/dev/hde9 partition 2096096 0 -189
-----------------------
Am I making any elemental mistake how to specify the priority
for swap areas in /etc/fstab?
H.M.