Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem on Creating a Swapfile for adding swap space

user8860348Jan 25 2012 — edited Jan 26 2012
Folks,

Hello. I am using Oracle Linux 5.6. At this time, the Linux swap space is 0 KB by using the command:

[root@rac1 /]# grep SwapTotal /proc/meminfo

I need 150MB swap space to install Oracle Database. I create the swap space using the following commands:

Step 1:
[root@rac1 /]# dd if=/dev/zero of=/swapfile bs=1024 count15360 hit enter

Output: 153600 to records in
153600 to records out
157286400 bytes(157MB) copied, 3.3835 seconds, 46.5MB/s.

Step 2:
[root@rac1 /]# mkswap /swapfile hit enter

Output: Command not found.

Step 3:
[root@rac1 /]# swapon /swapfile hit enter

Output: Command not found.

Step 4:
[root@rac1 etc]#vi fstab

Add this line into the file: /swapfile swap swap defaults 0 0
Save and close the file fstab.

Step 5:
Reboot Oracle Linux 5.6 and run this command:

[root@rac1 /]# grep SwapTotal /pro/meminfo

Output: SwapTotal: 0 KB

As you see above, swap space is not added. I think the problem is that the commands "mkswap /swapfile" and "swapon /swapfile" are not executed.

My question is : Do any folk understand how to add the swap space successfully ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 23 2012
Added on Jan 25 2012
7 comments
2,518 views