in Oracle, Solaris

Increase Solaris 11 Swap

Increase swap size on Solaris 11 without rebooting.

Check the default swap list

# swap -l
swapfile             dev    swaplo   blocks     free
/dev/zvol/dsk/rpool/swap 124,2         8  2097144  2097144

Check the rpool swap size

# zfs get volsize rpool/swap
NAME        PROPERTY  VALUE    SOURCE
rpool/swap  volsize   1G       local

Delete the default swap

# swap -d /dev/zvol/dsk/rpool/swap

Check the swaplist again

# swap -l
No swap devices configured

Create the zfs swap

# zfs set volsize=8G rpool/swap

Add the swap

# swap -a /dev/zvol/dsk/rpool/swap

Check the swaplist again

# swap -l
swapfile             dev    swaplo   blocks     free
/dev/zvol/dsk/rpool/swap 124,2         8 16777208 16777208

Check the new rpool swap size

# zfs get volsize rpool/swap
NAME        PROPERTY  VALUE    SOURCE
rpool/swap  volsize   8G       local

Finished