Koozali.org: home of the SME Server

Raid 1 Sync Error

Offline Gaetan

  • ***
  • 104
  • +0/-0
Raid 1 Sync Error
« on: May 10, 2016, 11:46:05 AM »
Hi,

My SME server seems to have an hard drive issue:

#>tail /var/log/messages :
May  9 04:02:03 sme2 kernel: raid1: Disk failure on sda1, disabling device.
May  9 04:02:03 sme2 kernel:    Operation continuing on 1 devices
May  9 04:02:03 sme2 kernel: raid1: sdb1: redirecting sector 27878 to another mirror
May  9 04:02:03 sme2 kernel: RAID1 conf printout:
May  9 04:02:03 sme2 kernel:  --- wd:1 rd:2
May  9 04:02:03 sme2 kernel:  disk 0, wo:1, o:0, dev:sda1
May  9 04:02:03 sme2 kernel:  disk 1, wo:0, o:1, dev:sdb1
May  9 04:02:03 sme2 kernel: RAID1 conf printout:
May  9 04:02:03 sme2 kernel:  --- wd:1 rd:2
May  9 04:02:03 sme2 kernel:  disk 1, wo:0, o:1, dev:sdb1



At first,it looks like disk sda1 is faulty.

Then, if I run cat /proc/mdstat, I get:

cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb1[1] sda1[2](F)
      104320 blocks [2/1] [_U]
     
md2 : active raid1 sdb2[1] sda2[2](F)
      156183808 blocks [2/1] [_U]
     
unused devices: <none>



What does it mean ?
Does the "(F)" mean that both disks are faulty ?

Thanks.

Offline Gaetan

  • ***
  • 104
  • +0/-0
Re: Raid 1 Sync Error
« Reply #1 on: May 10, 2016, 11:48:58 AM »
More info:

mdadm --detail /dev/md1
/dev/md1:
        Version : 0.90
  Creation Time : Tue Jun 29 12:33:45 2010
     Raid Level : raid1
     Array Size : 104320 (101.89 MiB 106.82 MB)
  Used Dev Size : 104320 (101.89 MiB 106.82 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Mon May  9 04:02:03 2016
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0

           UUID : b187506c:ca33a075:c5cd3862:2d724d15
         Events : 0.3866

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

       2       8        1        -      faulty spare





mdadm --detail /dev/md2
/dev/md2:
        Version : 0.90
  Creation Time : Tue Jun 29 12:33:46 2010
     Raid Level : raid1
     Array Size : 156183808 (148.95 GiB 159.93 GB)
  Used Dev Size : 156183808 (148.95 GiB 159.93 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2
    Persistence : Superblock is persistent

    Update Time : Tue May 10 10:48:47 2016
          State : active, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0

           UUID : 2218bbfd:433845e0:220100bc:6770a019
         Events : 0.104884345

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

       2       8        2        -      faulty spare

Offline Gaetan

  • ***
  • 104
  • +0/-0
Re: Raid 1 Sync Error
« Reply #2 on: May 10, 2016, 12:06:56 PM »
More infos:

fdisk -l

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   fd  Linux raid autodetect
/dev/sdb2              14       19457   156183930   fd  Linux raid autodetect

Disk /dev/md2: 159.9 GB, 159932219392 bytes
2 heads, 4 sectors/track, 39045952 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md1: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/dm-0: 153.9 GB, 153981288448 bytes
255 heads, 63 sectors/track, 18720 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 5939 MB, 5939134464 bytes
255 heads, 63 sectors/track, 722 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-1 doesn't contain a valid partition table

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Raid 1 Sync Error
« Reply #3 on: May 10, 2016, 12:13:36 PM »
You'll need to replace the faulty drive basically.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline Gaetan

  • ***
  • 104
  • +0/-0
Re: Raid 1 Sync Error
« Reply #4 on: May 10, 2016, 12:18:15 PM »
This is sda I guess.


Regarding the procedure to following, please confirm this is correct.
Shutdown server.
Remove disk sad.
Swap running disk to sda data slot
plug new disk in sdb slot.

Reboot server


Will the sync done automatically ?

Regards

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Raid 1 Sync Error
« Reply #5 on: May 10, 2016, 12:26:06 PM »
This is sda I guess.

Correct.

Quote
Regarding the procedure to following, please confirm this is correct.
Shutdown server.
Remove disk sad.
Swap running disk to sda data slot
plug new disk in sdb slot.

Reboot server

Shutdown server
Remove/replace sda with a new drive in place of the faulty sda drive.
DO NOT SWAP THE DRIVES AROUND WHATEVER YOU DO
Turn on server.

Quote
Will the sync done automatically ?

Once server has booted to the login prompt or console you will need to run "Manage Disk Redundacy" and follow the onscreen instructions, this will take care of the sync.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: Raid 1 Sync Error
« Reply #6 on: May 10, 2016, 12:29:40 PM »
The procedures are well documented in the wiki: https://wiki.contribs.org/Raid
--
qui scribit bis legit

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Raid 1 Sync Error
« Reply #7 on: May 10, 2016, 12:41:50 PM »
The procedures are well documented in the wiki: https://wiki.contribs.org/Raid

Ah yes, I forgot about that. Thanks Terry!
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline Gaetan

  • ***
  • 104
  • +0/-0
Re: Raid 1 Sync Error
« Reply #8 on: May 10, 2016, 07:09:49 PM »
Hi guys,
Thanks for your help.
I have now an issue.
We have simply replaced the faulty disk (sda) ... but now, the server boot but stops on the Grub screen.
Any ideas ?

Thanks

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Raid 1 Sync Error
« Reply #9 on: May 10, 2016, 07:38:54 PM »
any message on grub screen?

I'd start from CD in rescue mode, fix grub on working disk, reboot, add the empty disk to array via console menu item

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Raid 1 Sync Error
« Reply #10 on: May 11, 2016, 06:34:01 AM »
Gaetan
 
Quote
We have simply replaced the faulty disk (sda) ... but now, the server boot but stops on the Grub screen.

Did you clean the MBR from the "new" disk before using it ?
See the RAID Howto for reusing a drive. How to link at top of Forums.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Gaetan

  • ***
  • 104
  • +0/-0
Re: Raid 1 Sync Error
« Reply #11 on: May 11, 2016, 03:02:48 PM »
Thanks To all !
As per Janet suggestion, I got the instructions there:

https://wiki.contribs.org/Grub


I simply had to do the following on the Grub screen:

root (hd0,0)
setup (hd0)
reboot

I then added the new disk (sda) back in the RAID via the "Manage disk redundancy" logged in as admin.

That's it.

It is now resynchronizing.

SME Server is a really good, stable and easy system ... with the great help of guys like you.

Thanks again