How to add swap space solaris


The swap command provides a method of adding, deteting and monitoring the swap areas used by the kernel. Swap area changes made from the command line are not permanent and are lost after reboot. To create a permanet swap are you need to add in the /etc/vfstabfile.
 
Below you can see the different options that the swap command permit

-s  (summarize)  reports in K-bytes

-l    (details of the physical swap areas) reports in 512-bytes-blocks

-d (delete)

-a  (add)



Adding Swap Spacein 7 steps

1.- Identify the partitions with the requirements that you need

2.- mkdir -p /usr/local/swap

3.- mkfile 500m /usr/local/swap/swapfile

4.- swap -a /usr/local/swap/swapfile

5.- swap -l

6.- swap -s

7.- Edit vi /etc/vfstab

/usr/local/swap/swapfile  -  -  swap  - no   -



Removing swap sliceand swap file

1.-swap -d /dev/dsk/cXtXdXsX

2.-swap -d /usr/local/swap/swapfile

3.-rm /usr/local/swap/swapfile

4.-edit vi /etc/vfstab and delete the entry



Regards
Roger



Comments