openzfs/zfs

MD RAID headers can cause Linux to steal disks from ZFS

Open

#634 geöffnet am 2. Apr. 2012

Auf GitHub ansehen
 (30 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C (1.703 Forks)batch import
Bot: Not StaleStatus: Understoodgood first issue

Repository-Metriken

Stars
 (9.908 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 5T 21h) (62 gemergte PRs in 30 T)

Beschreibung

I received a report from a veteran Gentoo user that MD RAID had stolen two disks from a raidz2 vdev. It seems that ZFS leaves a hole for a bootloader that an MD RAID header can occupy, causing this issue. This occurred on partitions that were 0xBF, not 0xFD.

I have found myself recommending people do mdadm --zero-superblock ... before creating a ZFS pool to avoid this situation. It would be a good idea to modify the code to zero this at vdev creation to preclude any possibility that an old MD RAID header will cause the kernel module to steal the disks.

I am not sure if I have time to do this right now, but I figured that I would file a report so that people are aware of the issue.

Contributor Guide