The Solaris OS supports applying swap to a file. To enable a file system swap you need to perform the following tasks:
1. Create a file using mkfile:
#mkfile 250m /opt/myswapfile (can be done in any partition)
This will create a 250 Meg file, which the Solaris OS can use for swap.
2. To use this swap file, enable it with the following command:
#swap -a /opt/myswapfile
3. Check your change:
#swap -l
Note: To enable the new swap file at the next system boot, add the following entry to /etc/vfstab:
/opt/swapfile - - swap - no -
Disabling swap Space
The Solaris OS provides the ability to disable a swap file while the system is running. This is done with the -d option for swap. All allocated blocks are copied to other swap areas.
solaris# swap -d /opt/myswapfile
To check your change, type this:
solaris# swap -l
No comments:
Post a Comment