3 Replies Latest reply: Sep 27, 2012 2:42 PM by Catch-22 RSS

    Issue with MD mirror

    bobthesungeek76036
      I inherited a Scientific Linux 6.2 system that had a triple mirror for it's OS device; sda, sdb, & sdc. I tried to remove sdc from the mirror using:

      <pre>
      mdadm --fail /dev/md0 /dev/sdc1
      mdadm --remove /dev/md0 /dev/sdc1
      </pre>

      but the device md0 shows degraded:

      <pre>
      # mdadm --detail /dev/md0
      /dev/md0:
      Version : 1.0
      Creation Time : Fri Jul 20 07:38:36 2012
      Raid Level : raid1
      Array Size : 511988 (500.07 MiB 524.28 MB)
      Used Dev Size : 511988 (500.07 MiB 524.28 MB)
      Raid Devices : 3
      Total Devices : 2
      Persistence : Superblock is persistent

      Update Time : Tue Aug 28 16:25:57 2012
      State : clean, degraded
      Active Devices : 2
      Working Devices : 2
      Failed Devices : 0
      Spare Devices : 0

      Name : localhost.localdomain:0
      UUID : 8b68d22d:4566147a:621a50a4:6d016578
      Events : 325

      Number Major Minor RaidDevice State
      0 8 1 0 active sync /dev/sda1
      3 8 17 1 active sync /dev/sdb1
      2 0 0 2 removed
      #
      </pre>

      I did the same thing with md1 and it too is in the same state.

      mdadm.conf looks like this:

      <pre>
      # mdadm.conf written out by anaconda
      MAILADDR root
      AUTO imsm 1.x -all
      ARRAY /dev/md0 metadata=1.0 level=raid1 num-devices=2 UUID=8b68d22d:4566147a:621a50a4:6d016578
      ARRAY /dev/md1 metadata=1.1 level=raid1 num-devices=2 UUID=b2bc5b0b:4d3a33ba:39e6a2fb:be3ae14c
      </pre>

      Is there any way to clear up the degraded state of these MD devices? I tried zero-superblock but it didn't work:

      <pre>
      # mdadm --zero-superblock /dev/sdc
      mdadm: Unrecognised md component device - /dev/sdc
      # mdadm --zero-superblock /dev/sdc1
      mdadm: Unrecognised md component device - /dev/sdc1
      #
      </pre>
        • 1. Re: Issue with MD mirror
          Catch-22
          If you check the mdadm detail output:

          Raid Devices : 3

          Apparently the software RAID in your configuration was created with 3 devices. 1 is missing and hence the RAID set is degraded. You will have to reduce the number of devices that are registered in the RAID set.

          After failing and removing the drive, which you already did, I suggest the following:

          <pre>
          mdadm /dev/md0 grow raid-devices=2 --backup-file=/boot/md0.backup
          </pre>

          Since 2 disks are good enough for a RAID 1, --backup probably won't do anything.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
          • 2. Re: Issue with MD mirror
            bobthesungeek76036
            Dude! You are my hero!!! Thanks!!! Worked like a charm!
            • 3. Re: Issue with MD mirror
              Catch-22
              Btw, if you use "blkid" utility, the device will still be listed as type "linux_raid_member". After the device has been removed from the RAID set, you can erase it, for instance:

              <pre>
              # mdadm --zero-superblock /dev/sdc1
              </pre>