Contained Within
Find More Documentation
Featured Support Resources
| Download this book in PDF (1709 KB)
Adjusting the Sizes of Your ZFS Swap and Dump Devices
Because of the differences in the way a ZFS root installation sizes
swap and dump devices, you might need to adjust the size of swap and dump
devices before, during, or after installation.
-
You can adjust the size of your swap and dump volumes during
an initial installation. For more information, see Example 5–1.
-
You can create and size your swap and dump volumes before
you perform a Solaris Live Upgrade operation. For example:
-
Create your storage pool.
# zpool create rpool mirror c0t0d0s0 c0t1d0s0
|
-
Create your dump device.
# zfs create -V 2G rpool/dump
|
-
Select one of the following to create your swap area:
-
On a SPARC based system, create your swap area. Set the block
size to 8 Kbytes.
# zfs create -V 2G -b 8k rpool/swap
|
-
On an x86 based system, create your swap area. Set the block
size to 4 Kbytes.
# zfs create -V 2G -b 4k rpool/swap
|
-
You must activate the swap area when a new swap device is
added or changed.
Solaris Live Upgrade does not resize existing swap and dump volumes.
-
You can reset the volsize property of the
dump device after a system is installed. For example:
# zfs set volsize=2G rpool/dump
# zfs get volsize rpool/dump
NAME PROPERTY VALUE SOURCE
rpool/dump volsize 2G -
|
-
You can resize the swap volume but until CR 6765386 is integrated,
it is best to remove the swap device first. Then, recreate it. For example:
# swap -d /dev/zvol/dsk/rpool/swap
# zfs volsize=2G rpool/swap
# swap -a /dev/zvol/dsk/rpool/swap
|
For information on removing a swap device on an active system, see this
site:
http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide
-
You can adjust the size of the swap and dump volumes in a
JumpStart profile by using profile syntax similar to the following:
install_type initial_install
cluster SUNWCXall
pool rpool 16g 2g 2g c0t0d0s0
|
In this profile, the 2g and 2g entries
set the size of the swap area and dump device as 2 Gbytes and 2 Gbytes, respectively.
-
If you need more swap space on a system that is already installed,
just add another swap volume. For example:
# zfs create -V 2G rpool/swap2
|
Then, activate the new swap volume. For example:
# swap -a /dev/zvol/dsk/rpool/swap2
# swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 256,1 16 1058800 1058800
/dev/zvol/dsk/rpool/swap2 256,3 16 4194288 4194288
|
Add an entry for
the second swap volume to the /etc/vfstab file.
|