Solaris / OpenSolaris Add Swap File

by on May 24, 2009 · 0 comments· last updated at May 24, 2010

How do I add swap space under Solaris / OpenSolais UNIX operating systems?

You can add the swap space as follows under Solaris UNIX operating systems.

Create A Swap File

Type the following command to create a file using mkfile (1024 Meg swap file):
# mkfile 1024m /disk2/swapfile

Enable Swap Space

To enable it type the following command:
# swap -a /disk2/swapfile
Finally, check your new swap space, enter:
# swap -l

Enable Swap Space File On Boot

Add the following line to /etc/vfstab file:
# vi /etc/vfstab
Append the following entry:

/disk2/swapfile   -   -   swap   -   no   -

Close and save the file.

References:

  • See man pages swap, and mkfile commands.


You should follow me on twitter here or grab rss feed to keep track of new changes.

Featured Articles:

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <kbd> <blockquote> <pre> <a href="" title="">

Tagged as: , , , , , ,

Previous Faq:

Next Faq: