Add SWAP Partion to Sun Solaris Server.

Sometime , your server has little value of SWAP patition because your server has run many process. So you want to add swap patition to server immediately. You can do by follow this solution.

1. You must su to user root.

bash-3.00$ su –
Password:
Sun Microsystems Inc. SunOS 5.10 Generic January 2005

2. You must be check your free space swap patition now.

# swap –l
swapfile dev swaplo blocks free
/dev/dsk/c0d0s1 102,1 8 2113768 2113768

3. Create empty file size 100 MB by config boxsize = 1 MB.

# dd if=/dev/zero of=/export/aoddy/file bs=1000000 count=100
100+0
records in
100+0 records out

4. Change mode new file.

# chmod +t /export/aoddy/file

5. Add new file to SWAP patition.

# swap -a /export/aoddy/file

6. Show all SWAP patition.

# swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0d0s1 102,1 8 2113768 2113768
/
export/aoddy/file – 8 195304 195304