Skip to main content

Adding SWAP space on Oracle Linux 8.x using swap file

This article will guide you how you can add the swap space on Oracle Linux 8.x operating system. In this method we will use the swap file for adding it to the swap memory. Currently allocated swap memory – 8 GB New swap memory to be added – 32 GB
[root@racnode1 ~]# df -h
Filesystem              Size  Used Avail Use% Mounted on
devtmpfs                756G     0  756G   0% /dev
tmpfs                   756G  4.0K  756G   1% /dev/shm
tmpfs                   756G   27M  756G   1% /run
tmpfs                   756G     0  756G   0% /sys/fs/cgroup
/dev/mapper/ol-root     100G  2.8G   98G   3% /
/dev/sda2               945M  223M  658M  26% /boot
/dev/sda1               488M  5.2M  483M   2% /boot/efi
/dev/mapper/ol-oracle   500G  3.6G  497G   1% /oracle
/dev/mapper/ol-ortrace  500G  3.6G  497G   1% /oracle/trace
tmpfs                   152G     0  152G   0% /run/user/0
[root@racnode1 ~]#
Create swap file with 32GB size:
[root@racnode1 ~]# dd if=/dev/zero of=/root/newswap bs=1M count=32768
32768+0 records in
32768+0 records out
34359738368 bytes (34 GB, 32 GiB) copied, 10.0707 s, 3.4 GB/s
[root@racnode1 ~]#
Verify the created swap file:
[root@racnode1 ~]# ls /root/newswap
/root/newswap
[root@racnode1 ~]# ls -l /root/newswap
-rw-r--r--. 1 root root 34359738368 Mar 15 13:00 /root/newswap

Enable swap file properties on newly created file:

[root@racnode1 ~]# chmod 600 /root/newswap
[root@racnode1 ~]# mkswap /root/newswap
Setting up swapspace version 1, size = 32 GiB (34359734272 bytes)
no label, UUID=24da1634-9c5c-41df-a9fb-5e53ff002d49
[root@racnode1 ~]#
Add the new swapfile to /etc/fstab for boot persistency:
[root@racnode1 ~]# vi /etc/fstab
Verify the newly added swap space:
[root@racnode1 ~]# swapon -sq
Filename                                Type            Size    Used    Priority
/dev/dm-1                               partition       8388604 0       -2
/root/newswap                           file            33554428        0       -3
[root@racnode1 ~]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/dm-1                               partition       8388604 0       -2
/root/newswap                           file            33554428        0       -3
[root@racnode1 ~]# free
              total        used        free      shared  buff/cache   available
Mem:     1584370860     1683740  1548134020       26752    34553100  1575477784
Swap:      41943032           0    41943032
[root@racnode1 ~]#
Thanks for reading 😊 Regards, ZAHEER

Comments

Popular posts from this blog

Disable Firewall on Oracle Linux 8

In this blogpost we will see how we can stop/disable the firewall on Oracle Linux 8, the firewall command is same in both linux 7 an linux 8. The below listed is the procedure for stopping and disabling the  firewall on Oracle Linux 8. - Here we can see the firewall deamon in active state - Here when we stop the firewall in previous command, now the firewall daemon is dead - For permanent disabling the firewall on server, we can use "disable" option The following commands will be helpful: #systemctl status firewalld #systemctl stop firewalld #systemctl disable firewalld #systemctl enable firewalld #systemctl start firewalld Hope it helps !! Thanks for reading :) regards, X A H E E R

Enable Desktop on Oracle Solaris 11.4

Oracle Solaris 11 installation has multiple options to choose for installation of an Operating Environment, but mostly Oracle Solaris text install media is used and this installation media doesn't offer the GUI Desktop Environment by default after the installation. This blog post will explain how we can enable the desktop for Oracle Solaris 11.4 operating system, after the completion of installation. We have to install "solaris-desktop" package and reboot the machine and GUI desktop will be enabled for the Operating System. In this blog post my virtual machine is connected to the internet and hence I am able to use available pupblic repository for package installation, if in case internet is not available for the server/machine then we have configure the local/Server  repository for the installation. Follow the below steps for desktop package installation: After installation of dekstop package we are now able to login with GUI desktop environment

Oracle Applications R12.2 Installation on Linux using virtual box

Oracle E-Business suite R12.2 is released a month ago. I received too many requests from my followers to demonstrate this Installation. This is a step by step detailed article for Installing Oracle E-business suite R12,2 on Oracle Enterprise Linux 5.7 (64-bit). I've used oracle virtual box for Installing Linux. Note:  This Installation is demonstrated on virtual machine with 8GB RAM and Installation completed in 7 hours. I am not sure whether this Installation will work with less than this .  My Virtual Machine configuration: CPU    = 1 core RAM   = 8 GB HDD   =  380 GB Software's Required: 1) Oracle Virtual Box 2) Oracle Enterprise Linux 5.7 (64-bit) 3) Oracle E-Business suite R12.2 for LinuxX86-64-bit Installation Steps: Hardware requirements Create virtual machine and Install operating system Operating System pre-requisites Prepare Stage Area Install Oracle EBS R12.2 software Verify Installation 1. Hardware Requirement