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

Document Information

About This Book

1.  Managing Removable Media (Overview)

2.  Managing Removable Media (Tasks)

3.  Accessing Removable Media (Tasks)

4.  Writing CDs and DVDs (Tasks)

5.  Managing Devices (Overview/Tasks)

6.  Dynamically Configuring Devices (Tasks)

7.  Using USB Devices (Overview)

8.  Using USB Devices (Tasks)

9.  Using InfiniBand Devices (Overview/Tasks)

10.  Managing Disks (Overview)

11.  Administering Disks (Tasks)

12.  SPARC: Setting Up Disks (Tasks)

13.  x86: Setting Up Disks (Tasks)

14.  Configuring Oracle Solaris iSCSI Targets and Initiators (Tasks)

15.  The format Utility (Reference)

16.  Managing File Systems (Overview)

17.  Creating and Mounting File Systems (Tasks)

18.  Using The CacheFS File System (Tasks)

19.  Configuring Additional Swap Space (Tasks)

About Swap Space

Swap Space and Virtual Memory

Swap Space and the TMPFS File System

Swap Space as a Dump Device

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 UFS-Based Systems

Allocating Swap Space for ZFS-Based Systems

Monitoring Swap Resources

Adding More Swap Space

Creating a Swap File in a UFS Root Environment

mkfile Command

How to Create a Swap File and Make It Available in UFS Root Environment

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

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

Removing a Swap File From Use

How to Remove Unneeded Swap Space in UFS Root Environment

How to Remove a Swap Volume in a ZFS Root Environment

20.  Checking UFS File System Consistency (Tasks)

21.  UFS File System (Reference)

22.  Backing Up and Restoring UFS File Systems (Overview)

23.  Backing Up UFS Files and File Systems (Tasks)

24.  Using UFS Snapshots (Tasks)

25.  Restoring UFS Files and File Systems (Tasks)

26.  UFS Backup and Restore Commands (Reference)

27.  Copying Files and File Systems (Tasks)

28.  Managing Tape Drives (Tasks)

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.

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

  1. Become superuser or assume an equivalent role.
  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.

      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       -
    2. If the current swap area is in use, you can add another swap volume.

      For example:

      # zfs create -V 2G rpool/swap2
    3. Activate the second 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