Exercise 2 : checksums, RAID and erasure coding



Similar documents
Filing Systems. Filing Systems

RAID. Tiffany Yu-Han Chen. # The performance of different RAID levels # read/write/reliability (fault-tolerant)/overhead

CS161: Operating Systems

Raid storage. Raid 0: Striping. Raid 1: Mirrored

System Administration. Backups

Definition of RAID Levels

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters

Reliability and Fault Tolerance in Storage

Summer Student Project Report

Database Management Systems

CSE-E5430 Scalable Cloud Computing P Lecture 5

PIONEER RESEARCH & DEVELOPMENT GROUP

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

File System Reliability (part 2)

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

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

RAID Performance Analysis

Lecture 36: Chapter 6

Alternatives to Big Backup

Checksumming RAID. Brian Kroth Suli Yang Abstract. 1 Introduction. 2 Background. 2.

Lecture 18: Reliable Storage

File System Design and Implementation

Operating Systems. RAID Redundant Array of Independent Disks. Submitted by Ankur Niyogi 2003EE20367

VERY IMPORTANT NOTE! - RAID

RAID. Storage-centric computing, cloud computing. Benefits:

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

CS 153 Design of Operating Systems Spring 2015

NSS Volume Data Recovery

AFS Usage and Backups using TiBS at Fermilab. Presented by Kevin Hill

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

How To Write A Disk Array

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer.

How To Create A Multi Disk Raid

Cloud Storage. Parallels. Performance Benchmark Results. White Paper.

RAID Overview

Storing Data: Disks and Files

PARALLELS CLOUD STORAGE

OceanStor 9000 InfoProtector Technical White Paper. Issue 01. Date HUAWEI TECHNOLOGIES CO., LTD.

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

Striped Set, Advantages and Disadvantages of Using RAID

Linux Software Raid. Aug Mark A. Davis

How Does the ECASD Network Work?

Price/performance Modern Memory Hierarchy

Guide to SATA Hard Disks Installation and RAID Configuration

Fault Tolerance & Reliability CDA Chapter 3 RAID & Sample Commercial FT Systems

DISTRIBUTED MULTIMEDIA SYSTEMS

Data Corruption In Storage Stack - Review

Dependable Systems. 9. Redundant arrays of. Prof. Dr. Miroslaw Malek. Wintersemester 2004/05

RAID 5 rebuild performance in ProLiant

1 Storage Devices Summary

CS420: Operating Systems

Data Storage - II: Efficient Usage & Errors

ZFS Administration 1

Outline. Database Management and Tuning. Overview. Hardware Tuning. Johann Gamper. Unit 12

What is RAID and how does it work?

Distributed Storage Networks and Computer Forensics

Xanadu 130. Business Class Storage Solution. 8G FC Host Connectivity and 6G SAS Backplane. 2U 12-Bay 3.5 Form Factor

Building Storage Clouds for Online Applications A Case for Optimized Object Storage

Algorithms and Methods for Distributed Storage Networks 5 Raid-6 Encoding Christian Schindelhauer

Data Integrity: Backups and RAID

Hard Disk Drives and RAID

RAID Implementation for StorSimple Storage Management Appliance

System Availability and Data Protection of Infortrend s ESVA Storage Solution


Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 13-1

New Advanced RAID Level for Today's Larger Storage Capacities: Advanced Data Guarding

Chapter 12: Mass-Storage Systems

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

Review. Lecture 21: Reliable, High Performance Storage. Overview. Basic Disk & File System properties CSC 468 / CSC /23/2006

RAID Technology Overview

Guide to SATA Hard Disks Installation and RAID Configuration

CSE 120 Principles of Operating Systems

Physical Data Organization

Storage node capacity in RAID0 is equal to the sum total capacity of all disks in the storage node.

Education. Servicing the IBM ServeRAID-8k Serial- Attached SCSI Controller. Study guide. XW5078 Release 1.00

Using RAID6 for Advanced Data Protection

Chapter 13 Disk Storage, Basic File Structures, and Hashing.

How to choose the right RAID for your Dedicated Server

Sistemas Operativos: Input/Output Disks

The Pros and Cons of Erasure Coding & Replication vs. RAID in Next-Gen Storage Platforms. Abhijith Shenoy Engineer, Hedvig Inc.

RAID by Sight and Sound

USER GUIDE. PageScope Enterprise Suite. Backup and Recovery

Enterprise Backup and Restore technology and solutions

46xx_47xx_1546_1547 RAID Recovery/Set Up Instructions

Distributed File Systems

IncidentMonitor Server Specification Datasheet

Data Protection Technologies: What comes after RAID? Vladimir Sapunenko, INFN-CNAF HEPiX Spring 2012 Workshop

Lecture 23: Multiprocessors

Chapter Introduction. Storage and Other I/O Topics. p. 570( 頁 585) Fig I/O devices can be characterized by. I/O bus connections

HP Smart Array 5i Plus Controller and Battery Backed Write Cache (BBWC) Enabler

your Apple warranty; see There are two main failure modes for a mirrored RAID 1 set:

Transcription:

Exercise 2 : checksums, RAID and erasure coding Sébastien Ponce May 22, 2015 1 Goals of the exercise Play with checksums and compare efficiency and robustness Use hand written version of RAID systems and test error recovery with striping with mirroring with parity Test erasure coding 2 Setup 2.1 Basics open a terminal go to the exercise2 directory cd /data/io/exercise2 2.2 Create data files Use the generatepatternfile.py in the tools directory to create a data file with a readable pattern. python../tools/generatepatternfile.py patternfile check the content of the pattern file : numbers from 0 to 9999 less patternfile Use the generatetemperaturefile.py in the tools directory to create a data file. Use 10000 captors and 100 points for a 40MB file. python../tools/generatetemperaturefile.py 10000 100 datafile Be patient, it should take around 2mn check that the file is in the kernel cache linux-fincore datafile 1

