|
|||||||
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: Adding a Disk (Tasks) 13. x86: Adding a Disk (Tasks) 14. Configuring Solaris iSCSI Targets and Initiators (Tasks) 15. Configuring and Managing the Solaris Internet Storage Name Service (iSNS) 16. The format Utility (Reference) 17. Managing File Systems (Overview) 18. Creating UFS, TMPFS, and LOFS File Systems (Tasks) 19. Mounting and Unmounting File Systems (Tasks) 20. Using The CacheFS File System (Tasks) 21. Configuring Additional Swap Space (Tasks) How Do I Know If I Need More Swap Space? How to Remove Unneeded Swap Space 22. Checking UFS File System Consistency (Tasks) 23. UFS File System (Reference) 24. Backing Up and Restoring File Systems (Overview) 25. Backing Up Files and File Systems (Tasks) 26. Using UFS Snapshots (Tasks) 27. Restoring Files and File Systems (Tasks) 28. UFS Backup and Restore Commands (Reference) 29. Copying UFS Files and File Systems (Tasks) |
Adding More Swap SpaceAs system configurations change and new software packages are installed, you might need to add more swap space. The easiest way to add more swap space is to use the mkfile and swap commands to designate a part of an existing UFS or NFS file system as a supplementary swap area. These commands, described in the following sections, enable you to add more swap space without repartitioning a disk. Alternative ways to add more swap space are to repartition an existing disk or to add another disk. For information on how to repartition a disk, see Chapter 10, Managing Disks (Overview). Creating a Swap FileThe following general steps are involved in creating a swap file:
mkfile CommandThe mkfile command creates a file that is suitable for use as either an NFS-mounted swap area or a local swap area. The sticky bit is set, and the file is filled with zeros. You can specify the size of the swap file in bytes (the default) or in Kbytes, blocks, or Mbytes by using the k, b, or m suffixes, respectively. The following table shows the mkfile command options. Table 21-2 Options to the mkfile Command
Note - Use the -n option only when you create an NFS swap file. How to Create a Swap File and Make It Available
The following examples shows how to create a 100-Mbyte swap file called /files/swapfile. # mkdir /files # mkfile 100m /files/swapfile # swap -a /files/swapfile # vi /etc/vfstab (An entry is added for the swap file): /files/swapfile - - swap - no - # swap -l swapfile dev swaplo blocks free /dev/dsk/c0t0d0s1 136,1 16 1638608 1600528 /files/swapfile - 16 204784 204784 |
||||||
|