Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Raid1 recovery restarts at >80%
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
aapash
n00b
n00b


Joined: 14 May 2008
Posts: 5
Location: Stockholm, Sweden

PostPosted: Wed May 14, 2008 2:07 pm    Post subject: [SOLVED] Raid1 recovery restarts at >80% Reply with quote

Raid1 recovery restarts at >80%

Raid configuration:
Code:
Server ~ # cat /proc/mdstat
Personalities : [raid0] [raid1]
md2 : active raid1 md0[2] md1[1]
      601537408 blocks [2/1] [_U]
      [=>...................]  recovery =  9.7% (58476032/601537408) finish=147.2min speed=61448K/sec

md1 : active raid0 sdb1[0] hdi1[2] hdg1[1]
      601537472 blocks 64k chunks

md0 : active raid0 sda1[3] hde1[2] hdc1[1] hda2[0]
      602262912 blocks 64k chunks

unused devices: <none>

Original system location is md0 (raid0). md1 has been added as yet another raid0.
md2 (raid0+1) has been created as:
Code:
Server ~ # mdadm --create /dev/md2 --level=1 --raid-devices=2 missing /dev/md1

Data have been copied to md2 (degraded mode). System starts and works just fine from md2.

Now it's time to put missed raid0 (md0) in system:
Code:
Server ~ # sfdisk -d /dev/md1 | sfdisk /dev/md0

Just to check:
Code:
Server ~ # sfdisk -d /dev/md1
# partition table of /dev/md1
unit: sectors

/dev/md1p1 : start=        4, size=1203074940, Id=fd
/dev/md1p2 : start=        0, size=        0, Id= 0
/dev/md1p3 : start=        0, size=        0, Id= 0
/dev/md1p4 : start=        0, size=        0, Id= 0
Server ~ # sfdisk -d /dev/md0
# partition table of /dev/md0
unit: sectors

/dev/md0p1 : start=        4, size=1203074940, Id=fd
/dev/md0p2 : start=        0, size=        0, Id= 0
/dev/md0p3 : start=        0, size=        0, Id= 0
/dev/md0p4 : start=        0, size=        0, Id= 0

Missing device is added:
Code:
Server ~ # mdadm /dev/md2 -a /dev/md0

Recovery process is started, but never comes to the end. At the end (>80%is done) it restarts from the beginning.
Can't understand what's going on. Has tried:
Code:
Server ~ # mdadm /dev/md2 -f /dev/md0
Server ~ # mdadm /dev/md2 -r /dev/md0
Server ~ # sfdisk -d /dev/md1 | sfdisk /dev/md0
Server ~ # mdadm /dev/md2 -a /dev/md0
The same result... :?

Any ideas?


Last edited by aapash on Fri May 16, 2008 7:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
manaka
Apprentice
Apprentice


Joined: 23 Jul 2007
Posts: 158
Location: Oviedo, Spain

PostPosted: Wed May 14, 2008 3:04 pm    Post subject: Reply with quote

You are using a quite weird setup... raid10 md personality would generally be preferred over the raid0 and raid1 combo.

Seems you are using partitionable raid devices... I think you should setup the partitions on the top level array, not in the lower ones... Additionally, when creating a partitionable array, the auto=mdp option should be specified... (Don't know this from sure... Have never tried setting them since I prefer LVM on top of MD ;-) )...
_________________
Javier Miqueleiz

"Listen to your heart. It knows all things, because it came from the Soul of the World, and it will one day return there."
Back to top
View user's profile Send private message
aapash
n00b
n00b


Joined: 14 May 2008
Posts: 5
Location: Stockholm, Sweden

PostPosted: Wed May 14, 2008 4:59 pm    Post subject: Reply with quote

Thanks!
Back to top
View user's profile Send private message
aapash
n00b
n00b


Joined: 14 May 2008
Posts: 5
Location: Stockholm, Sweden

PostPosted: Fri May 16, 2008 7:09 pm    Post subject: Reply with quote

It were a few badblocks at the end of /dev/hdg included in /dev/md1.
Back to top
View user's profile Send private message
manaka
Apprentice
Apprentice


Joined: 23 Jul 2007
Posts: 158
Location: Oviedo, Spain

PostPosted: Sat May 17, 2008 2:25 am    Post subject: Reply with quote

Try getting the SMART information from that disc with smartctl. As today's discs do bad block relocation, they only report a read error to the OS when they are about to fail.
_________________
Javier Miqueleiz

"Listen to your heart. It knows all things, because it came from the Soul of the World, and it will one day return there."
Back to top
View user's profile Send private message
aapash
n00b
n00b


Joined: 14 May 2008
Posts: 5
Location: Stockholm, Sweden

PostPosted: Sun May 18, 2008 5:40 pm    Post subject: Reply with quote

I've just followed detailed instructions of
http://smartmontools.sourceforge.net/BadBlockHowTo.txt

Now it looks good:
Code:
Server ~ # smartctl -l selftest /dev/hdg
smartctl version 5.37 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     40133         -
# 2  Extended offline    Completed without error       00%     40121         -
# 3  Short offline       Completed without error       00%     40117         -
# 4  Extended offline    Completed: read failure       10%     40114         358400973
# 5  Short offline       Completed: read failure       60%     40112         358400973
# 6  Short offline       Completed: read failure       60%     40112         358400973
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum