Linux Software RAID & LVM Patrick Ladd pladd@optonline.net 5/2/2007.

Slides:



Advertisements
Similar presentations
Storage Management Lecture 7.
Advertisements

Working with Disks and Devices
System Administration Storage Systems. Agenda Storage Devices Partitioning LVM File Systems.
Hands-on RAID on Moxa Computer Prepared by: (40min) Date: mm-dd-yyyy.
File Systems and Disk Management
Linux Installation LINUX INSTALLATION. Download LINUX Linux Installation To install Red Hat, you will need to download the ISO images (CD Images) of the.
RAID- Redundant Array of Inexpensive Drives. Purpose Provide faster data access and larger storage Provide data redundancy.
Solaris Volume Manager M. Desouky. RAID Overview SDS Software SDS Installation SDS User Interfaces MD State Database Concats & Stripes Mirrors Hot Spares.
Allocation Methods - Contiguous
L V M A Logical Volume Manager for Linux by Heinz Mauelshagen Sistina, Inc.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Session 3 Windows Platform Dina Alkhoudari. Learning Objectives Understanding Server Storage Technologies Direct Attached Storage DAS Network-Attached.
By : Nabeel Ahmed Superior University Grw Campus.
Storage System: RAID Questions answered in this lecture: What is RAID? How does one trade-off between: performance, capacity, and reliability? What is.
Simplify your Job – Automatic Storage Management Angelo Session id:
File System. NET+OS 6 File System Architecture Design Goals File System Layer Design Storage Services Layer Design RAM Services Layer Design Flash Services.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Storage and NT File System INFO333 – Lecture Mariusz Nowostawski Noria Foukia.
GeoVision Solutions Storage Management & Backup. ๏ RAID - Redundant Array of Independent (or Inexpensive) Disks ๏ Combines multiple disk drives into a.
Disk Access. DISK STRUCTURE Sector: Smallest unit of data transfer from/to disk; 512B 2/4/8 adjacent sectors transferred together: Blocks Read/write heads.
Chapter 2 Installation Overview. Planning the Installation Questions: –Size of partitions –Where to put partitions –Which software packages to install.
Module 9: Configuring Storage
Chapter 2 BAI517 Chris Redford.  Different version of Linux are called Distributions or Distros. Each one has its strengths and focus: Red Hat / Fedora.
Chapter 3 Managing Disk and File Systems. File Storage Basics Windows XP supports two types of storage Basic Dynamic Basic storage system Centers on partitioning.
MCTS Guide to Microsoft Windows Vista Chapter 4 Managing Disks.
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
Managing Disks and Drives Chapter 13 powered by dj.
Multiboot System under Windows XP – Ubuntu – Windows 7 Qiong LIN - 28 April 2012.
Module 2 Configuring Disks and Device Drivers. Module Overview Partitioning Disks in Windows® 7 Managing Disk Volumes Maintaining Disks in Windows 7 Installing.
Chapter 1 Managing Storage. Contents Understanding Partitioning Understanding LVM Understanding RAID Understanding Clustering and GFS Using Access Control.
Multi-level Raid Multi-level Raid 2 Agenda Background -Definitions -What is it? -Why would anyone want it? Design Issues -Configuration and.
Windows Server 2003 硬碟管理與磁碟機陣列 林寶森
Configuring Disk Devices. Module 4 – Configuring Disk Devices ♦ Overview This module deals with making partitions using fdisk, implementing RAID and Logical.
"1"1 Introduction to Managing Data " Describe problems associated with managing large numbers of disks " List requirements for easily managing large amounts.
Windows Vista Inside Out Chapter 28 - Chapter 28 - Managing Disks and Drives Last modified
Davie 5/18/2010.  Thursday, May 20 5:30pm  Ursa Minor  Co-sponsored with CSS  Guest Speakers  Dr. Craig Rich – TBA  James Schneider – Cal Poly.
Microsoft Windows XP Professional MCSE Exam
Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced.
WINDOWS SERVER 2003 Genetic Computer School Lesson 12 Fault Tolerance.
Chapter 2 BAI517 Chris Redford.  Different version of Linux are called Distributions or Distros. Each one has its strengths and focus: Red Hat / Fedora.
Adding a Hard Drive. BIOS / UEFI The Unified Extensible Firmware Interface (UEFI) defines a software interface between an operating system and platform.
Department of Computer Sciences, University of Wisconsin Madison DADA – Dynamic Allocation of Disk Area Jayaram Bobba Vivek Shrivastava.
IBM eServer xSeries Technical Conference © IBM Corporation Session ID: O24 Steve Dobbelstein Lake Buena Vista, FL September 8-12, 2003 Enterprise.
Hands-On Microsoft Windows Server 2008 Chapter 7 Configuring and Managing Data Storage.
ITMT Windows 7 Configuration Chapter 4 – Working with Disks and Devices ITMT 1371 – Windows 7 Configuration 1.
File systems – Unix based Mostly…. Before We Start… What can you conclude from this (recent) lab output? run: Loop iteration number 0 Trying to lock lockA.
DIT314 ~ Client Operating System & Administration CHAPTER 7 MANAGING DISKS AND FILE SYSTEM Prepared By : Suraya Alias.
NovaLug May 2008NovaLug May 2008 For NovaLug An LVM Introduction THE MAGIC OF LVMTHE MAGIC OF LVM.
Device Mapper tools: RAID, Logical Volume Manager, and LUKS encryption Alan Porter Triangle Linux Users Group.
Lesson 9: SOFTWARE ICT Fundamentals 2nd Semester SY
Storage HDD, SSD and RAID.
Answer to Summary Questions
L V M A Logical Volume Manager for Linux by Heinz Mauelshagen
Chapter 11: File System Implementation
Installing OS.
Chapter 12: File System Implementation
CSE451 I/O Systems and the Full I/O Path Autumn 2002
Introduction To Computers
DADA – Dynamic Allocation of Disk Area
Operating System Module 1: Linux Installation
Linux+ Guide to Linux Certification, Third Edition
OPS235: Week 5 Lab4: Investigations 1 – 3
Btrfs Filesystem Chris Mason.
CSE 451: Operating Systems Winter 2009 Module 13 Redundant Arrays of Inexpensive Disks (RAID) and OS structure Mark Zbikowski Gary Kimura 1.
Mark Zbikowski and Gary Kimura
CSE 451: Operating Systems Winter 2012 Redundant Arrays of Inexpensive Disks (RAID) and OS structure Mark Zbikowski Gary Kimura 1.
Hard Drives & RAID PM Video 10:28
Storage Management Lecture 7.
Department of Computer Science
CIS MS Windows Operating System
Presentation transcript:

