Question: How to create an encrypted XFS filesystem that’s automatically unlocked at boot using clevis (client) and tang (server)? Red Hat has included disk encryption for years with Linux Unified Key Setup-on-disk-format (LUKS). This solution is easy to implement and configure for your encryption needs, but the management and practicality of its key management is […]
Archives for July 2021
“Volume “myvg/vol01″ Is Not Active Locally” – CentOS/RHEL
The Problem While trying to create a logical volume, lvcreate fails with error “Volume “myvg/vol01″ Is Not Active Locally” even though the volume group is active, with an error output such as the following: [root@ ~]# lvcreate -L 4G myvg Volume “myvg/vol01” is not active locally. Aborting. Failed to wipe start of new LV. The […]
“Authorization not available. Check if polkit service is running or see debug message for more information” – CentOS/RHEL 7 ssh service error
The Problem Starting ssh services errors out and spool messages regarding polkit service. # service sshd restart Redirecting to /bin/systemctl restart sshd.service Authorization not available. Check if polkit service is running or see debug message for more information. Same issue is encountered when starting the polkit service. # service polkit restart Redirecting to /bin/systemctl restart […]
How to Configure Network Interface Teaming in CentOS/RHEL 7 and 8
Network interface teaming was introduced from CentOS/RHEL 7 as a more extensible and scalable alternative to network bonding. This post describes how to configure network teaming on CentOS/RHEL 7/8. The examples provided are based on Oracle Linux 8.2 system (Oracle VirtualBox 6.1 guest virtual machine) with two network interfaces using NetworkManager. Specifically, the Network Manager […]
“VFS: Cannot open root device “UUID=[UUID]” or unknown-block(0,0)” – Booting issue CentOS/RHEL/OEL 6
The Problem Server fails to boot with latest kernel with the below errors from console logs: Initializing network drop monitor service md: Waiting for all devices to be available before autodetect md: If you don’t use raid, use raid=noautodetect md: Autodetecting RAID arrays. md: Scanned 0 and added 0 devices. md: autorun … md: … […]
How to Find the Original Installation OS Version in CentOS/RHEL
This post explains how to find the OS version which was first installed on a CentOS/RHEL system. CentOS/RHEL 6 Run grep -m1 “label =” /var/log/anaconda.storage.log to find the original installation OS version. Current version: # cat /etc/redhat-release CentOS Linux release 6.10 Original installation version: # grep -m1 “label =” /var/log/anaconda.storage.log label = EL6.8_x86_64_Disc_1_20160518 size = […]
How To Calculate The Memory Reserved By HugePages in CentOS/RHEL
Question: How to Calculate the percentage of memory reserved by Huge Pages? 1. Inspect the memory parameters: # cat /proc/meminfo MemTotal: 98721456 kB MemFree: 1277612 kB MemAvailable: 12186676 kB Buffers: 20496 kB Cached: 11013124 kB SwapCached: 4820 kB Active: 2303780 kB Inactive: 9716992 kB Active(anon): 716672 kB Inactive(anon): 582092 kB Active(file): 1587108 kB Inactive(file): 9134900 […]
“polkit code=exited status=1/FAILURE” – PolicyKit Failing to Start in CentOS/RHEL 7 and 8
The Problem Unable to start polkitd service, which in turn affects other services as well. # systemctl restart polkit ** (pkttyagent:32189): WARNING **: 13:59:48.884: Unable to register authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files Error registering authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files […]
How to change the audit log path in the MySQL Docker
1. Here we use 5.7.29 Docker image as an example. $ docker load -i mysql-enterprise-server-5.7.29.tar 2. You can bind OS mounts to Docker directory, assume you want to keep the audit logs under /bak/logs directory on the host. $ docker run –name=mysql1 \ –mount type=bind,src=/bak/my.cnf,dst=/etc/my.cnf \ –mount type=bind,src=/bak/data,dst=/var/lib/mysql \ –mount type=bind,src=/bak/logs,dst=/var/lib/logs \ -d mysql/enterprise-server:5.7 3. […]
PL/SQL: Factorial Program
Factorial: The product of an integer and all the integers below it; e.g. factorial four ( 4! ) is equal to: 4*3*2*1=24 To put it in an Oracle PL/SQL code, I would create a function that will take the input of an integer whose factorial is to be calculated and the return value would be […]