Manpages

Manpage of MD

MD

Section: Devices and Network Interfaces (4)
Index
Return to Main Contents
 

NAME

md - Multiple Device driver aka Linux Software Raid  

SYNOPSIS

/dev/mdn
/dev/md/n  

DESCRIPTION

The md driver provides virtual devices that are created from one or more independant underlying devices. This array of devices often contains redundancy, and hence the acronym RAID which stands for a Redundant Array of Independant Devices.

md support RAID levels 1 (mirroring) 4 (striped array with parity device) and 5 (striped array with distributed parity information. If a single underlying device fails while using one of these level, the array will continue to function.

md also supports a number of pseudo RAID (non-redundant) configuations including RAID0 (striped array), LINEAR (catenated array) and MULTIPATH (a set of different interfaces to the same device).

 

MD SUPER BLOCK

With the exception of Legacy Arrays described below, each device that is incorportated into an MD array has a super block written towards the end of the device. This superblock records information about the structure and state of the array so that the array can be reliably re-assembled after a shutdown.

The superblock is 4K long and is written into a 64K aligned block that starts at least 64K and less than 128K from the end of the device (i.e. to get the address of the superblock round the size of the device down to a multiple of 64K and then subtract 64K). The available size of each device is the amount of space before the super block, so between 64K and 128K is lost when a device in incorporated into an MD array.

The superblock contains, among other things:

LEVEL
The manner in which the devices are arranged into the array (linear, raid0, raid1, raid4, raid5, multipath).
UUID
a 128 bit Universally Unique Identifier that identifies the array that this device is part of.

 

LEGACY ARRAYS

Early versions of the md driver only supported Linear and Raid0 configurations and so did not use an MD superblock (as there is not state that needs to be recorded). While it is strongly recommended that all newly created arrays utilise a superblock to help ensure that they are assembled properly, the md driver still supports legacy linear and raid0 md arrays that do not have a superblock.

 

LINEAR

A linear array simply catenates the available space on each drive together to form one large virtual drive.

One advantage of this arrangement over the more common RAID0 arrangement is that the array may be reconfigured at a later time with an extra drive and so the array is made bigger without disturbing the data that is on the array. However this cannot be done on a live array.

 

RAID0

A RAID0 array (which has zero redundancy) is also known as a striped array.  

RAID1

 

RAID4

 

RAID5

 

MUTIPATH

 

REBUILD/RESYNC

 

FILES

/proc/mdstat
Contains information about the status of currently running array.
/proc/sys/dev/raid/speed_limit_min
A readable and writable file that reflects the current goal rebuild speed for times when non-rebuild activity is current on an array. The speed is in Kibibytes per second, and is a per-device rate, not a per-array rate (which means that an array with more disc will shuffle more data for a given speed). The default is 100.

/proc/sys/dev/raid/speed_limit_max
A readable and writable file that reflects the current goal rebuild speed for times when no non-rebuild activity is current on an array. The default is 100,000.

 

SEE ALSO

mdadm(8), mkraid(8).


 

Index

NAME
SYNOPSIS
DESCRIPTION
MD SUPER BLOCK
LEGACY ARRAYS
LINEAR
RAID0
RAID1
RAID4
RAID5
MUTIPATH
REBUILD/RESYNC
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 05:21:59 GMT, March 29, 2024