Configuring LVM in redhat

For LVM Configuration need to follw the below steps.

1. Partition creation
2. Physical volume creation
3. Volume group creation
4. Logical volume creation

Here i’m using /dev/sda and /dev/sdb hard disks

Size:

/dev/sda – 500GB
/dev/sdb – 500GB

I already shared the steps to create partitions in previous post.

Click here to create new partition/filesystem in a physical disk.

Using fdisk we have to change the partition type by changing the ID.

For that we should use “t” option to change the partition type. Once we executed this, it will ask for
the Hex code of partition type. Here we need to mention “8e” as Hex code for LVM partition type.

Note: change the partition type for all HDD/ Partitions which we are going to configure LVM.

Than follow the below steps for LVM configuration.

Next we have to create physical volumes using below mentioned commands.

#pvcreate /dev/sda1 /dev/sdb1


#vgcreate -s 16M newvg /dev/sda1 /dev/sdb1

“newvg” is new volume group name and /dev/sda1, /dev/sdb1 will be added in this volume group.
Now this two hard disks will act as a single hard disk and the new size of hard disk is 1000GB.

Next we have to create logical volumes over the volume group, which is like a partitioning here.

#lvcreate -n lv1 -L 200G newvg

-n:  This option is to mention the new logical volume group.
lv1: new logical volume group name.
-L:  this option is to mention the size of new logical volume.

Now we have created logical volume and we should format and mount the lv.

#mkfs.xfs /dev/newvg/lv1

directory is required to mount the lv.

#mkdir /data

#mount /dev/newvg/lv1 /data


Now we successfully configured LVM. Follow the lvcreate steps to create more lv’s.



Linux kernel update



Note: Here kernel is already upgraded one. So, we can’t show different here

Using “uname -r” command will check current kernel version.

#uname -r

To update the kernel use the below command.

#yum install kernel*



Again use the uname -r command to check whether the kernel has been updated or not.

Will undo the upgrade or installation using yum. For that have to check the current activity of yum using “yum history list”

We can use the ID to undo the upgrade/ installed packages.

Now am going to use ID 8 do undo the kernel upgrade

#yum history undo 8




Now use the “yum history list” command to check

Again will check whether the kernel upgrade has been removed or not.

Will use same yum option to upgrade/ undo any packages in Linux.

RHEL7 – New features

Docker    – Popular application-virtualization technology
Systemd  – Systemd was developed to replace the init system. more efficient loading of                       services during the boot process.
XFS         – it’ll support file systems of up to 500TB in size
Microsoft compatible identity management  – it’ll support file systems of up to 500TB in size
Performance co pilot – Performance tuning