This post describes how to move a Physical Volume from an existing Volume Group to another existing Volume Group. This facilitates the move of data in the PV to the new VG without doing any manual migration. Before moving a PV, you should make sure that the Logical Volumes created on top of such PVs […]
Archives for August 2016
CentOS / RHEL : How to move a Volume Group from one system to another
To move a whole volume group from one system to another, the vgexport and vgimport commands can be used. Below example involves the steps to move a volume group named “data_vg” from one system to another. The logical volume from this volume group is initially mounted at /data01. 1. Un-mount the file system If required […]
The ultimate Linux interview questions : swap
What is swap space? Swap space in Linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the physical memory is full, inactive pages in memory are moved to the swap space. While swap space can help machines with a small amount of RAM, it […]
CentOS / RHEL : How to determine which SNMP version is being used
Question :1. What command shows what SNMP Protocol version(s) [1, 2c, 3] I am running on my system? 2. How do change the SNMP version in use? Answer : There is no command to show the current running SNMP version. The snmpd daemon will not show as running in any one particular version, as it […]
CentOS / RHEL 6 : Install and Configure SNMPv3
Steps to configure SNMPv3 1. Install the required packages Install the 2 required packages namely, 1. net-snmp-utils 2. net-snmp-devel # yum install net-snmp net-snmp-utils net-snmp-devel net-snmp-utils is required to use the utility snmpwalk. 2. Configure SNMP version 3 user We need to turn off the agent when running net-snmp-create-v3-user command. # service snmpd stop There […]
CentOS / RHEL : How to restrict SSH login by time of day
Question: How to enforce a policy that allows new ssh logins at perticular time of the day only. Outside these access windows no new ssh logins are to be permitted. Solution : PAM Resource Description Login times can be controlled using the Linux Plugin Authentication Method (PAM) pam_time.so module. The pam_time.so module enforces the login […]
How To Check World Wide Port Names (WWPN) of Tape Drives Attached to Linux host
Use the command ‘cat /proc/scsi/scsi‘ to check attached scsi devices. Below example shows IBM Ultrium generation 6 (LTO-6) Tape Drives attached to this Linux system. # cat /proc/scsi/scsi Attached devices: Host: scsi10 Channel: 00 Id: 00 Lun: 00 Vendor: IBM Model: ULT3580-TD6 Rev: F9A0 Type: Sequential-Access ANSI SCSI revision: 06 Host: scsi3 Channel: 00 Id: […]
CentOS / RHEL LVM : Backing Up Volume Group Metadata
– LVM metadata contains configuration details of volume groups. – Metadata backups and archives are automatically created on every volume group and logical volume configuration change. – Backups are stored in /etc/lvm/backup. – Archives are stored in /etc/lvm/archive. – Configuration settings are stored in /etc/lvm/lvm.conf. – You can also use lvm dumpconfig command to display […]
CentOS / RHEL : How to create a Thinly Provisioned Logical Volume
LVM thin provisioning allows you to over-commit the physical storage. You can create file systems which are larger than the available physical storage. LVM thin provisioning allows you to create virtual disks inside a thin pool. The size of the virtual disk can be greater than the available space in the thin pool. It is […]
How to create snapshot of LVM thin volumes using snapper command
Snapper is a command-line utility in Linux used to create and manage snapshots of LVM thin volumes. It can create, delete, and compare snapshots and revert changes done between snapshots. Snapper also allows for the easy creation and management of snapshots for Btrfs. Installing snapper Use the yum command to install the snapper software package. […]