You are not logged in.

#1 2013-01-03 13:41:59

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 616

[solved] mdadm, removed drive. How to restore?

Hi! On my headless NAS I have raid1 (md0) with two hdd (sda, sdb; sdc is a system). Today I have found one of hdd is "removed" from raid:

# mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Wed Mar 23 23:40:11 2011
     Raid Level : raid1
     Array Size : 976760400 (931.51 GiB 1000.20 GB)
  Used Dev Size : 976760400 (931.51 GiB 1000.20 GB)
   Raid Devices : 2
  Total Devices : 1
    Persistence : Superblock is persistent

    Update Time : Thu Jan  3 16:49:26 2013
          State : clean, degraded 
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           Name : nas:0  (local to host nas)
           UUID : 271dee07:1a34bd53:af2b7d3b:b050d1a2
         Events : 256719

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

Also I have found  these strings related to md in the journal:

...
Jan 03 16:48:12 nas kernel: md: bind<sda1>
Jan 03 16:48:12 nas kernel: md: bind<sdb1>
...
Jan 03 16:48:12 nas kernel: md: export_rdev(sda1)
Jan 03 16:48:12 nas kernel: md: raid1 personality registered for level 1
...
Jan 03 16:48:12 nas kernel: md/raid1:md0: active with 1 out of 2 mirrors
Jan 03 16:48:12 nas kernel: md0: detected capacity change from 0 to 1000202649600
Jan 03 16:48:12 nas kernel:  md0: unknown partition table
...

/etc/mdadm.conf contains these uncommented strings only:

...
DEVICE partitions
...
ARRAY /dev/md0 metadata=1.2 name=nas:0 UUID=271dee07:1a34bd53:af2b7d3b:b050d1a2
...

Have not found any signs of hardware problems both in the journal and with smartctl tool.
Probably some of upgrade is a reason, but I don't know which one (migrating to systemd? new kernel?).
I have not an opportunity to back up all data. So, I hope, somebody more experienced will find a hint or two for me how to accurately try to restore the second (first in list, sda) drive in md0 list.

In particular, is it safe just to try

mdadm /dev/md0 -a /dev/sda1

?

Last edited by student975 (2013-01-03 18:42:58)


"I exist" is the best myth I know..

Offline

#2 2013-01-03 18:42:36

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 616

Re: [solved] mdadm, removed drive. How to restore?

It seems my case is rare one, no answer. I have simply added removed drive. All seem to be OK, synching is already done (took ~three hours for 1T drives). A reason a drive was removed will stay big secret for upcoming generations smile Setting the thread as solved is rather relative action, but is done.

Last edited by student975 (2013-01-03 18:44:45)


"I exist" is the best myth I know..

Offline

Board footer

Powered by FluxBB