Question : How to install a specific rpm package version using yum? Answer : The ask here is to install a specific version of the package when multiple versions are available. By default when you do not specify a version for a package, latest version gets installed. The procedure below requires you to be logged […]
Archives for August 2017
CentOS / RHEL : How to remove unused Physical Volume(PV) from Volume Group (VG) in LVM
To remove any physical volume in a volume group vgreduce command can be used. The vgreduce command shrinks the volume group by removing one or more PVs. We can then either use these free PVS in another VG or remove them from the LVM configuration. Removing the PV 1. Before removing a physical volume from […]
CentOS / RHEL : How to find kernel parameters used while booting
The options and arguments supplied while booting RHEL/CentOS kernel can be viewed in the file /proc/cmdline. # cat /proc/cmdline ro root=/dev/mapper/vg_os-lv_os rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=131M@0M rd_LVM_LV=vg_os/lv_os KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet Comparing with the default boot parameters You can compare the /etc/grub.conf file with the /proc/cmdline file to see if the same options are […]
CentOS / RHEL : How to convert volume group metadata between LVM1 and LVM2
The volume group metadata contains all the configuration information about the VG. It can be used to recover a deleted or corrupted VG. By default, the system will backup LVM2 automatically when LVM2 metadata has been changed by lvm utility such as lvcreate or vgchange etc. The metadata backup is stored in /etc/lvm/backup directory. To […]
CentOS / RHEL : How to find free space in a Volume Group in LVM
Knowing the free space remaining in a volume group is an important piece of information, especially when you want to : 1. add a new volume in the VG 2. add a new PV in the VG 3. extend an existing volume in the VG Method 1 – using vgs command vgs command simply puts […]
CentOS / RHEL : How to find RPM installation date and time
You can use the following command to display the install date and time of all the packages installed on your system: rpm -qa –last For example : # rpm -qa –last | more aide-0.14-11.el6.x86_64 Tue 22 Aug 2017 12:57:07 AM IST tzdata-java-2017b-1.el6.noarch Tue 22 Aug 2017 12:27:22 AM IST trace-cmd-2.2.4-4.el6.x86_64 Tue 22 Aug 2017 12:27:22 […]
CentOS / RHEL : How to delete a volume group in LVM
The post describes steps to delete a volume group. Make sure you have unmounted and the mount points and taken prior backup of the mount point if required. 1. Once you have umounted all the mount points, you can remove the LVs associated with them. To do so use the lvremove command : # lvremove […]
How to activate and mount 2 Volume groups with same names in CentOS/RHEL
Question: How to mount a Volume_Group/Logical Volume on a system that already has a volume group/logical volume mounted with the same Volume Group and Logical Volume Name. Below is the summary of steps to perform to import new volume group with same name as that of already imported VG. Backup the system. Get the relevant […]
Linux OS service ‘dhcpd’
Service Name dhcpd Description – The Dynamic Host Configuration Protocol (DHCP), a derivation of the original Bootstrap Protocol (BOOTP), has expanded its usefulness beyond its thin-client origins. Enterprise-level systems often use the DHCP service to centralize the administration of TCP/IP addresses, network masks, hostnames, router and DNS information. – The dhcpd service is run on […]
CentOS / RHEL : How to prioritize the devices used for swap partition
If you check the output of the swapon -s command, you would see the Priority column. The priority column defines the order in which the swap devices are used when required. In our example below the priority -1 is higher than the priority -2 (as the values are in negative). # swapon -s Filename Type […]