After installation, you might need to adjust the size of swap and dump devices after installation. Or you might need to recreate the swap and dump volumes.
By default, when you specify n blocks for the swap size, the first page of the swap file is automatically skipped. Thus, the actual size that is assigned is n-1 blocks. To configure the swap file size differently, use the –swaplow option with the swap command. For more information about the options for the swap command, see the swap(8) man page.
The following examples show how to adjust existing swap and dump devices under different circumstances.Example 25 Resetting the Dump Device volsize Property
Note that resizing a large dump device can be a time-consuming process.
$ zfs set volsize=2G rpool/dump $ zfs get volsize rpool/dump NAME PROPERTY VALUE SOURCE rpool/dump volsize 2G -Example 26 Resizing the Swap Volume for Immediate Use
This example shows how to adjust the size of the swap volume.
$ swap -l swapfile dev swaplo blocks free /dev/zvol/dsk/rpool/swap 303,1 8 2097144 2097144 $ zfs get volsize rpool/swap NAME PROPERTY VALUE SOURCE rpool/swap volsize 1G local $ zfs set volsize=2g rpool/swap $ swap -l swapfile dev swaplo blocks free /dev/zvol/dsk/rpool/swap 303,1 8 2097144 2097144 /dev/zvol/dsk/rpool/swap 303,1 2097160 2097144 2097144
You will see two swap entries temporarily, but you will have access to the extended swap space.