Linux Software RAID & LVM Patrick Ladd pladd@optonline.net 5/2/2007

Terminology : RAID RAID: Redundant Array of Inexpensive Disks Combine 2 or more smaller disks into one larger disk Why? Redundancy Reduce or eliminate exposure to disk failure Performance More data under the drive heads Ease of management Single disk simplifies file system layout Capacity: n: Number of disks s: Size of disks

Software RAID vs Hardware RAID Implemented at kernel level in OS Pros: More flexible Hardware independence Cheap Cons: Requires properly configured kernel Uses system resources Hardware RAID Built into card or motherboard Pros: Faster Battery backed option Cons: Hardware dependency Drivers? Expensive

RAID 0: Striping Not really RAID No redundancy Performance: Best Capacity: Best (n x s) Reliability: Worst

RAID 1: Mirroring Fastest Least efficient disk usage Disks added in pairs Performance: Best Capacity: Worst (n x s) / 2 Reliability: Best

RAID 5: Striping with Distributed Parity Efficient space usage Good balance of features Requires n >= 3 Performance: Good Capacity: Good (n-1) x s Reliability: Good

Layered RAID RAID 51 RAID 10 RAID 01 RAID made up of RAID disks Examples: RAID 01 / 0+1 – RAID 1 of RAID 0's RAID 10 – RAID 0 of RAID 1's RAID 05 – RAID 0 of RAID 5's RAID 50 – RAID 5 of RAID 0's RAID 51 – RAID 5 of RAID 1's Combine benefits of multiple RAID setups Hopefully to offset the drawbacks Tends to be storage inefficient RAID 10 RAID 01

LVM – What & Why LVM: Logical Volume Manager Abstract the interface to storage devices Separate physical layer from file system layers Why? Ease of Management Flexible partitioning Human readable disk names Data migration flexibility Snapshots Alternate way to do RAID 0 (Striping)

