SUMMARY: swap space on multiple partitions

From: Kevin E Cosgrove (kevinc@tekig6.PEN.TEK.COM)
Date: Wed Feb 26 1992 - 16:52:05 CST

John Hasley's <> answer to setting up swap space on
multiple partitions was to the point and typical in content to the other
responses I received.

Here's what John said:

Here's how we do it. (Only way that I know of.)
In the particular situation, root and original swap are on xd0a and xd0b,
and the additional swap is on xd1b. Make the appropriate changes.
(Quotes from files are between 'Begin...End'.)
In your configuration file, have this line:

# Build one kernel based on this basic configuration.
# It will use the generic swap code so that you can have
# your root filesystem and swap space on any supported device.
# Put the kernel configured this way in a file named "vmunix".
config vmunix swap generic

When the system starts up, it uses partition xd0b for swapping,
then in the /etc/fstab file, we have an entry:

/dev/xd1b swap swap rw 0 0

and in the /etc/rc file, the line (which should already be there):

sh /etc/rc.local

swapon -a >/dev/console 2>&1
                                (echo preserving editor files) >/dev/console
(cd /tmp; /usr/lib/ex3.7preserve -a)

The swapon -a command (see your man pages) looks in the /etc/fstab
file and adds on all devices of type 'swap'. This way, additional
swap can be added or subtracted if needed (in partition increments)
by editing /etc/fstab and rebooting. Also, the system only needs
one disk to boot up. (Nice when that second disk goes bad; some
work (such as rebuilding a file system) can get done.)

John C. Hasley
University Computer Services    INTERNET:
Bowling Green State University  UUCP:     ...!osu-cis!bgsuvax!hasley
Bowling Green, Ohio             Ma Bell:  (419) 372-9989

Thanks to those responding:

Christopher Davis <> Gregory Bond <> Jim Lick <> John Hasley<> Nick Sayer <> Shane.Sigler@Eng.Sun.COM (Shane Sigler) ( Birger Wathne) bs30%sirius@gte.COM (Bernard Silver) eirik@TC.Cornell.EDU etnibsd!dwy@uunet.UU.NET (David Young) guy@auspex.COM (Guy Harris) (Janet Walz) kfoster@sptekwv14.WV.TEK.COM (Ken Foster) (tadr) alexl@daemon.CNA.TEK.COM

-- __________________________________________________________________________

Kevin Cosgrove tessi!solomon!kevinc@qiclab.SCN.RAIN.COM kevinc@tekig6.PEN.TEK.COM (503) 297-6067 cosgrok@ECE.ORST.EDU __________________________________________________________________________ -- -- Kevin Cosgrove <kevinc@tekig6.PEN.TEK.COM> Unless otherwise noted, the statements herein reflect my personal opinions and not those of any organization with which I may be affiliated.

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:36 CDT