0

Since yesterday, my server is sending mails like this :

A DegradedArray event had been detected on md device /dev/md2
P.S. The /proc/mdstat file currently contains the following:

Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty] 
md1 : active raid1 sdb1[1] sda1[2](F)
      20478912 blocks [2/1] [_U]

md2 : active raid1 sdb2[1] sda2[2](F)
      96211904 blocks [2/1] [_U]

My hoster told me that one disk has failed and needs to be replaced but before that I need to resync disks. The hoster wants me to pay 250$ for that and I don't have that money.

How can I do resync disks myself please ?

Edit : result of fdisk -l /dev/sda

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e429d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        4096    40962048    20478976+  fd  Linux raid autodetect
/dev/sda2        40962049   233385984    96211968   fd  Linux raid autodetect
/dev/sda3       233385985   234432512      523264   82  Linux swap / Solaris

Edit 2 : new results

sudo mdadm --re-add /dev/md1 /dev/sda1
mdadm: Cannot open /dev/sda1: Device or resource busy
root@ns3279053:~# sudo mdadm --remove /dev/md1 /dev/sda1
mdadm: hot removed /dev/sda1 from /dev/md1
root@ns3279053:~# sudo mdadm --add /dev/md1 /dev/sda1
mdadm: failed to write superblock to /dev/sda1
2
  • You should find a reputable host that doesn't rip you off. Feb 17, 2013 at 11:32
  • I'd like to, but I don't have time right now for that, I need to secure my data
    – Bouki
    Feb 17, 2013 at 12:11

1 Answer 1

1

You can try to resync your disks only if the other disk shown with F namely sda can be accessed. You can try to enumerate the partitions and see if the disk is accessible using fdisk -l /dev/sda.

If not accessible, you need to replace the HD drive and install a new one, partition it, and then resync the raid array.

You can try to re-add the failed member to the mdadm array using the following commands:

sudo mdadm --re-add /dev/md1 /dev/sda1

If you got resource or device busy error, you can try the following:

sudo mdadm --remove /dev/md1 /dev/sda1
sudo mdadm --add /dev/md1 /dev/sda1

You can do it similarly for the other device /dev/md2 by adding /dev/sda2

8
  • i posted the result of fdisk -l /dev/sda what should I do next ?
    – Bouki
    Feb 17, 2013 at 12:09
  • @Bouki: Have another look at my answer.
    – Khaled
    Feb 17, 2013 at 12:42
  • done, i copied results but it seems to have failed
    – Bouki
    Feb 17, 2013 at 12:47
  • @Bouki: Can you post the error message and the failed command?
    – Khaled
    Feb 17, 2013 at 13:04
  • see Edit2 i've posted everything
    – Bouki
    Feb 17, 2013 at 13:06

You must log in to answer this question.

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