1

I have two physical 500 GB hard disks in my Ubuntu 12.04.4 PC and they are supposed to be in a 2-disk RAID array. However, mdadm -D /dev/md0 is reporting that /dev/sda seems to be inoperative, even after a reboot:

/dev/md0:
        Version : 1.2
  Creation Time : Sat Oct 12 20:01:52 2013
     Raid Level : raid1
     Array Size : 471531328 (449.69 GiB 482.85 GB)
  Used Dev Size : 471531328 (449.69 GiB 482.85 GB)
   Raid Devices : 2
  Total Devices : 1
    Persistence : Superblock is persistent

    Update Time : Tue Jun 24 22:57:41 2014
          State : clean, degraded 
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           Name : xxxxx:0  (local to host xxxxx)
           UUID : d87b72eb:17425250:dfbf806f:60eba0fc
         Events : 4482651

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       1       8       17        1      active sync   /dev/sdb1

Similarly for md1 and sda5/sdb5. fdisk sees both sda and sdb. I see this in /proc/mdstat:

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md1 : active raid1 sdb5[1]
      16712576 blocks super 1.2 [2/1] [_U]

md0 : active raid1 sdb1[1]
      471531328 blocks super 1.2 [2/1] [_U]

unused devices: <none>

dmesg shows this:

[    2.187963] md: linear personality registered for level -1
[    2.189389] md: multipath personality registered for level -4
[    2.190202] md: raid0 personality registered for level 0
[    2.191153] md: raid1 personality registered for level 1
[    2.329273] md: bind<sda1>
[    2.330746] md: bind<sda5>
[    2.342623] md: bind<sdb1>
[    2.343018] md: kicking non-fresh sda1 from array!
[    2.343022] md: unbind<sda1>
[    2.435343] md: raid6 personality registered for level 6
[    2.435346] md: raid5 personality registered for level 5
[    2.435348] md: raid4 personality registered for level 4
[    2.437993] md: raid10 personality registered for level 10
[    2.439651] md: export_rdev(sda1)
[    2.440324] md/raid1:md0: active with 1 out of 2 mirrors
[    2.440341] md0: detected capacity change from 0 to 482848079872
[    2.460418]  md0: unknown partition table
[    2.481119] md: bind<sdb5>
[    2.483049] md: kicking non-fresh sda5 from array!
[    2.483066] md: unbind<sda5>
[    2.486916] md: export_rdev(sda5)
[    2.487564] md/raid1:md1: active with 1 out of 2 mirrors
[    2.487578] md1: detected capacity change from 0 to 17113677824
[    2.495906]  md1: unknown partition table

What is this "non-fresh sda1" message?

I have seen this message on linuxquestions.org. Should I do what it says, i.e.:

/sbin/mdadm /dev/md0 --fail /dev/sda1 --remove /dev/sda1
/sbin/mdadm /dev/md0 --add /dev/sda1

/sbin/mdadm /dev/md1 --fail /dev/sda5 --remove /dev/sda5
/sbin/mdadm /dev/md1 --add /dev/sda5

I assume that this would not affect sdb in any way. Thanks.

5
  • 1
    did you have an unclean shutdown that may have caused this issue? What were the circumstances in which the problem occurred?
    – Jakke
    Jun 25, 2014 at 9:32
  • 1
    There was probably an unclean shutdown indeed. It would have been a power failure.
    – sarrazip
    Jun 25, 2014 at 15:46
  • 1
    if you've had an unclean shutdown, this can happen. Try this link and replace your sda5 with sda1: linuxquestions.org/questions/linux-general-1/…
    – Jakke
    Jun 25, 2014 at 16:42
  • 1
    The --remove commands failed because the devices were not found, but the --add commands apparently succeeded. mdadm now says "State : clean, degraded, recovering" and "spare rebuilding" for md0, and "State : clean, degraded, resyncing (DELAYED)" and "spare rebuilding" for md1. I guess the "delayed" means sda5 will be recovered when sda1 is done. Thanks.
    – sarrazip
    Jun 25, 2014 at 16:58
  • It turns out that root had been getting mail for some time from "mdadm monitoring" about having detected a "DegradedArray event". I was not getting that mail in my regular account, because I had not redirected root's mail to it. I fixed that using /etc/aliases and the newaliases command.
    – sarrazip
    Jun 26, 2014 at 1:05

1 Answer 1

0

Providing this answer in the proper format rather than just a link from a comment.

"This can happen after an unclean shutdown (like a power fail). Usually removing and re-adding the problem devices will correct the situation."

Refer to your specific drive configuration and mdadm version specific documentation for how to do this.

Another alternative is using the Gnome Disks utility. Select 'Raid Disks' (Ctrl+R) and then select + and then your missing raid drive. After confirming that all data will be wiped from the drive being added, the newly re-added drive should go to 'Recovering'. Closing the dialog will take you back to the main Disks screen. It should show a progress bar with Recovering: x.x% and the estimated time to complete the syncing.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .