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 usr2Note 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:
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:swap -a /dev/dsk/devicename 0 length
Next, create a symbolic link to the new file with the command:chmod +x addswap
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.ln -s /etc/init.d/addswap /etc/rc2.d/S59addswap
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.