Next | Prev | Up | Top | Contents | Index

Increasing Swap Space on a Multidisk System

Adding more swap space to a multidisk system can be done just as if you were adding space on a single disk system. You can always use the mkfile(1) and swap(1M) commands to add a swap file to your system. However, if you wish to add dedicated swap space in a new disk partition, follow the instructions below.

To double the default amount of swap space, you can use another disk drive as follows:

Partition/slice 
    0        Temporary space (mount as /tmp) 
    1        Swap space 
    6        usr2 
Note that the operating system continually writes onto the partition that is used as swap space, completely destroying any data that might exist there. Be sure that the swap partition does not overlap any user file system partitions. Verify the size of the swap partition in blocks.

Once you choose a partition, create the file /etc/init.d/addswap to add this partition permanently as a swap partition. Place a line of the following form in the file:

swap -a /dev/dsk/devicename 0 length

The argument devicename is the device name where the swap partition is located (such as ips0d1s1), and length is on blocks. Once you create this file, use the chmod(1) command to enable execute permission on the file. The command is:

chmod +x addswap

Next, create a symbolic link to the new file with the command:

ln -s /etc/init.d/addswap /etc/rc2.d/S59addswap

The /etc/rc2.d directory controls the system activities that take place when the system boots into multiuser mode (run level 2). The ''S'' at the beginning of the symbolic linkfile that you created indicates that the commands in the file should be started when the system initiates this run level. Symbolic link files that begin with the letter ''K'' indicate that the commands described in the file should be killed. The number following the S or K at the beginning of the linkfile name indicates the sequence in which the commands are executed.

You can also modify the file /etc/fstab to document (in the form of a comment) that the chosen partition is being used as a swap partition.


Next | Prev | Up | Top | Contents | Index