Re: Two Questions about Linux MD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 19 Jul 2014 10:52:20 +0200 Killian De Volder
<killian.de.volder@xxxxxxxxxxx> wrote:

> 
> 
> See answser below:
> 
> Ps. You added extra spaces on the bit line ? Why did you do this ?
> You should be using monospace fonts / fixed-with for mailing lists.
> 
> Killian De Volder
> 
> On 19-07-14 05:15, Henry Cai wrote:
> > 1> The first question, as the wiki:
> > https://raid.wiki.kernel.org/index.php/Initial_Array_Creation
> >
> > There has the sentence, "For raid5 there is an optimisation: mdadm
> > takes one of the disks and marks it as 'spare' ", what I want to know
> > is the optimisation for what? The result of the optimisation is that
> > when initial create, the RAID5 is do recovery not resync.
> >
> > And in the mdadm man
> > page:http://www.linuxmanpages.com/man8/mdadm.8.php, also has an option
> > --force, describe as follow: "Normally mdadm will not allow creation
> > of an array with only one device, and will try to create a raid5 array
> > with one missing drive (as this makes the initial resync work faster).
> > With --force, mdadm will not try to be so clever. "
> Don't know how this is faster, sorry, maybe someone else on the mailing
> list know.

I suspect you can work it out if you try.
Think about the exact sequence of IO requests needed to correct the parity
blocks assuming the are not correct.
Now think of the exact sequence of IO requests needed to recover to a spare.
Remember the seeking is slow on rotating storage.
Remember also that the parity block changes device every chunk.

I'm sure you'll work it out.



> > Last, if bitmap save on all disks, how to keep the bitmap consistent?
> > How to address the situation that the bitmaps are different when read
> > from the disks after system boot?
> If linux-raid has troubles keeping the bitmap consistent,
> I'd be a lot more concerned about your data :)
> Also they probably use some tricks with write barriers, and flushes
> and other data to figure out which ones to use.
> 
> That's for someone smarter on the list.

If the different copies of the bitmap contain different contents, then it
must be safe to use any of them.

Think through the different scenarios that could result in an inconsistency
and see if this is true.

Remember that when we bit is set in the bitmap (to say that we intend to
write to the corresponding region), we wait until the new bitmap has been
written to all devices before permitting the write to commence.

NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux