2

According to mdadm manual, --zero-superblock option will overwrite the superblock with zeros. As I understand, superblock is a 256 byte block on HDD/SSD describing the RAID level used, name of the array, creation time of the array, modification time of the superblock itself etc.

However, how does the mdadm know where is the superblock located on the disk? Hasn't this changed throughout the versions of superblocks? In addition, is there only a single superblock in use or are there multiple ones for redundancy reasons?

1 Answer 1

4

mdadm looks at the possible positions for a superblock and checks whether the data there looks like s superblock. I don't know though whether the later positions are checked / overwritten, too, if one of the earlier ones matched. In the worst case you would have to call it three times.

1
  • man mdadm: "If the device contains a valid md superblock, the block is over-written with zeros. With --force the block where the superblock would be is overwritten even if it doesn't appear to be valid." Confirming the first part of your answer. My interpretation is that in the latter case, the area to unconditionally destroy will be determined according to the value of --metadata=, which defaults to "1.2" on current versions of mdadm.
    – sourcejedi
    Sep 10, 2017 at 18:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .