Problem
I need more swap space. How can I increase swap space without reconfiguring existing divisions?
Cause
The default value presented at install time may not be large enough for some systems, therefore it may be necessary to increase the total amount of swap space available after installing.
Solution
In older releases of SCO UNIX Operating System, this would require
using divvy to adjust the filesystem sizes. In SCO OpenServer 5,
use `swap -l` to show how much swap is configured. You will see
output like this:path dev swaplo blocks free
/dev/swap 1,41 0 100000 68952Next, create a regular file that can be used for extra swap space using the touch command:
touch /swap1Then, to add the number of bytes needed, use this swap command:
swap -a /swap1 50000The command above adds 50000 512 byte blocks to available swap. Adjust that value up or down according to what is needed.
Finally, verify that the extra swap is available to your system:
# swap -l
path dev swaplo blocks free
/dev/swap 1,41 0 100000 68952
/swap1 76,1 0 50000 50000If you want this extra swap space to be available after a reboot,
add the `swap -a /swap1 50000' command to a startup script
in /etc/rc2.d directory. For example, you could call it S09AddSwap.
Or, you can edit the /etc/rc.d/8/userdef script. You may also want
to "zero out" the /swap1 file occasionally in order to keep the
filesize small. The command `> /swap1' can be put in the userdef
file, along with the other commands, to empty the file at boot time.NOTE: This swap configuration will not work to hold panic dump if RAM is
larger than the original swap division. To set up an alternate dump
device, use the dump bootstring and point to a dump device as large
or larger than the amount of RAM. See also
swap(ADM) man page;SCO OpenServer Performance Guide p. 179-80;SCO OpenServer System Administration Guide p. 385-8.
TA105921, "How can I move swap space to a drive that already has filesystems on it in OpenServer 5.0.x?".