RAID, Record Representation




CS157b

Chris Pollett

Jan 31, 2018

Outline

Stable Storage

Implementing Stable Storage

Failure Model for Disks

Mirroring as a Redundancy Technique

In-Class Exercise

Suppose rather than have a single redundant disk we had two redundant disks (common in settings like Hadoop). What would be the mean time to data loss?

Work out your answer. If you haven't already signed up for an account, sign up for an account on the discussion board (you need to create an account on https://www.yioop.com/, them add the discussion group).

Post your solutions to the Jan 31 In-Class Exercise Thread.

Parity Blocks

RAID 4 and Failures

RAID 5

RAID 6

Representing Data in Secondary Storage

How do we store relations and objects to disk?

Example

Consider trying to implement a record format for the table created by the following SQL statement:

CREATE TABLE MovieStar(
   name CHAR(30) PRIMARY KEY, 
   address VARCHAR(255),
   gender CHAR(1),
   birthdate DATE
);

Representing Data Elements I

We now discuss how to represent various kinds of data elements:

Representing Data Elements II

Representing Data Elements III

Representing Data Elements IV

Fixed-Length Records

Record Headers

Sometimes need to store addition info besides the value of each field. This data could be things like:

  1. The record schema or a pointer to it.
  2. The length of the record
  3. Timestamp indicating when the data was last modified or read.

Schema Info

MovieStar Record Layout Example

Record:schema reflengthtimestampnameaddressgenderbirthdate
Byte positions:0481244300304316

Packing Fixed-Length Records into Blocks