CentOS And Mdadm

Home » CentOS » CentOS And Mdadm
CentOS 1 Comment

Hi,

I’m regularly using software RAID for my CentOS storage servers, either with RAID 1 or RAID 6 depending on the number of disks.

Here’s two questions about mdadm I’ve always been wondering about.

1. I’m not sure about the –metadata option. Let’s say I want to create a simple RAID 1 setup, I’m usually doing it like this:

# mdadm –create /dev/md/boot –level=1 –raid-devices=2 \
–metadata=1.2 /dev/sda1 /dev/sdb1

If anyone can explain the exact meaning of –metadata, I’d be grateful.

Oh, and is it OK to use –metadata=1.2 in CentOS 7.x and 8.x ?

2. I’m regularly encountering the mdadm –misc option in various tutorials on the Internet. I looked it up in mdadm’s manpage, but it doesn’t seem to be documented.

Any idea what this option does ?

Cheers,

Niki


Microlinux – Solutions informatiques durables
7, place de l’église – 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : info@microlinux.fr Tél. : 04 66 63 10 32
Mob. : 06 51 80 12 12

One thought on - CentOS And Mdadm

  • I think the man page is pretty clear on that one.  There are two different versions of the metadata block, and the second one (1.x) can be stored at different locations depending on your purpose. For example, if you want to MD RAID (mirror) your EFI System partition, you can store the metadata that identifies the partition as an MD RAID component at the end of the partition. The UEFI firmware will ignore the metadata and read the partition as if it were not a member (and that’s OK as long as it’s read-only).  However, a partition with metadata at the end would be difficult to resize, so that’s not the preferred location for most components.

    Yes.

    It’s one of the major modes, and assumed if no other mode is specified. 
    See the MODES and OPTIONS sections near the beginning of the mdadm man page.

    I’m guessing that –misc used to be required in order to use any of the options specified in the “For Misc mode” section.