root@home# mkfile 512m /var/swapfile

root@home# swap -a /var/swapfile

“/var/swapfile” may contain holes – can’t swap on it.

the above is ok for UFS, but not work in ZFS.

Solution:

root@home# zfs create -V 1gb rpool/swapfile

root@home# swap -a /dev/zvol/dsk/rpool/swapfile

Good articles on Swap

http://blogs.sun.com/jimlaurent/entry/solaris_faq_myths_and_facts