Forrest logo
back to the mdadm tool

mdadm:tldr:69d5a

mdadm: Mark disk as failed.
$ sudo mdadm --fail ${-dev-md0} ${-dev-sdXN}
try on your machine

This command is used to fail a specific device from a RAID array. Here's how it breaks down:

  • sudo: This command is used to execute the subsequent command as the superuser or administrator. It provides elevated privileges to perform system-related tasks.
  • mdadm: This is the Linux utility used for managing and monitoring software RAID arrays.
  • --fail: This option specifies that we want to mark a device as failed within the RAID array.
  • ${-dev-md0}: This parameter refers to the device name or identifier of the RAID array. The ${-dev-md0} syntax is typically replaced with the actual device name, for example, /dev/md0.
  • ${-dev-sdXN}: This parameter refers to the specific device that will be marked as failed. The ${-dev-sdXN} syntax is typically replaced with the actual device name or identifier, for instance, /dev/sdXN.

In summary, the command is used to fail a device (${-dev-sdXN}) from a specific RAID array (${-dev-md0}) by marking it as failed.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mdadm tool