LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-27-2012, 12:23 PM   #1
bbot
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Rep: Reputation: Disabled
SuSE 11, mdadm and raid1


Hello.

Can I resync raid1 with rewrite 0x00 data that can't be read from dirty sectors at the end of the source disk?

Or I can do this by use dd only?

Raid1 was built with mdadm (mdadm build) and doesn't contain a superblock, so dd seems like a correct solution.

Last edited by bbot; 08-27-2012 at 07:47 PM.
 
Old 08-30-2012, 02:40 PM   #2
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 319

Rep: Reputation: 112Reputation: 112
When you say dirty sectors, do you mean bad sectors?
If there are too many bad sectors on the disk not even dd can help you, sure you can tell it to copy the data over to another drive but any bad sectors it trys to read (conv=noerror,sync) will be replaced by zero's with enough damage done, there is no cheap way to reconstruct the data on that drive.
 
Old 09-05-2012, 03:11 AM   #3
bbot
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Yes, I mean bad sectors.

I did recovery with next commands.

Code:
#> mdadm -S /dev/md/raid1
#> sync && echo 3 > /proc/sys/vm/drop_caches

# Check write operations
#> iostat -x /dev/dm-* 1

First iteration ddrescue-1.16
#> ddrescue --force -n /dev/dm-1 /dev/dm-2 rescued.log
Second with no retry and smaller cluster-size
#> ddrescue --force -d -r0 --cluster-size 16 -A /dev/dm-1 /dev/dm-2 rescued.log
And last two tries to read bad sectors
#> ddrescue --force -d -r3 --retrim /dev/dm-1 /dev/dm-2 rescued.log
#> ddrescue --force -d -r10 --retrim /dev/dm-1 /dev/dm-2 rescued.log

#> sync && echo 3 > /proc/sys/vm/drop_caches
After that drives swapped and the raid array was rebuilded with no problems.

Last edited by bbot; 09-05-2012 at 03:24 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RAID1 resync very VERY slow using mdadm rontay Linux - Software 7 03-13-2010 10:13 AM
mdadm raid1 both bootable chiendarret Linux - Server 1 03-09-2009 07:53 AM
Migrate to a raid1 with mdadm Ossar Linux - Software 2 08-19-2008 11:55 AM
Software RAID1 with mdadm bujecas Debian 0 10-26-2006 09:56 AM
raid1 using mdadm? help plz akadidm Linux - Hardware 3 06-09-2005 04:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration