linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Creating new raid5 or 6 with --assume-clean
@ 2013-12-02  3:07 Wakko Warner
  2013-12-02  8:48 ` Robin Hill
  0 siblings, 1 reply; 3+ messages in thread
From: Wakko Warner @ 2013-12-02  3:07 UTC (permalink / raw)
  To: linux-raid

This is a general question, but I'll give a specific.

If I create an array with assume clean and proceed to write to the device,
what happens with the parity?

EX:
mdadm -C /dev/md0 -n 4 -l 6 -e 1.0 -b internal -c 128 --assume-clean \
	sdc2 sdd2 sdf2 sde2

Then:
dd if=/dev/zero of=/dev/md0 bs=1M

When it finishes, will all the parity blocks be correct for raid 5 and
raid6?

Would changing md/stripe_cache_size up/down make a difference to the
parities?

-- 
 Microsoft has beaten Volkswagen's world record.  Volkswagen only created 22
 million bugs.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Creating new raid5 or 6 with --assume-clean
  2013-12-02  3:07 Creating new raid5 or 6 with --assume-clean Wakko Warner
@ 2013-12-02  8:48 ` Robin Hill
  2013-12-06 22:52   ` Wakko Warner
  0 siblings, 1 reply; 3+ messages in thread
From: Robin Hill @ 2013-12-02  8:48 UTC (permalink / raw)
  To: Wakko Warner; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]

On Sun Dec 01, 2013 at 10:07:07PM -0500, Wakko Warner wrote:

> This is a general question, but I'll give a specific.
> 
> If I create an array with assume clean and proceed to write to the device,
> what happens with the parity?
> 
> EX:
> mdadm -C /dev/md0 -n 4 -l 6 -e 1.0 -b internal -c 128 --assume-clean \
> 	sdc2 sdd2 sdf2 sde2
> 
> Then:
> dd if=/dev/zero of=/dev/md0 bs=1M
> 
> When it finishes, will all the parity blocks be correct for raid 5 and
> raid6?
> 
> Would changing md/stripe_cache_size up/down make a difference to the
> parities?
> 
Doing that specifically should result in all parity being correct, yes.
Providing the writes are not going to a single disk in a stripe (in
which case read-modify-write may be used to update the parity rather
than a full stripe read and parity recalculation) then any write should
result in the parity for that stripe being written correctly. I think
RMW is only used in RAID5 currently though.

Changing the stripe cache size won't affect the parity calculation at
all (except in terms of performance/throughput).

Regards,
    Robin
-- 
     ___        
    ( ' }     |       Robin Hill        <robin@robinhill.me.uk> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Creating new raid5 or 6 with --assume-clean
  2013-12-02  8:48 ` Robin Hill
@ 2013-12-06 22:52   ` Wakko Warner
  0 siblings, 0 replies; 3+ messages in thread
From: Wakko Warner @ 2013-12-06 22:52 UTC (permalink / raw)
  To: Robin Hill; +Cc: linux-raid

Robin Hill wrote:
> On Sun Dec 01, 2013 at 10:07:07PM -0500, Wakko Warner wrote:
> 
> > This is a general question, but I'll give a specific.
> > 
> > If I create an array with assume clean and proceed to write to the device,
> > what happens with the parity?
> > 
> Doing that specifically should result in all parity being correct, yes.
> Providing the writes are not going to a single disk in a stripe (in
> which case read-modify-write may be used to update the parity rather
> than a full stripe read and parity recalculation) then any write should
> result in the parity for that stripe being written correctly. I think
> RMW is only used in RAID5 currently though.

I tested with raid6 as I mentioned in the command in the original mail.  I
ran a check and there were no mismatches.

I also created a raid5 on the same amount of disks and tried again.  I only
wrote about 4gb and the mismatch count was 0 until it passed the 4gb mark.

I was fairly certain that it would be correct, but I wanted to check.

> Changing the stripe cache size won't affect the parity calculation at
> all (except in terms of performance/throughput).

I wasn't sure if that would make a difference or not.  Doesn't hurt to ask.

Thanks for the response.

I must say that I've been a user of mdadm/linux software raid for some time
now and I've only once lost an entire array.  I appreciate seeing all the
responses I've seen on the list over the years about how helpful everyone
has been.

-- 
 Microsoft has beaten Volkswagen's world record.  Volkswagen only created 22
 million bugs.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-06 22:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-02  3:07 Creating new raid5 or 6 with --assume-clean Wakko Warner
2013-12-02  8:48 ` Robin Hill
2013-12-06 22:52   ` Wakko Warner

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).