linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Greaves <david@dgreaves.com>
To: Guy <bugzilla@watkins-home.com>
Cc: 'Gordon Henderson' <gordon@drogon.net>,
	'Philip Molter' <philip@corp.texas.net>,
	linux-raid@vger.kernel.org
Subject: Re: Force parity resync on raid5?
Date: Thu, 12 Aug 2004 17:26:20 +0100	[thread overview]
Message-ID: <411B9A2C.6090108@dgreaves.com> (raw)
In-Reply-To: <200408121522.i7CFM7311834@watkins-home.com>

Guy wrote:

>You were using skip/seek wrong.
>  
>
typo - thanks.

>This is just pseudo code?  I use bash or ksh, you can't do "n=n+1".
>You don't ever end, again pseudo code I assume.
>  
>
Indeed - should have said - I wouldn't want anyone to cut'n'paste :)
(and that typo shows why!)

>I would only do this if the filesystem on md0 is not mounted.
>  
>
Yes - I thought it would be safe for / in single user and realised it 
wouldn't.
I was also thinking

n=0
while
  dd if=/dev/md0 of=/tmp/block count=x_for_efficiency skip=n
  dd of=/dev/md0 if=/dev/zero count=x_for_efficiency seek=n
  dd of=/dev/md0 if=/tmp/block count=x_for_efficiency seek=n
  n= n + 1
loop

in case something in a block/md layer was smart enough to see no changes 
and not write it for real - I really don't know but it's more paranoid.

Anyway - the question remains - would this be the right approach?

Hmm - I wonder what would be needed to make the resync code do this...

David

>Guy
>
>n=0
>while
>  dd if=/dev/md0 of=/tmp/block count=x_for_efficiency skip=n
>  dd of=/dev/md0 if=/tmp/block count=x_for_efficiency seek=n
>  n=n+1
>loop
>
>-----Original Message-----
>From: linux-raid-owner@vger.kernel.org
>[mailto:linux-raid-owner@vger.kernel.org] On Behalf Of David Greaves
>Sent: Thursday, August 12, 2004 8:31 AM
>To: Guy
>Cc: 'Gordon Henderson'; 'Philip Molter'; linux-raid@vger.kernel.org
>Subject: Re: Force parity resync on raid5?
>
>what about
>n=0
>while
>  dd if=/dev/md0 of=/tmp/block count=x_for_efficiency seek=n
>  dd of=/dev/md0 if=/tmp/block count=x_for_efficiency seek=n
>  n=n+1
>loop
>
>?
>
>This would read the good data and force a rewrite - would you need to 
>stop any optimisers?
>
>David
>
>Guy wrote:
>
>  
>
>>Ouch!  No!!
>>
>>This would re-build data from parity!!!
>>He thinks his parity is bad.
>>He wants to re-build the parity from the data!
>>I don't know if this can even be done!
>>Recovering from a power failure does force a re-build (2.4), but from what
>>    
>>
>I
>  
>
>>remember the system looks like it is re-building a failed disk, which is
>>    
>>
>not
>  
>
>>what he wants to do.  If the parity was good, re-building any 1 disk would
>>be fine.
>>
>>Guy
>>
>>-----Original Message-----
>>From: linux-raid-owner@vger.kernel.org
>>[mailto:linux-raid-owner@vger.kernel.org] On Behalf Of Gordon Henderson
>>Sent: Tuesday, August 10, 2004 5:04 AM
>>To: Philip Molter
>>Cc: linux-raid@vger.kernel.org
>>Subject: Re: Force parity resync on raid5?
>>
>>On Mon, 9 Aug 2004, Philip Molter wrote:
>>
>> 
>>
>>    
>>
>>>How do I force a parity resync on a raid5 array?  Under 2.4, I would do
>>>this by hard cycling the box and when it came back up, it would
>>>automatically resync the array.  Under 2.6, this appears to have gone
>>>   
>>>
>>>      
>>>
>>away.
>>
>>I don't know about 2.6, (still living with 2.4) but can't you simply do:
>>
>> raidhotremove /dev/mdX /dev/hdYZ
>>
>>followed by
>>
>> raidhotadd /dev/mdX /dev/hdYZ
>>
>>or /dev/sdYZ if SCSI disks...
>>
>>However, picking the right disk to remove might be tricky... And if you
>>were at all unsure about data on the disks, maybe rebooting and doing a
>>hard fsck of the partition(s) in maintenance mode might be a good thing
>>too...
>>
>>Good luck!
>>-
>>To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>>the body of a message to majordomo@vger.kernel.org
>>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>-
>>To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>>the body of a message to majordomo@vger.kernel.org
>>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>> 
>>
>>    
>>
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>  
>


  reply	other threads:[~2004-08-12 16:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-09 23:10 Force parity resync on raid5? Philip Molter
2004-08-10  9:04 ` Gordon Henderson
2004-08-12  4:06   ` Guy
2004-08-12 11:52     ` Philip Molter
2004-08-12 12:31     ` David Greaves
2004-08-12 15:22       ` Guy
2004-08-12 16:26         ` David Greaves [this message]
2004-08-12 17:07           ` Philip Molter
  -- strict thread matches above, loose matches on Subject: below --
2004-08-10 12:03 Philip Molter
2004-08-10 12:39 ` Neil Brown
2004-08-10 14:30   ` Philip Molter
2004-08-11  2:28     ` Neil Brown
2004-08-11  3:37       ` Philip Molter
2004-08-11  9:23       ` David Greaves
2004-08-12 17:15 Salyzyn, Mark
2004-08-12 18:16 ` Guy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=411B9A2C.6090108@dgreaves.com \
    --to=david@dgreaves.com \
    --cc=bugzilla@watkins-home.com \
    --cc=gordon@drogon.net \
    --cc=linux-raid@vger.kernel.org \
    --cc=philip@corp.texas.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).