The Task Create an LVM snapshot of the root filesystem. Revert Snapshot Changes To An Earlier State. The Solution 1. Before proceeding make sure LVM Volume Group (VG) has enough space for the snapshot. # vgs VG #PV #LV #SN Attr VSize VFree ol 2 2 0 wz–n- 12.00g 1.01g 2. In this example we […]
Archives for August 2019
How to Migrate CentOS/RHEL 6 iptables Rules to CentOS/RHEL 7 firewalld
Below we demonstrate three common methods for transforming the iptables rules into the firewalld controls. Our example shows the transformation of one iptables rule output by the iptables-save command: LOG_TEST_NEW – [0:0] -A LOG_TEST_NEW -m limit –limit 2/min -j LOG –log-prefix “New Connection” The example rule logs up to two log entries per minute. The […]
How to Trace Python Scripts using trace.py
More and more scripts for administrative tasks on Linux OS are written by Python. This post aims to introduce a tool to trace Python statement execution. Python is a dynamic object-oriented programming language which can be used to develop various types of software. It offers strong support for integration with other languages and tools and […]
Time goes out of sync on a node running CentOS/RHEL 7
The Scenario The system is not configured to use the ntpd service to synchronize time and date. CentOS/RHEL 7 uses systemd to manage services. The timedatectl utility is distributed as part of the systemd, and allows you to review and change the configuration of the system clock: change the current date and time, set the […]
Unable to set a GRUB password on a Raspberry Pi 3 system
The Problem grub-rpi3.efi is built on RPI3 image build stage, and it is missing a crucial module for password prompt: # efibootmgr -v -v Could not read variable ‘BootNext’: No such file or directory error trace: vars.c:332 vars_get_variable(): open(/sys/firmware/efi/vars/BootNext-8be4df61-93ca-11d2-aa0d-00e098032b8c/raw_var, O_RDONLY) failed: No such file or directory lib.c:139 efi_get_variable(): ops->get_variable failed: No such file or directory […]
How to disable NUMA on EFI Boot Loaders using GRUB2 (CentOS/RHEL 6)
The purpose of this post is to explain the steps to disable NUMA on servers which use the EFI boot loader. GRUB 2 is the default EFI-mode boot loader, so the steps are based on GRUB2. 1. Take a backup of /etc/default/grub configuration file. # cp -p /etc/default/grub /etc/default/grub_backup 2. Edit /etc/default/grub file and replace […]
How to extend an LVM swap partition in Linux
Question: Given an LVM partition, how can we extend it to give some addtional space? Swap filesystem Swap is used if there is not enough memory available for your application. It’s normal and can be a good thing for Linux systems to use swap, even if there is still available RAM. But, it’s not just […]
How to install packages using dnf in CentOS/RHEL 8
CentOS/RHEL has a new package manager called DNF which can be used to install packages on CentOS/RHEL 8 systems. DNF or Dandified YUM is the next-generation version of the Yellowdog Updater Modified (yum), a package manager for rpm-based distributions in CentOS/RHEL 8. It also resolves dependencies automatically. The following is an example of how to […]
How to list all modules and check if they are enabled or disabled in CentOS/RHEL 8
CentOS/RHEL 8 distributes sets of related RPM packages that form a logical unit (such as different components of an application or a group of tools) as modules, with these modules being able to be enabled or disabled on the system. How can a user or administrator of an OL8 system determine what modules are installed […]
How To Migrate Existing Iptables rules to Nftables In CentOS/RHEL 8
In CentOS/RHEL 8, the default iptables network packet filtering framework been replaced with the nftables framework. As the designated successor to iptables, ip6tables, arptables, and ebtables, the nftables framework includes packet classification facilities and several improvements, which provide added convenience and improved performance over the previously used packet-filtering tools. In this post we will discuss […]