Activating swap partitions

Andrzej Krzysztofowicz ankry at green.mif.pg.gda.pl
Wed Dec 8 02:08:03 CET 2004


Tomasz Grobelny wrote:
> On Tuesday 07 of December 2004 17:53, Andrzej Krzysztofowicz wrote:
> > Tomasz Grobelny wrote:
> > > Is there any particular reason to turn on swap space before mounting
> > > other
> >
> > Yes. For low memory systems it is important to turn on swap as early as
> > possible.
> >
> The question is: does it make sense to have a system that needs fsck to 
> perform filesystem check (fsck seems to be the largest program that can run 
> between activating swap and mounting filesystems)? Of course such systems 
> exist but propably they either don't run Ac or they don't have swap (no hdd).

You may have 256MB of RAM and few TB of filesystems.
And you may have problems not only fsck-ing them without swap, but even
mounting them and checking quota.

> > > filesystems? IMO it would be better to call swapon after mounting at
> > > least all local filesystems since swap can be put on one of them. BTW,
> > > would it be reasonable to put swap space on remote filesystem?
> >
> > There should be the second attempt then.
> Was that equivalent to SOD#1? ;-)

It is equivallent to: check it:

# grep swapon /etc/rc.d/rc.sysinit
run_cmd "Activating swap partitions" swapon -a -e
swapon -a >/dev/null 2>&1

Twice.

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry at mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Gdansk University of Technology




More information about the pld-devel-en mailing list