The post is intended for Linux System Administrators seeking to initially configure or further optimise existing LVM configured systems. It discusses: the need for specific LVM filter string configuration for the particular storage type in use. provide sample LVM filter strings for a variety of common storage devices LVM Configuration – filter parameter The primary […]
Archives for May 2019
How the BASH Shell load its configuration files in Linux
BASH Shell will attempt to load several configuration files during the initialization. There are 2 sets of configuration files, depending it’s a login-shell, or non-login shell. When you login a server on a bare metal monitor, or via SSH, or with # su – [username], you get a login shell. When you start a shell […]
LVM Commands Fail With “Failed to load config file /etc/lvm/lvm.conf”
The Problem Unable to run lvm commands after modifying lvm.conf Errors like: lvextend -L +549G /dev/u03/u03 Parse error at byte 61974 (line 1382): unexpected token Failed to load config file /etc/lvm/lvm.conf The Solution This could happen due to extraneous characters in /etc/lvm/lvm.conf. In this case the parse error gives a hint that the error is […]
How to Move Swap From Disk Partition to LVM Volume in Linux
There is no command or method exists that allows you to move swap space from one location to another. You can turn off the current swap space with swapoff command in the original location. 1. Turn swapoff on old disk: # swapoff /dev/device Note – Assuming there is free space in volume group, we will […]
How to check change log of RPM packages on CentOS/RHEL
Scenario 1: Checking change log of installed rpm Syntax: # rpm -q –changelog [rpm name] Example: # rpm -q –changelog rsync-3.0.9-17.el7.x86_64 – Resolves: #1032637 – rsync unit tests cannot be compiled – switch to hardened build * Tue Jan 28 2014 Pavel Šimerda – 3.0.9-14 – Resolves: #1052814 – rsync command is terminated with SIGSEGV […]
How to run “find” command on current directory only and not on sub-directories
Question: How to perform find commands on the current directory, without going into the subdirectories. Example Scenario: – Remove all the files in the current directory ONLY that are a week old. The Solution 1. Add the following operations to the desired find commands: ! \( -type d ! -name {DIRECTORY NAME} -prune \) 2. […]
How to run a cron job on specific days of the week
Question: How to run a cronjob on a specific day of the week or a range of days of the week? To run a cron job on specific days of the week, you can specify this via the following: 1. Edit the crontab for the user wishes to create the crontab job for. For example: […]
How to Run SCP Without Password Prompt Interruption in Linux
Question: How to run scp command without prompting for any password in Linux? The password-less operation can be added to cron or schedule in case of reducing manual intervention. The various methods of copy operations include rsync, bacula, and keygen with scp. 1. Generate a key using ssh-keygen for any particular user and server. For […]