3

Have issue with mdadm similar to Simple mdadm RAID 1 not activating spare:

  • have replaced faulty HDD in RAID 10
  • fdisked and added new hdd to mdadmn
  • mdam resynced array

After that I see following:

...


/dev/md2:
        Version : 0.90
     Raid Level : raid1
     Array Size : 683792000 (652.11 GiB 700.20 GB)
  Used Dev Size : 683792000 (652.11 GiB 700.20 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2
    Persistence : Superblock is persistent

          State : clean, degraded
 Active Devices : 1
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 1

           UUID : e8ba8727:1b7ba76c:2f2051f8:e6dff55c
         Events : 0.94996850

    Number   Major   Minor   RaidDevice State
       0       8       34        0      active sync   /dev/sdc2
       2       8       50        1      spare rebuilding   /dev/sdd2

cat /sys/block/md2/md/sync_action
idle

Is it possible to convert spare drive to active without stopping an array?

UPDATE 1 Posting rebuild logs. Nothing interesting here...

grep md /var/log/messages

Jul 19 10:30:19 xen kernel: md: unbind Jul 19 10:30:19 xen kernel: md: export_rdev(sdd2) Jul 19 10:32:07 xen kernel: md: bind Jul 19 10:33:31 xen kernel: md: unbind Jul 19 10:33:31 xen kernel: md: export_rdev(sdd2) Jul 19 10:35:01 xen kernel: md: bind Jul 19 10:35:01 xen kernel: md: recovery of RAID array md2 Jul 19 10:35:01 xen kernel: md: minimum guaranteed speed: 1000 KB/sec/disk. Jul 19 10:35:01 xen kernel: md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for recovery. Jul 19 10:35:01 xen kernel: md: using 128k window, over a total of 683792000 blocks. ... Jul 19 17:22:36 xen kernel: md: md2: recovery done.

Tried:

  • removed ALL drives from array except working first drive( mdadm --grow /dev/md2 --raid-devices=1 --force)
  • removed "removed" and "detached" drives
  • zeroed superblock on new drive's partition (mdadm --zero-superblock /dev/sdd2)
  • growed array to raid-devices=2
  • re-added new drive mdadm /dev/md2 --add /dev/sdd2

everything is the same :(

mdadm --detail /dev/md2
/dev/md2:
        Version : 0.90
     Raid Level : raid1
     Array Size : 683792000 (652.11 GiB 700.20 GB)
  Used Dev Size : 683792000 (652.11 GiB 700.20 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2
    Persistence : Superblock is persistent

Update Time : Thu Jul 19 18:13:46 2018
      State : clean, degraded

Active Devices : 1 Working Devices : 2 Failed Devices : 0 Spare Devices : 1

     Events : 0.95212006

Number   Major   Minor   RaidDevice State
   0       8       34        0      active sync   /dev/sdc2
   2       8       50        1      spare rebuilding   /dev/sdd2

4
  • Hey! I'm the guy from Simple mdadm RAID 1 not activating spare. There are a lot of answers there. What have you tried? What do you see in dmesg, /var/log/syslog or /var/log/messages around the time the spare fails to become active?
    – Deltik
    Commented Jul 18, 2018 at 10:54
  • Hello, Deltik, thank you for you topic! Tried everything :( Last commands: mdadm ... -fail /dev/sdd2 mdadm ... -remove /dev/sdd2 mdadm ... -remove failed, -remove detached Commented Jul 19, 2018 at 8:14
  • Can you update your question with the contents of dmesg starting from when the spare fails to rebuild?
    – Deltik
    Commented Jul 19, 2018 at 8:19
  • Yes, mdraid is now rebuilding, will update my post with log entries from /var/log/messages after rebuild finished. Thank you! Commented Jul 19, 2018 at 8:23

0

You must log in to answer this question.

Browse other questions tagged .