Wednesday, January 21, 2015

LINUX Disk Storage Management & LVM Storage Management

       LINUX Disk Storage Management & LVM Storage Management




                     Disk Storage  Management
                    ------------------------------------------

Physical Disks are represented in LINUX as /dev/sda(SCSI Disks), /dev/hda(IDE Disks).

Suppose there is three SCSI Disks connected to the server . It will appear on server as

1st  Disk --/dev/sda
2nd Disk --/dev/sdb
3rd Disk --/dev/sdc



A valid block device could be one of two types of entries:

    A mapped device — A logical volume in a volume group, for example, /dev/mapper/VolGroup00-LogVol02.

    A static device — A traditional storage volume, for example, /dev/hdbX,/dev/sdaX, where hdb & sda  is a storage device name and X is the partition number. 

What is Partition?

The physical disk can be divided into one or more logical disks . These logical disks are known as partitions.


The idea is that if you have one hard disk, and want to have, say, two operating systems on it, you can divide the disk into two partitions. Each operating system uses its partition as it wishes and doesn't touch the other ones. This way the two operating systems can co-exist peacefully on the same hard disk. Without partitions one would have to buy a hard disk for each operating system.


*On an IDE drive you can have up to 63 partitions, 3 primary and 60 logical ( contained in one extended partition )

*On a SCSI drive the maximum number of partitions is 15.

Ex. -- Suppose you want to  4 partition  on new disk assigned to the server /dev/sdb.

After  partitioning the newly created  logical partitions will appear as.
 /dev/sdb1 ,/dev/sdb2 ,/dev/sdb3 and /dev/sdb4



What is Extended Partition ?


An extended partition is the only kind of partition that can have multiple partitions inside. Think of it like a box that contains other boxes, the logical partitions.

 The extended partition can't store anything, it's just a holder for logical partitions.
The extended partitions is a way to get around the fact you can only have four primary partitions on a drive. You can put lots of logical partitions inside it.
 
 What is Logical Partition?

Logical partitions are partitions that are created by dividing up the extended partition.


                       MBR(Master Boot Record)

The MBR is a small program that is executed when a computer begins to boot up (i.e., start up) in order to find the operating system and load parts of it into memory.

The first sector is the master boot record (MBR) of the disk


 The master boot record contains a small program that ;

1.  Reads the partition table, checks which partition is active (that is, marked bootable),
2. Reads  the first sector of that partition, the partition's boot sector (the MBR is also a boot sector, but it has a special status and therefore a special name). This boot sector contains another small program that reads the first part of the operating system stored on that partition (assuming it is bootable), and then starts it.


Understanding the Partitoning Concept


There are two ways of partitioning the disk :

 1. Standard Partitions using parted
 2. LVM Partition Management


 Standard Partitions using parted

parted utility is used in linux for partitioning the disks having large size greater than 2 TB .

By default, the parted package is included when installing Red Hat Enterprise Linux.

 Using the parted utility , we can perform below tasks.

    a)  View the existing partition table

    b)  Change the size of existing partitions

    c)  Add partitions from free space or additional hard drives 



                          Viewing the Partition Table






            Creating a Partition

 For creating the partition on new disk first we need to label the disk.

From the partition table, determine the start and end points of the new partition and what partition type it should be.







 Removing  a Partition


 Creation of swap Partition using parted

 Creating a LVM Partition using parted


 Creation of boot partition using parted






1 comment:

  1. IBM AIX Admin --- "IBM AIX Admin Online Training
    Send ur Enquiry to contact@21cssindia.com
    Introduction to AIX
    AIX Operating System
    The Shell: User Interface to AIX
    Useful AIX Utilities" more… Online Training- Corporate Training- IT Support U Can Reach Us On +917386622889 - +919000444287 http://www.21cssindia.com/courses/ibm-aix-admin-online-training-94.html

    ReplyDelete