29
Configuring Disk Devices

Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Embed Size (px)

Citation preview

Page 1: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

Page 2: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk DevicesModule 4 – Configuring Disk Devices

♦ OverviewThis 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

Page 3: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

♦ IntroductionPartitioning 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

Lesson 1 – Partitioning using fdisk

Page 4: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk DevicesTopic 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

Page 5: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

♦ list of the fdisk commands

List of fdisk commands

Page 6: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

♦ Creating partition can be started by running the command n.

Creating Partition

Page 7: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk DevicesCreating Partition

♦ After running partprobe, run fdisk -1 to check the partitions.

Page 8: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

♦ Running t command will give the range of partition numbers and type whichever partition has to be changed.

Hex code (type L to list codes)

Page 9: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk DevicesHardware 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

Page 10: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

♦ IntroductionRAID, 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

Lesson 2 – Implementing RAID

Page 11: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk DevicesTopic 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.

Page 12: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk DevicesTopic 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

Page 13: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk DevicesTopic 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…

Page 14: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

Contd…

Topic 3 – Implementing RAID

Page 15: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

Contd…

Topic 3 – Implementing RAID

Page 16: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk DevicesTopic 3 – Implementing RAID

Contd…

Page 17: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

Contd…

Topic 3 – Implementing RAID

Page 18: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

Contd…

Topic 3 – Implementing RAID

Page 19: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

Contd…

Topic 3 – Implementing RAID

Page 20: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

Contd…

Topic 3 – Implementing RAID

Page 21: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk DevicesCorrupting one of the partitions in the RAID

device

Page 22: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk DevicesAdding the partition to the RAID array

Page 23: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk DevicesLab 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

Page 24: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

♦ IntroductionLinux 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

Lesson 3 – LVM for Linux

Page 25: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk DevicesTopic 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)

Page 26: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

♦ 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

Topic 2 – Implementing LVM

Page 27: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

♦ 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.

Topic 3 – Advanced concepts of LVM

Page 28: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk DevicesLab 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

Page 29: Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical

Configuring Disk Devices

♦ 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

Conclusion