This is straight out of the man pages, but I had a hard time finding it the first time that I needed it. If you have a Solaris system that badly needs more swap but you don't have a free swap device available, you can create a file in the file system and add it as additional swap.
-
Use
mkfile
to create a file suitable for a local swap area. For example, to create a 1GB swap file:/usr/sbin/mkfile 1024m /swap
where
/swap
is the name of the file to be used as swap space. Units for the size can be kilobytes (k), blocks (b), or megabytes (m). -
Tell the system to start using the file as swap:
/usr/sbin/swap -a /swap
Use
swap -l
to verify that the swap file has been activated.文章摘自http://www.eyrie.org/~eagle/notes/solaris/swap-file.html
沒有留言:
張貼留言