Add swap space temporarily in Solaris

Home -> UNIX -> Solaris -> System administration

28651 views

From the computer of: qmchenry (339 recipes)
Created: Oct 06, 2003


Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

Sometimes swap space is inadequate but no free disk slices are available. Until a permanent solution is available, a file can be constructed and added to the swap space.

To make a 250MB addition to swap space using the /var filesystem, run as root:

mkfile 250m /var/newswap
swap -a /var/newswap


The mkfile command makes a file of a specified size. The swap -a command adds the file to the swap space. If you have a free slice, such as /dev/dsk/c0t0d0s5, you can add that to the swap space temporarily with the following command:

swap -a /dev/dsk/c0t0d0s5


These changes are temporary because they will not persist after the system reboots. To make the preceeding two example swap space additions persist after a reboot, place the following lines in the /etc/vfstab file (be very careful making changes to this file):

/var/newswap       -          -       swap    - no  -
/dev/dsk/c0t0d0s5  -          -       swap    - no  -

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.





Related recipes:

  Display Solaris swap information
  Monitor Solaris system load: understanding vmstat
  Solaris 10: enable NFS server
  Solaris software RAID
  Simple Solaris BIND/DNS Server Setup with Failover
  Change BootPROM settings from the Solaris command line
  Change Solaris DNS client settings
  Add a user from the command line in Solaris
  Solaris 10: Create multi-terabyte UFS filesystem
  Solaris 10: shutdown or stop a zone

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.