Search This Blog

Tuesday, April 17, 2012

LVM from scatch



Click on below image for zoom.
 
You can see three main layers in LVM.
1) Physical volume.
2) Volume group.
3) Logical volume.

 1) Physical Volume:
This is the first level in LVM . Here you create physical volume out of actual physical disk/partition.
command used to create a Physical volume is as below.

e.g.
#pvcreate  /dev/sdb

2) Volume group:
This is the second level and assumes that you have already created physical volumes.At this stage you create group of physical volume and name them.


e.g
#vgcreate /dev/sdb vg_group01

3) Logical volume:
This is the last step in LVM creation .Here you specify the Logical volume name , size and volume group name.
e.g.
#lvcreate -n lv_01 -L 200 

Note:-
If you dont specify a unit, megabyte will be used as default.
You can also specify the logical volume size in terms of Logical extents .
To specify volume size in terms of Logical extents you use -l option. 
Specifying a name using -n option is optional .If you dont specify any name for Logical volume ,LVM2 automatically assigns it for you. 
Incase you want to change the name of Logical volume you can do it using 
lvrename oldname newname .



Monday, April 9, 2012

How to install new Kernel?

In this article we are going to upgrade the kernel version.

The main question here is  
"Why do i need to upgrade the kernel?"
Support for new Hardware
Addition of cool features.
Improving the performance
These are few reasons to upgrade the kernel. By reading the change log , you can find the features that are added to new kernel.

I m using Redhat 6 with following kernel.
# uname -r
2.6.32-71.el6.i686

To upgrade the kernel you should download it from Kernel.org.

At the time of writing this article the latest stable version is 3.3.1 .
So i downloaded it (apprx 75 mb).

Disk Partitions ( Primary , Extended and Logical partitions)

To a beginner its always a puzzle to deal with disk partitions.
Most of the guys end up giving total control to Default partition provided in Installation process and don't involve in custom partitioning.

I found most of guys asking below Questions

1) Difference between primary and extended partitions.
2) How many primary partitions can be created on a disk?
3) How many partitions can I create?

More of such questions will be addressed in this article.

If you want to use your harddisk the first thing you do is to partition it.

All OS installation processes involve this task.Each OS offers you with two major choices
either you want to go with default partitioning or specify a custom one .

Most of the time you don't want to bother about what kind of partitioning is used so you leave it default.
But if you are a system administrator and very serious about your profession you may give lot of details to partitioning.