How to disable a Ram Swap permanently

NoOp glgxg at sbcglobal.net
Mon Mar 15 16:21:19 UTC 2010


On 03/10/2010 04:36 AM, Johnneylee Rollins wrote:
> On Wed, Mar 10, 2010 at 4:17 AM, Tom H <tomh0665 at gmail.com> wrote:
>>>>> To increase the prioirity, change the last column of your /etc/fstab swap
>>>>> definitions. Currently one of them is set to 100 and the other set to -1
>>>>> (which would be the minimum priority. Swap them around if you want to
>>>>> preserve both. If you have only one swap partition/file, the priority
>>>>> doesn't mean anything and can be left at anything.
>>
>>>> Very very wrong.  Do not change the numbers at the end of the swap
>>>> lines.  See man fstab for more details.
>>
>>> It is you who is very wrong Rashkae:
>>> http://ubuntuforums.org/showpost.php?p=205262&postcount=3
>>> The swap filesystem isn't the same as other filesystems.
>>
>> Your link above confirms what Rahskae said: for swap, the dump and
>> pass values in fstab must both be 0.
>>
> 
> I was referring to the priorities.

You did read 'man fstab', right?
<quote>
The sixth field,  (fs_passno),  is  used  by  the  fsck(8)  program  to
determine the order in which filesystem checks are done at reboot time.
The root filesystem should be specified with  a  fs_passno  of  1,  and
other  filesystems  should have a fs_passno of 2.  Filesystems within a
drive will be checked sequentially, but filesystems on different drives
will  be  checked  at the same time to utilize parallelism available in
zero is returned and fsck will assume that the filesystem does not need
to be checked.
</quote>

The fourth field would be where you define the priority for swap. Example:
<file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/hda1  	swap  		swap  	pri=42  	0 	0

http://manpages.ubuntu.com/manpages/karmic/en/man8/swapon.8.html
<quote>
 -p priority
Specify  priority  for swapon.  This option is only available if
swapon was compiled under 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.
</quote>

http://manpages.ubuntu.com/manpages/karmic/en/man2/swapon.2.html

Hakan had suggested:
To increase the prioirity, change the last column of your /etc/fstab
swap definitions.
Rashkae pointed out that is wrong. To do so would be changing the
fs_passno value.





More information about the ubuntu-users mailing list