LVM and Raid. Scott Gilliland



Similar documents
Typing some stupidities in text files, databases or whatever, where does it fit? why does it fit there, and how do you access there?

How To Set Up Software Raid In Linux (Amd64)

LVM2 data recovery. Milan Brož LinuxAlt 2009, Brno

Linux Software Raid. Aug Mark A. Davis

Ubuntu bit + 64 bit Server Software RAID Recovery and Troubleshooting.

Striped Set, Advantages and Disadvantages of Using RAID

Intel Rapid Storage Technology enterprise (Intel RSTe) for Linux OS

Unix System Administration

Using the Software RAID Functionality of Linux

RAID. Contents. Definition and Use of the Different RAID Levels. The different RAID levels: Definition Cost / Efficiency Reliability Performance

Shared Storage Setup with System Automation

Installing Debian with SATA based RAID

Veritas Volume Manager Administration on HP-UX Course Summary

RAID Level Descriptions. RAID 0 (Striping)

Intel Rapid Storage Technology (Intel RST) in Linux*

How To Manage Your Volume On Linux (Evms) On A Windows Box (Amd64) On A Raspberry Powerbook (Amd32) On An Ubuntu Box (Aes) On Linux

Setup software RAID1 array on running CentOS 6.3 using mdadm. (Multiple Device Administrator) 1. Gather information about current system.

DELL RAID PRIMER DELL PERC RAID CONTROLLERS. Joe H. Trickey III. Dell Storage RAID Product Marketing. John Seward. Dell Storage RAID Engineering

Support for Storage Volumes Greater than 2TB Using Standard Operating System Functionality

Redundant Array of Inexpensive/Independent Disks. RAID 0 Disk striping (best I/O performance, no redundancy!)

RAID Utility User s Guide Instructions for setting up RAID volumes on a computer with a MacPro RAID Card or Xserve RAID Card.

The Logical Volume Manager (LVM)

RAID HARDWARE. On board SATA RAID controller. RAID drive caddy (hot swappable) SATA RAID controller card. Anne Watson 1

Resilient NAS by Design. Buffalo. A deployment guide to disaster recovery. Page 1

RAID Utility User Guide. Instructions for setting up RAID volumes on a computer with a Mac Pro RAID Card or Xserve RAID Card

LifeKeeper for Linux. Software RAID (md) Recovery Kit v7.2 Administration Guide

10 Red Hat Linux Tips and Tricks

Data storage, backup and restore

Table of Contents. Software-RAID-HOWTO

These application notes are intended to be a guide to implement features or extend the features of the Elastix IP PBX system.

Total Backup Recovery Server for Linux. User s Guide

Cloning Complex Linux Servers

Using Linux mdadm Multipathing with Sun StorEdge Systems

How To Create A Multi Disk Raid

MANAGING DISK STORAGE

Red Hat Enterprise Linux 6 Logical Volume Manager Administration. LVM Administrator Guide

Advanced Linux System Administration on Red Hat

CSE-E5430 Scalable Cloud Computing P Lecture 5

Definition of RAID Levels

ZFS Administration 1

Chapter 12 Network Administration and Support

VERITAS Volume Management Technologies for Windows

What is RAID and how does it work?

Chapter 2 Array Configuration [SATA Setup Utility] This chapter explains array configurations using this array controller.

Logical Volume Management for Linux on System z

Xserve G5 Using the Hardware RAID PCI Card Instructions for using the software provided with the Hardware RAID PCI Card

VERITAS Volume Management Technology for Windows COMPARISON: MICROSOFT LOGICAL DISK MANAGER (LDM) AND VERITAS STORAGE FOUNDATION FOR WINDOWS

RAID Made Easy By Jon L. Jacobi, PCWorld

Overview of I/O Performance and RAID in an RDBMS Environment. By: Edward Whalen Performance Tuning Corporation

Violin: A Framework for Extensible Block-level Storage

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System

Implementing the SUSE Linux Enterprise High Availability Extension on System z

RAID technology and IBM TotalStorage NAS products

Managing Storage Using RAID

An Introduction to RAID. Giovanni Stracquadanio

RAID Overview: Identifying What RAID Levels Best Meet Customer Needs. Diamond Series RAID Storage Array

RAID Technology Overview

LBNC and IBM Corporation Document: LBNC-Install.doc Date: Path: D:\Doc\EPFL\LNBC\LBNC-Install.doc Version: V1.0

Backup to attached Tape Drive using Open-E DSS V6

