Multi-Disk Volumes
Chapter 7

RAID

Redundant Arrays of Inexpensive Disks

Disk Spanning

Large Volumes from many smaller hard drives

Raid Level 0
Performance Enhancement

Raid Level 0

Disk 1

Disk 2

B0

B1

B2

B3

B4

B5

Raid	Block	Disk	Block

0	1	0

1	2	0

2	1	1

3	2	1

4	1	2

5	2	2

Block size often = 64k bytes

Raid Level 0
Performance Enhancement

Raid Level 0

Disk 1

Disk 2

B0

B1

B3

B4

B6

B7

Raid	Block	Disk	Block

0	1	0

1	2	0

2	3	0

3	1	1

4	2	1

5	3	1

Block size often = 64k bytes

Disk 3

B2

B5

B8

Raid Level 1
Data Redundancy

Raid Level 1

Disk 1

Disk 2

B0

B0

B1

B1

B2

B2

Raid	Block	Disk	Block

0	1	0

2	0

1	1	1

2	1

2	1	2

2	2

Block size often = 64k bytes

Raid Level 3
Error Detection

Raid Level 3

Disk 1

Disk 2

B0

B1

B2

B3

B4

B5

Raid	Block	Disk	Block

0	1	0

0 ed/ec	3	0

1	2	0

1 ec/ed	3	1

2	1	1

2 ec/ed	3	2

3	2	1

3 ec/ed	3	3

4	1	2

4 ec/ed	3	4

5	2	2

Block size often = 1 byte

P4

P5

Disk 3

P2

P3

P0

P1

P0 is the parity of the

B-stripe of the array.

Raid Level 4
Error Detection

Raid Level 4

Disk 1

Disk 2

B0

B1

B2

B3

B4

B5

Raid	Block	Disk	Block

0	1	0

0 ed/ec	3	0

1	2	0

1 ec/ed	3	1

2	1	1

2 ec/ed	3	2

3	2	1

3 ec/ed	3	3

4	1	2

4 ec/ed	3	4

5	2	2

Block size often = 64k bytes

Bottleneck in Parity disk. Every

write requires a write to disk 3,

not taking advantage of device

buffering.

P4

P5

Disk 3

P2

P3

P0

P1

Raid Level 5
Distributed Error Detection

Raid Level 5

Disk 1

Disk 2

B0

B1

B2

P1

P2

B4

Raid	Block	Disk	Block

0	1	0

1	2	0

0 ec/ed	3	0

2	1	1

1 ec/ed	2	2

3	3	1

2 ec/ed	1	3

4	1	2

5	2	2

Block size often = 64k bytes

Disk 3

P0

B3

B5

P0 = B0  B1

Note:

P0  B1 = B0

P0  B0 = B1

Hardware RAID Systems

Operating

System

Hardware

RAID Controller

Disk

Disk

Disk

RAID Volume

Hardware RAID
Acquisition

For analysis acquire the entire RAID volume as though it were a single disk.

Boot suspect system with a Linux bootable CD with the correct driver.

dd the whole thing. Requires a LARGE acq.drive.

Acquire complete

contents of each device separately.

dd the each device.

Captures the unused sectors of each device.

Software RAID Systems

Operating

System

RAID Software

Disk

Disk

Disk

RAID Volume

Windows

Logical Disk Manager (LDM)

Linux

Multiple Device (MD)

/etc/raidtab

SW RAID Volume config file

# cat /etc/raidtab

raiddev	/dev/md0

raid-level	0

nr-raid-disks	2

nr-spare-disks	0

persistent-superblock	0

chunk-size	64k

device	/dev/hdb1

raid-disk	0

device	/dev/hdd1

raid-disk	1

Disk Spanning

Creates large storage systems from multiple devices

Offers no redundancy or performance benefits

Can add disks to dynamically increase size

Nomenclature

Logical volume – output of the disk-spanning software

Disk groups – groups of physical disks

Only disks in the same group can be combined to make a logical volume

Disk Spanning Systems

Disk

Group 1

Physical

Disk 1

Logical

Volume 1

Logical

Volume 2

Physical

Disk 1

Physical

Disk 1

Linux MD

No disk groups, i.e. just one disk group

/etc/raidtab

raid-level	linear

Acquire as a logical volume using /etc/raidtab

Acquire each individual physical device completely

Linux LVM
Logical Volme Manager

Uses Volume Groups

Partition type 0x8e

Each volume group has a subdirectory in /dev/

The volume group is divided into equal sized physical extents which are mapped to logical extents

Logical volume consists of logical extents

Linux LVM
Logical Volme Manager

/etc/lvmtab	file describing lvm parameters

/etc/lvmtab.d/	directory of config files for devices

These config files are managed with

vgimport

Makes exported volume groups known to the system

vgexport

Makes volume groups unknown to the system

vgscan

Scans all disks for volume groups and rebuilds caches

vgchange

Changes attributes of a volume group

2002-12-30T17:02:03