Forrest logo
tool overview
On this page you find all important commands for the CLI tool mdadm. If the command you are looking for is missing please ask our AI.

mdadm

mdadm is a command line tool in Linux used for managing software RAID arrays. It stands for "multiple device administrator."

The primary purpose of mdadm is to create, manage, and monitor software RAID arrays, allowing multiple physical disks to be combined and treated as a single logical device.

mdadm supports various RAID levels, including RAID 0, RAID 1, RAID 4, RAID 5, RAID 6, and RAID 10, providing different levels of data redundancy and performance.

Using mdadm, administrators can create and delete RAID arrays, add or remove devices to an existing array, and perform various maintenance tasks such as reshaping, rebuilding, or repairing arrays.

The tool also allows for monitoring the status of RAID arrays, providing information about the health, syncing progress, and event notifications.

mdadm provides a flexible and powerful command line interface, enabling administrators to configure and manage complex RAID setups efficiently.

It is an essential tool for system administrators and users who seek to optimize data redundancy, performance, and fault tolerance through software RAID.

List of commands for mdadm:

  • mdadm:tldr:67758 mdadm: Remove disk.
    $ sudo mdadm --remove ${-dev-md0} ${-dev-sdXN}
    try on your machine
    explain this command
  • mdadm:tldr:69d5a mdadm: Mark disk as failed.
    $ sudo mdadm --fail ${-dev-md0} ${-dev-sdXN}
    try on your machine
    explain this command
  • mdadm:tldr:8cbfd mdadm: Show RAID info.
    $ sudo mdadm --detail ${-dev-md0}
    try on your machine
    explain this command
  • mdadm:tldr:9e182 mdadm: Reset disk by deleting RAID metadata.
    $ sudo mdadm --zero-superblock ${-dev-sdXN}
    try on your machine
    explain this command
  • mdadm:tldr:a534d mdadm: Add disk to array.
    $ sudo mdadm --assemble ${-dev-md0} ${-dev-sdXN}
    try on your machine
    explain this command
  • mdadm:tldr:f8d12 mdadm: Create array.
    $ sudo mdadm --create ${-dev-md-MyRAID} --level ${raid_level} --raid-devices ${number_of_disks} ${-dev-sdXN}
    try on your machine
    explain this command
  • mdadm:tldr:fb122 mdadm: Stop array.
    $ sudo mdadm --stop ${-dev-md0}
    try on your machine
    explain this command
tool overview