Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am in a bit of a problem with my root server and a degrading RAID. Unfortunately, I'm no expert when it comes to RAID.

System informations: Debian 7.5, SSD software RAID1, problem occur since a couple of days.

Please see the following infos I could get from the command line:

=======================================================================

# cat /proc/mdstat 
Personalities : [raid1] 
md2 : active raid1 sda3[0]
216994240 blocks super 1.2 [2/1] [U_]

md1 : active raid1 sda2[0]
523968 blocks super 1.2 [2/1] [U_]

md0 : active (auto-read-only) raid1 sda1[0]
16768896 blocks super 1.2 [2/1] [U_]

unused devices: <none>



# mdadm -D /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Tue Jan  7 09:39:23 2014
     Raid Level : raid1
     Array Size : 16768896 (15.99 GiB 17.17 GB)
  Used Dev Size : 16768896 (15.99 GiB 17.17 GB)
   Raid Devices : 2
  Total Devices : 1
    Persistence : Superblock is persistent

    Update Time : Tue Jan  7 10:00:27 2014
          State : clean, degraded 
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           Name : rescue:0
           UUID : 7bda6bfa:f532c676:88921937:c40e5b60
         Events : 19

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




# mdadm -D /dev/md1
/dev/md1:
        Version : 1.2
  Creation Time : Tue Jan  7 09:39:23 2014
     Raid Level : raid1
     Array Size : 523968 (511.77 MiB 536.54 MB)
  Used Dev Size : 523968 (511.77 MiB 536.54 MB)
   Raid Devices : 2
  Total Devices : 1
    Persistence : Superblock is persistent

    Update Time : Mon Jun  9 18:02:08 2014
          State : clean, degraded 
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           Name : rescue:1
           UUID : a34a400c:6e44aebb:e6bd697f:832bebe3
         Events : 106

    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       1       0        0        1      removed




# mdadm -D /dev/md2
/dev/md2:
        Version : 1.2
  Creation Time : Tue Jan  7 09:39:23 2014
     Raid Level : raid1
     Array Size : 216994240 (206.94 GiB 222.20 GB)
  Used Dev Size : 216994240 (206.94 GiB 222.20 GB)
   Raid Devices : 2
  Total Devices : 1
    Persistence : Superblock is persistent

    Update Time : Tue Jun 10 11:01:58 2014
          State : clean, degraded 
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           Name : rescue:2
           UUID : fda00d92:d41a6e34:9fcc87f9:29ef44be
         Events : 255477

    Number   Major   Minor   RaidDevice State
       0       8        3        0      active sync   /dev/sda3
       1       0        0        1      removed

=======================================================================

To my point of view the RAID lost some of its drives? (or all of it!!!) How can I get this RAID working correct again? I have a SSH root connection to the server.

Thanks in advance. chriskapeller

share|improve this question

1 Answer 1

You are indeed correct. The server lost one if it's drives (probably /dev/sdb). You have in total 3 raid devices /dev/md0, /dev/md1, /dev/md2 (i suppose those are for /, /boot and swap)

You need to do the following:

  • verify that the disk has indeed failed dmesg can help (and confuse you).
  • Ask the provider to physically change the failed drive
  • After that reassemble the raid

The procedure for raid reassembly is as follows (disks assumed are /dev/sda and /dev/sdb:

  • copy disk partitioning from existing disk dd if=/dev/sda of=/dev/sdb bs=1M count=1
  • Fix partitioning cfdisk /dev/sdb write the partitions basically
  • Add the corresponding pieces to the broken array:

    • mdadm /dev/md0 -add /dev/sda1
    • mdadm /dev/md1 -add /dev/sda2
    • mdadm /dev/md2 -add /dev/sda3
  • Force filesystem check fsck

You can find more info in the following places:

https://raid.wiki.kernel.org/index.php/Recovering_a_failed_software_RAID

https://raid.wiki.kernel.org/index.php/RAID_Recovery

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.