In Solaris, the easiest way to add swap to an existing system is through a swapfile.
Create a file on a partition that has enough space:
# Create a 2GB file in / called "swap2gb"
mkfile -v 2g /swap2gb
# add the swap to the system
swap -a /swap2gb
# verify
swap -l
To make sure your swap exists on boot, add the entry to /etc/vfstab:
/swap2gb - - swap - no -