How To Recover From A Disaster On Linux (Amd64) On A Hard Disk Drive (Amd32) On An Uniden (Amd66) Or A Hard Drive (Oranium) On Your Computer (Orren) On The Same Computer (

How to choose the right RAID for your Dedicated Server

RAID User Guide. Edition. Trademarks V1.0 P/N: C51GME0-00

CS420: Operating Systems

RedHat (RHEL) System Administration Course Summary

Moving Virtual Storage to the Cloud. Guidelines for Hosters Who Want to Enhance Their Cloud Offerings with Cloud Storage

Citrix XenServer-6.2 Administration Training

Guide to SATA Hard Disks Installation and RAID Configuration

How you configure Iscsi target using starwind free Nas software & configure Iscsi initiator on Oracle Linux 6.4

Managing RAID. RAID Options

Intel RAID Software User s Guide:

HP Array Configuration Utility User Guide

Ultimate Guide to Oracle Storage

Intel RAID Software User s Guide:

RAID Rebuilding. Objectives CSC 486/586. Imaging RAIDs. Imaging RAIDs. Imaging RAIDs. Multi-RAID levels??? Video Time

VERY IMPORTANT NOTE! - RAID

Filesystems Performance in GNU/Linux Multi-Disk Data Storage

Chapter 6 External Memory. Dr. Mohamed H. Al-Meer

Getting Started With RAID

PIONEER RESEARCH & DEVELOPMENT GROUP

ENTERPRISE LINUX SYSTEM ADMINISTRATION

Areas Covered. Chapter 1 Features (Overview/Note) Chapter 2 How to Use WebBIOS. Chapter 3 Installing Global Array Manager (GAM)

Storage Fusion Architecture. Multipath (v1.8) User Guide

Comparison: Microsoft Logical Disk Manager (LDM) and VERITAS Volume Manager

RAID Basics Training Guide

technology brief RAID Levels March 1997 Introduction Characteristics of RAID Levels

Extended installation documentation

IBM ^ xseries ServeRAID Technology

INSTALL ZENTYAL SERVER

ucloud server User Guide v3.0 ( )

SSDs and RAID: What s the right strategy. Paul Goodwin VP Product Development Avant Technology

RAID Implementation for StorSimple Storage Management Appliance

IncidentMonitor Server Specification Datasheet

Backup, Booten, RAID, LVM, Virtualization

Introduction. What is RAID? The Array and RAID Controller Concept. Click here to print this article. Re-Printed From SLCentral

Distribution One Server Requirements

ZFS Backup Platform. ZFS Backup Platform. Senior Systems Analyst TalkTalk Group. Robert Milkowski.

Transcription:

LVM and Raid Scott Gilliland

Why aren't flat partitions enough? Redundancy Speed Live changes Multipath I/O Shared partitions

Raid Levels Raid-0: Block-level Striping Raid-1: Mirroring Raid-2: Byte striping Raid-3: Byte striping w/ parity disk Raid-4: Block-level striping with parity disk Raid-5: Block-level striping with distributed parity to cover the loss of any disk Raid-6: Block-level striping with distributed parity to cover the loss of any two disks

Raid Levels Raid-0: Block-level Striping Raid-1: Mirroring Raid-2: Byte striping Raid-3: Byte striping w/ parity disk Raid-4: Block-level striping with parity disk Raid-5: Block-level striping with distributed parity to cover the loss of any disk Raid-6: Block-level striping with distributed parity to cover the loss of any two disks

Raid 0 Reads and writes are split between disks For n disks, rates go up by n Loss of any disk looses all data In theory, you still have n-1/n of your data, but really, you lose your data. Great if you have lots of disks, but don't care about your data

Raid 1 N copies of all data Each write has to update all disks Ow, that's slow! Reads can be spread across all disks Like Raid 0, but without the data loss! Great if you only have two disks, and want redundancy Like if you're building a machine with old drives For more n 3, use Raid 5

Raid 5 Distributes the parity information across all disks Can loose any one disk Reads use n-1/n disks Writes write to all n disks Or worse a read of the whole stripe may be needed Stripe sizes matter Especially for large numbers of small,disparate reads Usually a safe bet for 3 or more disks

Raid 6 Usually defined as being Raid 5, but with twice the parity Can loose up to two disks Preferred over 'hot-spares' If you have an extra disk, you may as well use it How else will you know if your hot spare is bad?

Linux Software Raid Combines multiple block devices into one Disks or partitions Often called the MD system Stands for Multi Disk Modern arrays use a 'Superblock' Contains disk UID and array config Allows for auto-detection Actually at end of disk Configured via mdadm

Linux Software Raid (cont) Status from /proc/mdstat And more modernly /sys/md You can even stack Raid sets Raid 0+1, Raid 0+5 Can be 'reshaped' live Can be set to come up on boot But your bootloader will need a flat disk Or it will need to 'understand' RAID

Typical Raid 1 Two disks, one partition each Partitions mirrored as /dev/md0 Each has a bootloader, set to boot with root=/dev/md0 If boot disk fails, other disk can boot to the degraded array scott@galileo:~$ cat /proc/mdstat Personalities : [raid1] md0 : active raid1 hda1[0] hdc1[1] 78123968 blocks [2/2] [UU] unused devices: <none>

Typical Raid 5 A single or mirrored set of disks to boot A Raid 5 set as root, or as storage The mirrored set often covers all disks, as samesized disks will all have the same extra space Here, the spare space is striped together as /tmp -bash-3.2$ cat /proc/mdstat Personalities : [raid6] [raid5] [raid4] [raid0] md1 : active raid0 sdc1[0] sdd1[1] sde1[2] sdf1[3] 10248192 blocks 256k chunks md0 : active raid5 sdf2[5] sde2[4] sdd2[3] sdc2[2] sdb3[1] sda3[0] 4870987520 blocks level 5, 256k chunk, algorithm 2 [6/6][UUUUUU]

mdadm Seems to be the best way to change an array Create: # mdadm --create /dev/md0 --level=5 --raid-devices=3 \ /dev/sdc1 /dev/sdd1 /dev/sde1 Set as faulty, remove, add: # mdadm --manage /dev/md0 --fail /dev/sdc1 # mdadm --manage /dev/md0 --remove /dev/sdc1 # mdadm --manage /dev/md0 --add /dev/sdc1

LVM (and LVM2) Can be considered an alternative to traditional partitioning Can use any block device: partitions and full disks Allows for rearranging of storage, mirroring, striping, and snapshots With a daemon, can handle shared storage and multipath Ex: two servers with a shared SAN disk between them Does not do Raid 5 or 6. Or Raid 2, Raid 3, or Raid 4.

LVM Basics 3 main types of entities: PV Physical Volume This is a disk you want to store data on. VG Volume Group A pool of PV's on a machine. You usually just want one. LV Logical Volume An exposed block device. May be spanned, striped, mirrored, or a 'snapshot'.

LVM Snapshots Allows you to take a full-disk image at a single point in time Uses Copy-on-write Only needs additional space when the device is written Needs physical space allocated for changes Useful for taking backups that are selfconsistent Make snapshot, backup contents off-disk, erase snapshot

LVM configuration Command-line tools are simplest All the details in LVM(8) System-config-lvm is the Redhat GUI tool Only handles LVM, making MD+LVM configurations difficult EVMS tool has an LVM2 module Not actively maintained? Also has an MD module for software RAID. KVPM is a kde4-based manager Seems kinda beta, but works Can parse MD devices Handles filesystems

Command-line LVM Most of: [pv vg lv][change convert create display extend reduce remove rename resize s scan] lvm> pvs PV VG Fmt Attr PSize PFree /dev/md0 test lvm2 a- 1.91G 1.62G /dev/sdc2 test lvm2 a- 1.44G 974.00M /dev/sde2 test lvm2 a- 1.39G 1.20G lvm> vgs VG #PV #LV #SN Attr VSize VFree test 3 2 0 wz--n- 4.75G 3.77G lvm> lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert mirrored test mwn-a- 300.00M mirrored_mlog 100.00 striped test -wn-a- 400.00M

Command-line LVM PVS, VGS, and LVS can take additional fields scott@bravil:/usr/src/kvpm-0.4.5b$ sudo pvs -o pv_fmt,pv_size,dev_size,pv_free,pv_used,pv_name,pv_attr,pv_pe_count,pv_pe_alloc_count,pv_tags,pvseg_start,pvseg _size,pe_start,lv_name Fmt PSize DevSize PFree Used PV Attr PE Alloc PV Tags Start SSize 1st PE LV lvm2 1.44G 1.44G 724.00M 750.00M /dev/sdc2 a- 737 375 0 100 192.00K striped lvm2 1.44G 1.44G 724.00M 750.00M /dev/sdc2 a- 737 375 100 150 192.00K mirrored lvm2 1.44G 1.44G 724.00M 750.00M /dev/sdc2 a- 737 375 250 125 192.00K striped lvm2 1.44G 1.44G 724.00M 750.00M /dev/sdc2 a- 737 375 375 362 192.00K lvm2 486.00M 486.31M 486.00M 0 /dev/sdd1 a- 243 0 0 243 192.00K lvm2 1.39G 1.40G 978.00M 450.00M /dev/sde2 a- 714 225 0 100 192.00K striped lvm2 1.39G 1.40G 978.00M 450.00M /dev/sde2 a- 714 225 100 1 192.00K lvm2 1.39G 1.40G 978.00M 450.00M /dev/sde2 a- 714 225 101 125 192.00K striped lvm2 1.39G 1.40G 978.00M 450.00M /dev/sde2 a- 714 225 226 488 192.00K sudo lvs -o +segtype,stripes,stripesize,devices,seg_count,copy_percent LV VG Attr LSize Origin Snap% Move Log Copy% Convert Type #Str Stripe Devices #Seg Copy% mirrored test mwn-a- 300.00M mirrored_mlog 31.33 mirror 2 0 mirrored_mimage_0(0),mirrored_mimage_1(0) 1 31.33 striped test -wn-a- 900.00M striped 2 4.00K /dev/sdc2(0),/dev/sde2(0) 2 striped test -wn-a- 900.00M striped 2 4.00K /dev/sdc2(250),/dev/sde2(101) 2

KVPM

System-config-lvm