3 Checksums Go to checksum subdirectory cd checksum 3.1 computation speed compute xor32, adler32, md5, sha1 and sha256 checksums for your datafile from memory (as it is in cache)./xor32.py../datafile./adler32.py../datafile./md5.py../datafile./sha1.py../datafile./sha256.py../datafile compare timings except for xor that was implemented in python manually note by the way the difference of speed between non optimized python and optimized compiled code! 3.2 error detection change first byte of the input file (remember previous value! it s 0x10) printf \x00 dd of=../datafile bs=1 count=1 conv=notrunc Recompute all checksums and see the changes in the different algorithms./xor32.py../datafile./adler32.py../datafile./md5.py../datafile./sha1.py../datafile./sha256.py../datafile note that xor changes only by one bit and adler has its lower part almost unchanged (again only by one bit). Note how the other ones are completely different although we changed only one bit of input. put back proper first byte (was 0x10) but exchange the first 4 bytes with the nest 4. Take care that the next 4 are specific to your file! Put the right values in the following code printf \x73\x5d\xfc\x40\x10\x27\x00\x00 \ dd of=../datafile bs=1 count=8 conv=notrunc Recompute all checksums and see the changes in the different algorithms 2

./xor32.py../datafile./adler32.py../datafile./md5.py../datafile./sha1.py../datafile./sha256.py../datafile note in particular that xor does not detect exchanges and that adler32 has same lower part. repair file so that it s readable. Again, put the right bytes for your case! printf \x10\x27\x00\x00\x73\x5d\xfc\x40 \ dd of=../datafile bs=1 count=8 conv=notrunc 4 RAID levels 4.1 Introduction We will play here with fake RAID systems, where disks were replaced by directories. The implementations are done in python and are highly inefficient. The only point of this exercise is to have simple code that you can understand eaasily and demonstrates how RAID technologies work. 4.2 RAID 0 : striping Go to RAID0 subdirectory cd../raid0 create a RAID setup using the createraid0 script. Check its code./createraid0.py 5 store the pattern file into the RAID array using copytoraid0.py. Check its code./copytoraid0.py../patternfile have a look at the content of the striped less Disk0/patternFile.0 less Disk1/patternFile.1 less Disk2/patternFile.2 read back the file using readfromraid0 and check consistency./readfromraid0.py patternfile patternfilecopy 3

4.3 RAID 1 : mirroring Go to RAID1 subdirectory cd../raid1 create a RAID setup using the createraid1 script. Check its code./createraid1.py 3 store a file into the RAID array using copytoraid1.py. Check its code./copytoraid1.py../patternfile check how file was replicated ls -al Disk* read back the file and check consistency. Check the read back code suppress one copy and check you can still read rm Disk0/patternFile corrupt another copy and check you can still read. Note the use of checksums vim Disk1/patternFile ask for a rebuild of the RAID system and check effect../checksum/md5.py Disk1/patternFile../checksum/md5.py Disk2/patternFile./repairFileInRAID1.py patternfile../checksum/md5.py Disk0/patternFile try corrupting a file or its checksum and see that you can read back and repair vim Disk1/patternFile.1../checksum/md5.py patternfile./repairfileinraid1.py patternfile 4

4.4 RAID 5 : parity Go to RAID5 subdirectory cd../raid5 create a RAID setup using the createraid5 script. Check its code./createraid5.py 4 store a file into the RAID array using copytoraid5.py. Check its code./copytoraid5.py../patternfile check how file was split and how parity was added ls -al Disk* less Disk0/patternFile.0 less Disk2/patternFile.2 less Disk3/patternFile.3 read back the file and check consistency. Check the read back code./readfromraid5.py patternfile patternfilecopy check storage overhead ls -l../patternfile du -cb Disk*/pattern* suppress one stripe and check you can still read rm Disk0/patternFile.0./readFromRAID5.py patternfile patternfilecopy ask for a rebuild of the RAID system and check effect./repairfileinraid5.py patternfile corrupt a stripe or its checksum and check you can still read vim Disk1/patternFile.1./readFromRAID5.py patternfile patternfilecopy./repairfileinraid5.py patternfile 5

5 erasure coding We use here an external library to provide erasure coding code. It s called zfec and has a nice and simple python API (see https://pypi.python.org/pypi/zfec and go to Python API ). Go to erasure subdirectory cd../erasure create a erasure coded pool with 3 + 4 disks using the createerasure script. Check its code./createerasure.py 3 4 store a file into the erasure coded pool using copytoerasure.py. Check its code./copytoerasure.py../patternfile check how file was split and how extra chunks were added ls -al Disk* less Disk0/patternFile.0 less Disk2/patternFile.2 less Disk5/patternFile.5 read back the file and check consistency check storage overhead ls -l../patternfile du -cb Disk*/pattern* suppress one stripe and check you can still read rm Disk0/patternFile.0 corrupt another stripe and check you can still read vim Disk1/patternFile.1 go for one more deletion and one more corruption. Check you can still read! vim Disk4/patternFile.4 rm Disk5/patternFile.5 6

ask for a rebuild of the erasure coded pool and check effect./repairfileinerasure.py patternfile have a look at the readfromerasure code and see how all this happens 7