000015122 - How to add swap space on a Linux box

Document created by RSA Customer Support Employee on Jun 16, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000015122
Applies ToAuthentication Manager 7.1
IssueHow to add swap space on a Linux box
Insufficient swap space: xxx KB. RSA Authentication Manager requires at least: xxx KB swap space.

For full details of the most appropriate way to add swap to your system contact Redhat customer support for advice.  As an easy to use guide see an online article at https://www.wideopen.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/s1-swap-adding.html

As an example, using the traditional UNIX method of creating a block file (this used to be considered less efficient than using a raw character device but has the advantage of being relatively easy to apply to a running system.

# cat /tmp/rsa_am_200806222210/prereq_check.log
Please fix the following error(s) and re-run setup.sh
Insufficient swap space: 1048568 KB. RSA Authentication Manager requires at least: 2076084 KB swap space.

Note:  The amount operating system swap space that it is short by is 1052172, but this should be rounded up to a multiple of 1024 on the assumption that the file system we are using has a default block size of 1024 bytes.

For example:
   We are short by 1027516
   Divide by 1024 (because of the block size we will use)
   This gives us 1027.511
   Round this up to a number divisible by 1024
   Multiply by 1024 to get back to the byte size
   This gives us 1048576

So, now we can add the extra swap that we require:

# free
                 total          used           free               shared    buffers     cached
Mem:       2076084    1111772     964312          0             15572       901944
-/+ buffers/cache:     194256    1881828
Swap:      1048568          0    1048568

# cat /tmp/rsa_am_20080623100433/prereq_check.log
Please fix the following error(s) and re-run setup.sh
Insufficient swap space: 1048568 KB. RSA Authentication Manager requires at least: 2076084 KB swap space.

# # so we need at least 1027516kb more swap
# # This works out as 1003.433 blocks (each block is 1024 bytes so divide by 1024)
# # so this rounds up to 1024 - but in fact we are close to 1024 so I will pick that         
# # 1024 * 1024  (gives us back 1048576 kb so we use this figure next

# dd if=/dev/zero bs=1024 of=/swapfile count=1048576
1048576+0 records in
1048576+0 records out
# mkswap /swapfile
Setting up swapspace version 1, size = 1073737 kB
# swapon /swapfile
# free
             total       used       free     shared    buffers     cached
Mem:       2076084    1640652     435432          0      21848    1461080
-/+ buffers/cache:     157724    1918360
Swap:      2097136          0    2097136

Now remember to make this permanent by updating /etc/fstab with this line:
/swapfile               swap                    swap    defaults        0 0

For full installation instructions please refer to the installation manual, available in the installation media and also available  in the online V7.1 documentation set:

RSA Authentication Manager 7.1 Release Notes



RSA Authentication Manager 7.1 Getting Started  



RSA Authentication Manager 7.1 ISO Mounting Instructions  



RSA Authentication Manager 7.1 Administrator?s Guide



RSA Authentication Manager 7.1 Installation Guide  



RSA Authentication Manager 7.1 Migration Guide



RSA Authentication Manager 7.1 Planning Guide



RSA Authentication Manager 7.1 RADIUS Reference Guide



Legacy Article IDa40429