Skip to Content
Managing RAID on Linux
book

Managing RAID on Linux

by Derek Vadala
December 2002
Intermediate to advanced
260 pages
9h 18m
English
O'Reilly Media, Inc.
Content preview from Managing RAID on Linux

/etc/mdadm.conf

Although mdadm does not rely on a configuration file, using one will make array management much easier. /etc/mdadm.conf contains four types of lines that provide information to mdadm. DEVICE lines tell mdadm which block devices are member disks of an array, and ARRAY helps mdadm identify arrays that have already been created. MAILADDR and PROGRAM lines provide information about where to send email alerts and what program to execute when mdadm is monitoring arrays.

DEVICE lines

DEVICE entries have the following format:

DEVICE     device1 device2 ... deviceN

DEVICE lines can contain a complete list of individual block devices or use shell expansions to shorten the list and make managing the configuration file less tedious. In the following example, the first two ATA disks and all SCSI devices are considered potential array components:

DEVICE     /dev/hda /dev/hdb /dev/sd*

The wildcard in the previous example can also be confined to the first partition only:

DEVICE     /dev/sd*1

You might not want to scan every SCSI device, since cycling through SCSI device special files that don’t point to real disks is a waste of time. In the following example, the first two partitions of the first four SCSI disks are considered member disks:

DEVICE     /dev/sd[abcd][12]

You can also specify multiple wildcard entries on a single line. The next example includes the first partition of the first four IDE disks and the first partition of the first eight SCSI disks:

DEVICE     /dev/hd[abcd]1 /dev/sd[a-h]1

Or, give each ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Linux: Powerful Server Administration

Linux: Powerful Server Administration

Uday Sawant, Oliver Pelz, Jonathan Hobson, William Leemans
Hands-On Linux Administration on Azure - Second Edition

Hands-On Linux Administration on Azure - Second Edition

Rithin Skaria, Kamesh Ganesan, Frederik Vos

Publisher Resources

ISBN: 9780596802035Errata Page