[email protected]# mkfile 512m /var/swapfile

[email protected]# 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:

[email protected]# zfs create -V 1gb rpool/swapfile

[email protected]# swap -a /dev/zvol/dsk/rpool/swapfile

Good articles on Swap

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