JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Devices and File Systems     Oracle Solaris 10 1/13 Information Library
search filter icon
search icon

Document Information

Preface

1.  Managing Removable Media (Overview/Tasks)

2.  Writing CDs and DVDs (Tasks)

3.  Managing Devices (Tasks)

4.  Dynamically Configuring Devices (Tasks)

5.  Managing USB Devices (Tasks)

6.  Using InfiniBand Devices (Overview/Tasks)

7.  Managing Disks (Overview)

8.  Managing Disk Use (Tasks)

9.  Administering Disks (Tasks)

10.  SPARC: Setting Up Disks (Tasks)

11.  x86: Setting Up Disks (Tasks)

12.  Configuring Oracle Solaris iSCSI Targets (Tasks)

13.  The format Utility (Reference)

14.  Managing File Systems (Overview)

15.  Creating and Mounting File Systems (Tasks)

16.  Configuring Additional Swap Space (Tasks)

About Swap Space

Swap Space and Virtual Memory

Swap Space and the TMPFS File System

Swap Space and Dynamic Reconfiguration

Configuring Swap Space in a SAN Environment

How Do I Know If I Need More Swap Space?

Swap-Related Error Messages

TMPFS-Related Error Messages

How Swap Space Is Allocated

Swap Areas and the /etc/vfstab File

Planning for Swap Space

Allocating Swap Space for ZFS-Based Systems

Monitoring Swap Resources

Adding or Changing Swap Space in an Oracle Solaris ZFS Root Environment

How to Add Swap Space in an Oracle Solaris ZFS Root Environment

17.  Checking UFS File System Consistency (Tasks)

18.  UFS File System (Reference)

19.  Backing Up and Restoring UFS File Systems (Overview/Tasks)

20.  Using UFS Snapshots (Tasks)

21.  Copying Files and File Systems (Tasks)

22.  Managing Tape Drives (Tasks)

23.  UFS Backup and Restore Commands (Reference)

Index

Adding or Changing Swap Space in an Oracle Solaris ZFS Root Environment

The following section describes how to add or change swap space in a ZFS root environment. See the previous sections to determine if your system or applications need additional swap space.

For information about customizing ZFS swap or dump devices, see Customizing ZFS Swap and Dump Volumes in Oracle Solaris ZFS Administration Guide.

How to Add Swap Space in an Oracle Solaris ZFS Root Environment

  1. Become superuser.
  2. Identify the current swap volume.

    A swap volume cannot be removed if it is in use. You can tell if the current swap volume is in use by comparing the blocks identified in the blocks column and blocks identified in the free column. If the blocks in the two columns are equal, the swap area is not busy. For example:

    # swap -l
    swapfile                 dev  swaplo   blocks   free
    /dev/zvol/dsk/rpool/swap 256,1      16 1058800 1058800
  3. Select one of the following to resize the swap volume.
    1. If the current swap area is not in use, you can resize the size of the current swap volume, but you must reboot the system to see the increased swap space.

      For example:

      # zfs get volsize rpool/swap
      NAME        PROPERTY  VALUE    SOURCE
      rpool/swap  volsize   517M     -
      # zfs set volsize=2g rpool/swap
      # zfs get volsize rpool/swap
      NAME        PROPERTY  VALUE    SOURCE
      rpool/swap  volsize   2G       -
      # init 6
    2. If the system cannot be rebooted, add another swap volume to increase your total swap space.

      For example:

      # zfs create -V 2G rpool/swap2

      Then, activate the second swap volume.

      # 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
  4. If necessary, add an entry for the second swap volume in the /etc/vfstab file.

    For example:

    /dev/zvol/dsk/rpool/swap2    -        -       swap    -       no      -