Configuring Disk Devices

advertisement
Configuring Disk Devices
Configuring Disk Devices
Module 4 – Configuring Disk Devices
♦ Overview
This module deals with making partitions using fdisk, implementing RAID
and Logical Volume Management. RAID is implemented in Linux systems
to provide data redundancy. Logical Volume Management for making the
file system management easy
♦ Lessons in this module
► Partitioning Using fdisk
► Implementing RAID
► LVM for Linux
Configuring Disk Devices
Lesson 1 – Partitioning using fdisk
♦ Introduction
Partitioning is done using several utilities. One such utility is fdisk used for
performing disk partitions. It is a tool that permits modifying the partitions
already made on a hard drive. fdisk is the conventional tool for managing
partitions.
♦ Topics Covered in this Lesson
► Partition a disk by using fdisk
Configuring Disk Devices
Topic 1 – Partition a disk using fdisk
♦ fdisk is the utility used to partition a hard disk.
♦ While partitioning a disk, if fdisk is chosen; the next screen will prompt
you to select a drive to partition using fdisk
Configuring Disk Devices
List of fdisk commands
♦ list of the fdisk commands
Configuring Disk Devices
Creating Partition
♦ Creating partition can be started by running the command n.
Configuring Disk Devices
Creating Partition
♦ After running partprobe, run fdisk -1 to check the partitions.
Configuring Disk Devices
Hex code (type L to list codes)
♦ Running t command will give the range of partition numbers and type
whichever partition has to be changed.
Configuring Disk Devices
Hardware Browser
♦ The details of the partitions are done using the hardware browser.
Hardware browser can be seen by typing hwbrowser at a shell prompt.
♦ Otherwise click on Main Menu =>System Tools => Hardware
Browser
Configuring Disk Devices
Lesson 2 – Implementing RAID
♦ Introduction
RAID, an acronym for Redundant Array of Independent Disks or
Redundant Array of Inexpensive Disks is a method of combining several
physical disks to make a virtual disk. It is implemented in the system to
increase performance, speed and increase the size and to provide data
redundancy.
♦ Topics Covered in this Lesson
► What is RAID?
► Various RAID levels
► Implementation of RAID
Configuring Disk Devices
Topic 1 - What is RAID?
♦ RAID is an acronym for Redundant Array of Inexpensive Disks or
Redundant Array of Independent Disks.
♦ It is called an array of independent disks because even if one disk gets
damaged the data can be retrieved from other
♦ The function of the other disks does not get affected.
♦ It is a method of creating one virtual disk by putting together several
physical disks.
Configuring Disk Devices
Topic 2 - Various Levels of RAID
♦ There are various levels of RAID as listed below
► RAID Level 0
► RAID Level 1
► RAID Level 2
► RAID Level 3
► RAID Level 4
► RAID Level 5
► RAID Level 6
► RAID Level 7
► RAID Level 0+1
► RAID Level 1+0
Configuring Disk Devices
Topic 3 – Implementing RAID
♦ The RAID virtual device should be created using the command mkraid
in Enterprise Linux 3 and mdadm in Enterprise Linux 4
♦ For example, consider Implementing RAID level 5
Contd
…
Configuring Disk Devices
Topic 3 – Implementing RAID
Contd
…
Configuring Disk Devices
Topic 3 – Implementing RAID
Contd
…
Configuring Disk Devices
Topic 3 – Implementing RAID
Contd
…
Configuring Disk Devices
Topic 3 – Implementing RAID
Contd
…
Configuring Disk Devices
Topic 3 – Implementing RAID
Contd
…
Configuring Disk Devices
Topic 3 – Implementing RAID
Contd
…
Configuring Disk Devices
Topic 3 – Implementing RAID
Contd
…
Configuring Disk Devices
Corrupting one of the partitions in the RAID device
Configuring Disk Devices
Adding the partition to the RAID array
Configuring Disk Devices
Lab Exercise
♦ Exercise Software RAID
♦ Configure the lab by performing the following instructions:
► Create three partitions 100M each and partition type (0*fd)
► Create a software raid with the help of these partitions
► Create one directory test0 and mount your raid partition under
this
directory
► Give entry in fstab file so that your RAID partition gets mounted at the
boot time
► Try to remove one of the three partitions and then add new partition to it
Configuring Disk Devices
Lesson 3 – LVM for Linux
♦ Introduction
Linux has support for Logical Volumes that makes the file system
management easy. The Linux Logical Volume Management will introduce
an abstraction layer between the physical disk and the file system.
♦ Topics covered in this lesson
► Logical Volume Management or LVM
► Implementing LVM
► Advanced Concepts of LVM
Configuring Disk Devices
Topic 1 - Logic Volume Management or LVM
♦ LVM stands for logical volume management and is a hard disk drive
partitioning scheme
♦ There are two version of LVM for Linux and they are, LVM1 and
LVM2
♦ The following terms are associated with LVM
► Physical Volume (PV)
► Physical Extent (PE)
► Logical Extent (LE)
► Logical Volume (LV)
► Volume Group (VG)
Configuring Disk Devices
Topic 2 – Implementing LVM
♦ The steps that have to be performed for implementing LVM are as
given below:
►
►
►
►
Initializing disks or disk partitions
Creating a volume group
Creating a logical volume
Extending a logical volume
Configuring Disk Devices
Topic 3 – Advanced concepts of LVM
♦ LVM has built-in support for striping and mirroring and can be used
with hardware or software RAID to offer configurable, fast and reliable
disk storage
♦ LVM Snapshots
► The built-in support for mirroring also offers the concept of snapshots.
► Snapshots of immediate mirrors of logical volume are taken onto free
space within the volume group.
Configuring Disk Devices
Lab Exercise
♦ Exercise Creating Logical Volume Manager
♦ Create LVM by performing the following instructions:
► Create three partitions, each with 100M size and partition type (0*8e)
► Create a volume group name IIHT
► Create logical volume space 40M name data
► Extend your logical volume up to 60M
► Extend your volume group up to next partition
► Remove your LVM configuration
Configuring Disk Devices
Conclusion
♦ Summary
►
fdisk is a utility to create partitions. Using fdisk, it is possible to create a
partition and also delete a partition
►
RAID is implemented to copy data and spread blocks of a file across
several disk drives.
►
LVM provides support to manage file system easily.
♦ Question and Answer Session
Download