Clever Geek Handbook
📜 ⬆️ ⬇️

mdadm

mdadm (from the English. multiple devices , previously - mdctl ) is a utility for managing software RAID arrays in Linux .

mdadm (formerly mdctl)
Type ofDisk utility
DeveloperNeil brown
Written on
operating systemLinux
First edition
Latest version3.3.0 (2013-09-03)
LicenseGNU GPL 2 and newer
Siteneil.brown.name/blog/mda ...

In Linux, you can use the following types of RAID:

  • Linear ( JBOD ) - expansion of the size of a logical disk due to several physical disks;
  • RAID0 ( striping ) - distribution of blocks on several physical disks to increase the speeds of writing and reading, but without ensuring fault tolerance;
  • RAID1 ( mirroring ) - mirroring, that is, recording the same data simultaneously on several disks, which provides fault tolerance when any number of disks fail, while at least one efficient one remains;
  • RAID4 is similar to RAID 3, but differs from it in that the data is divided into blocks, not bytes;
  • RAID5 - an array with fault tolerance due to the minimum redundancy (at least three disks are required, for fail safety - four disks);
  • RAID6 - is similar to RAID 5, but has a higher degree of reliability - a 2-disk capacity is allocated for checksums, 2 sums are calculated using different algorithms;
  • Multipath is a software array that allows you to create different pseudo-disk devices for a single physical disk;
  • Faulty is a pseudo-RAID.

Not all types of RAIDs are available in the Linux kernel in the initial configuration. For example, to use RAID5, you need to make changes to the kernel configuration and compile it again. For already compiled kernels from distributions, you may need to explicitly load the corresponding module. Example: modprobe raid5 .

Commands

With mdadm, you can perform the following operations:

  • create - create a RAID array from multiple disks (with a superblock on each device).
  • assemble - the assembly of the (previously created) array and its activation. Disks from which the array is collected can be specified explicitly or their automatic search will be performed. mdadm checks if the components form a valid array.
  • build - merge disks into an array (without superblocks). For such arrays, mdadm does not distinguish between creation and subsequent assembly. It is also impossible to verify whether the required devices were listed in the correct order. Do not use this mode if you do not know why.
  • manage - array management: adding new free spares and removing faulty devices .
  • follow , monitor - monitor one or several md devices and react to changes in their state. This makes sense only for arrays of levels 1, 4, 5, 6 or multipath arrays, since only they can have different states. raid0 or linear can not have missing, spare or failed disks, so there is nothing to follow.
  • grow - expanding or decreasing the size (shrink) of the array, or otherwise reforming it (reshape). Currently, changing the active size of components in RAID arrays of levels 1/4/5/6, as well as changing the number of active devices in RAID1, is supported.

In addition, some other types of operations are available, for example, viewing and modifying the superblocks of an array and stopping active arrays.

Notes

  1. M The mdadm Open Source Project on Open Hub: Languages ​​Page - 2006.
    <a href=" https://wikidata.org/wiki/Track:Q124688 "> </a> <a href=" https://wikidata.org/wiki/Track:P1972 "> </a>

Links

  • Project Blog
  • Files
  • Files on kernel.org
  • Software RAID in Linux (rus.)
  • Gentoo Linux x86 with Software Raid and LVM2 Quick Install Guide (eng.)
  • Neil Botwick. Machines - in RAID! // Linux Format , Russian edition, №84
Source - https://ru.wikipedia.org/w/index.php?title=Mdadm&oldid=98167385


More articles:

  • Klopp, Onno
  • Laure, Marie
  • Maskarosa I d'Armagnac
  • Mamchenko, Victor Andreevich
  • Utegenova, Kamila Dosovna
  • Clos, Antoine-Barthélemy
  • Stavitskaya, Lesya Alekseevna
  • Klupfel, Karl August
  • Novoselki (Pukhovichi district)
  • Billy Talent Discography

All articles

Clever Geek | 2019