![Forrest logo](/images/logo.png)
mdadm:tldr:9e182
This command is used to zero out the superblock of a specified device using the mdadm
command with superuser privileges (sudo
).
Here's a breakdown of the command components:
-
sudo
: A command used in Unix-like systems to execute a command with superuser (or root) privileges, allowing the user to perform actions that require administrative rights. -
mdadm
: A utility tool in Linux and other Unix-like systems used for managing software RAID arrays. It allows the user to create, manage, monitor, and repair RAID arrays. -
--zero-superblock
: This flag instructsmdadm
to zero out the superblock of the specified device. The superblock is a metadata structure that provides information about a RAID array, such as the version, layout, and state. By zeroing it out, you effectively remove any existing RAID configuration on the device. -
${-dev-sdXN}
: This is a placeholder for the device you want to zero out the superblock for.sdXN
refers to a specific partition or entire disk on your system, wheresdX
denotes the disk (e.g., sda, sdb) andN
refers to a partition number (e.g., 1, 2, 3). You would replace${-dev-sdXN}
with the actual device path, such as/dev/sda1
or/dev/sdb2
.
So, effectively, running this command with the appropriate device path will remove any previous RAID configuration stored in the superblock of that device.