Go to main content

Managing ZFS File Systems in Oracle® Solaris 11.3

Exit Print View

Updated: May 2019
 
 

Viewing Swap and Dump Information

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

How to Create a Swap Volume

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.

  1. Create the swap volume.
    # zfs create -V size new-pool/swap
  2. With a text editor, update the /etc/vfstab entry for the new swap device.

    See Example 22, Manually Creating a Swap Volume for a sample entry.

  3. Activate the new swap volume if you want to switch to the new swap volume from an existing active swap volume.
    # swap -a path-to-new-swap-volume
  4. If necessary, reboot the system.
Example 22  Manually Creating a 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

How to Create a Dump Volume

This procedure applies whether you are using a root pool or a non-root pool.

  1. Create the dump volume.
    # zfs create -V size new-pool/dump
  2. Reset the dump device.
    # dumpadm -d dump-path
  3. If necessary, reboot the system.
Example 23  Manually Creating a Dump Volume

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