LVM Objects Physical Volume (PV) Represents physical hard drive partition Broken up into Physical Extents (PE) Logical Volume (LV) Virtual “partition” for O/S Broken up into Logical Extents (LE) Volume Group (VG) Collection of PVs and LVs Maps LEs to PEs

LVM Architecture OS LV LV LV LV LV VG VG PV PV PV PV PV Hard Drive

LVM Metadata UUID - Unique identifier stored in every VG, LV, PV Header contained at start of every PV UUIDs of all other PVs UUIDs of all LVs Allocation map of PE-->LE

Mapping Modes Linear: Data from LV laid out sequentially in PVs Striped: Data laid out alternately among 2 or more PVs Possibly some performance improvement if PVs are on separate physical hardware Concatenation: LVM2 allows extending LVs using one of the above two mapping modes with more data in another layout

Ubuntu Install Has LVM / RAID support Must be done from alternate ISO image (i.e. ubuntu-6.10-alternate-i386.iso) Must be done in text mode

Fedora Core 6 Install LVM / RAID support Includes Anaconda graphical installer support

LVM Common Commands Display object information - [pv|vg|lv]display Create object - [pv|vg|lv]create Delete object – [pv|vg|lv]remove Change object – [pv|vg|lv]change Display metadata– [pv|vg|lv]s Rename – [vg|lv]rename

pvdisplay Output [root@laptop ~]# pvdisplay --- Physical volume --- PV Name /dev/hda3 VG Name MainVG PV Size 7.79 GB / not usable 9.59 MB Allocatable yes (but full) PE Size (KByte) 32768 Total PE 249 Free PE 0 Allocated PE 249 PV UUID XH408a-y8Pz-RoHs-rEOD-RZcW-AFwB-vytZ5I

vgdisplay Output [root@laptop ~]# vgdisplay --- Volume group --- VG Name MainVG System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 8 VG Access read/write VG Status resizable MAX LV 0 Cur LV 3 Open LV 3 Max PV 0 Cur PV 1 Act PV 1 VG Size 7.78 GB PE Size 32.00 MB Total PE 249 Alloc PE / Size 249 / 7.78 GB Free PE / Size 0 / 0 VG UUID JYEdd7-mKC2-qAqS-1jsP-EWD4-UGVC-ZGn07n

lvdisplay Output [root@laptop ~]# lvdisplay --- Logical volume --- LV Name /dev/MainVG/RootLV VG Name MainVG LV UUID DgwUgn-wb2F-K9Kn-PKcj-Ra0p-CwoO-FHpH44 LV Write Access read/write LV Status available # open 1 LV Size 6.56 GB Current LE 210 Segments 3 Allocation inherit Read ahead sectors 0 Block device 253:0

Resizing a Partition Pre LVM2 – e2fsadm Nice tool to automatically take filesystem offline, resize logical volume, then resize filesystem, put volume back online Now - has to be done manually umount /tmp lvresize +10M /dev/MainVG/TmpLV ext2resize /tmp mount /tmp

Adding a drive Give drive a partition table Safer – prevents other OS that don't recognize LVM from doing strange things to it Setup PV on partition (pvcreate) Add PV to VG (vgextend)

Converting to LVM Add 2nd Drive Set up LVM on it Mount it Copy contents of existing drive to LVM Boot to new LVM image Ensure things work Add old drive as LVM physical volume Extend LVM onto old drive

Snapshots Create an exact copy of a LV Can be read-only or read-write (default) Caution: copy on write means that snapshot must be large enough to handle writes lvcreate -L 500M -s -n BackupLV /dev/MainVG/TmpLV

Uses for Snapshots Read only Good for backups Make sure applications / file system are consistent Force write of data to disk sync file system Read/Write Speculative experiments Try something out, if it doesn't work, remove snapshot and try again Virtual Machine images?

Sources Packages Needed RAID Support in kernel mdadm LVM - Current incarnation is LVM2 http://sources.redhat.com/lvm2/ Device mapper in kernel (most kernels built in) Device mapper in user space (device-mapper) Device mapper support library (libdevmapper) LVM Tools (lvm2) HOWTOs

EVMS EVMS – Enterprise Volume Management System http://evms.sourceforge.net/ Competitor to LVM Integrated support for RAID 0,1,4,5 Handles LVM & LVM2 volumes Better user-space tools LVM has better internals Not included in most pre-built kernels Has a nice GUI – works with LVM

EVMS GUI

EVMS Text GUI