Skip Navigation Links | |
Exit Print View | |
System Administration Guide: Devices and File Systems Oracle Solaris 10 8/11 Information Library |
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)
9. Using InfiniBand Devices (Overview/Tasks)
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)
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 Areas and the /etc/vfstab File
Allocating Swap Space for UFS-Based Systems
Allocating Swap Space for ZFS-Based Systems
Creating a Swap File in a UFS Root Environment
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
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)
If you have unneeded swap space, you can remove it.
# /usr/sbin/swap -d /path/filename
The swap file name is removed so that it is no longer available for swapping. The file itself is not deleted.
# rm /path/filename
If the swap space is a file, remove it. Or, if the swap space is on a separate slice and you are sure you will not need it again, make a new file system and mount the file system.
For information on mounting a file system, see Mounting and Unmounting Oracle Solaris File Systems.
# swap -l
Example 19-2 Removing Unneeded Swap Space
The following examples shows how to delete the /files/swapfile swap file.
# swap -d /files/swapfile # (Remove the swap entry from the /etc/vfstab file) # rm /files/swapfile # swap -l swapfile dev swaplo blocks free /dev/dsk/c0t0d0s1 136,1 16 1638608 1600528
Most systems require some amount of swap space configured. If your system's swap space requirements change, then you might need to remove a swap volume before you can increase or decrease space allocated for swap. On a busy system, it might be easier to create a second swap volume if you need to increase swap space rather than trying to remove a swap volume that is busy just to increase its size.
# swap -l swapfile dev swaplo blocks free /dev/zvol/dsk/rpool/swap 102,2 16 16646128 16646128
In the above output, blocks == free, so the swap device is not actually being used.
# swap -d /dev/zvol/dsk/rpool/swap
# swap -l