Bug 755409

Summary: cannot readd a partition to a mirror
Product: [Fedora] Fedora Reporter: Nerijus BaliĆ«nas <nerijus>
Component: mdadmAssignee: Doug Ledford <dledford>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: agk, dledford, Jes.Sorensen, mbroz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-21 11:54:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nerijus Baliƫnas 2011-11-21 03:51:18 UTC
/dev/sdb4 was a part of /dev/md2, but was removed manually. After reboot:

# cat /proc/mdstat 
Personalities : [raid1] 
md2 : active raid1 sda4[1]
      404468416 blocks [2/1] [_U]


# mdadm /dev/md2 -a /dev/sdb4
mdadm: /dev/sdb4 reports being an active member for /dev/md2, but a --re-add fails.
mdadm: not performing --add as that would convert /dev/sdb4 in to a spare.
mdadm: To make this a spare, use "mdadm --zero-superblock /dev/sdb4" first.

How do I readd sdb4 to md2?

Comment 1 Jes Sorensen 2011-11-21 11:54:48 UTC
Just follow the instructions provided in the output from mdadm.

The issue with raid1 is that if you just re-add it, mdadm wouldn't know
which of the two drives is authoritative and you could end up with old
data.

If you mdadm --zero-superblock /dev/sdb4 first you should be able to re-add
the drive.