To view the swap area, use the swap –l command. For example:
# swap -l swapfile dev swaplo blocks free /dev/zvol/dsk/rpool/swap 145,2 16 16646128 16646128
To view the dump configuration, use the dumpadm command. For example:
# dumpadm Dump content: kernel pages Dump device: /dev/zvol/dsk/rpool/dump (dedicated) Savecore directory: /var/crash/ Savecore enabled: yes Save compressed: on
You can also manually create swap or dump volumes in a non-root pool. After creating a dump device on the non-root pool, you must also reset it by running the dump –d command.
In the following example, a dump device is created on the non-root pool bpool.
# zfs create -V 10g bpool/dump2 # dumpadm -d /dev/zvol/dsk/bpool/dump2 Dump content : kernel with ZFS metadata Dump device : /dev/zvol/dsk/bpool/dump2 (dedicated) Savecore directory: /var/crash Savecore enabled : yes Save compressed : on
This procedure applies to both root pools and non-root pools. If you need more swap space but the existing swap device is busy, just add another swap volume by using this same procedure.
# zfs create -V size new-pool/swap
See Example 22, Manually Creating a Swap Volume for a sample entry.
# swap -a path-to-new-swap-volume
This example creates a new 4 GB swap volume in the pool rpool. This new swap volume is intended to replace an existing swap volume.
# zfs create -V 4g rpool2/swap2
# vi /etc/vfstab
/dev/zvol/dsk/rpool2/swap - - swap - no -vfstab entry
# swap -a /dev/zvol/dsk/rpool/swap2
This procedure applies whether you are using a root pool or a non-root pool.
# zfs create -V size new-pool/dump
# dumpadm -d dump-path
This example creates a new 4 GB dump volume in the pool rpool.
# zfs create -V 4g rpool2/dump # dumpadm -d /dev/zvol/dsk/rpool2/dump