I installed Solaris 10 05/09 on a machine and I used whatever the default swap space setting when I built the box. Now I need to increase the swap space and I can't add a swap file, like was possible under UFS. How can I increase the amount of swap on my ZFS drive?
|
feedback
|
|
If your swap device is in use, then you might not be able to delete it. Check to see if the swap area is in use. For example:
In the above output, blocks == free, so the swap device is not actually being used. If the swap area is not is use, remove the swap area. For example:
Confirm that the swap area is removed.
Resize the swap volume. For example:
One also has to ensure that the referenced swap is reserved from the pool, otherwise when it comes time to swap there might not be enough memory:
Activate the swap area.
More info at: ZFS Troubleshooting Guide | ||||
|
feedback
|
|
If your swap is active, you can add an additional swap volume. zfs create -V 10G rpool/swap2 swap -a /dev/zvol/dsk/rpool/swap2 | |||
|
feedback
|
|
In 99% of the cases, the swap space will be in use. What is the procedure in that case? I tried setting the volsize property on the zfs swap filesystem, but it didn't take effect right away. It also didn't report any diagnostics. Will the new setting take effect the next time I reboot? If I shrink my memory usage so it fits into RAM, will the swap device become unused? Currently on my machine, only a tiny part of the swap is used, I have plenty of RAM. My problem is I need more space in /tmp. Here is an excerpt from the website listed above that shows how to add an additional swap area:
| ||||
|
feedback
|