Re: /etc/cron.weekly/99-raid-check

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

 



On Thu Dec 03, 2009 at 12:11:29PM +0300, CoolCold wrote:

> > The current RAID/IO stack does not 'pin' pages which are destined to
> > be written out to disk.  As a result the contents of the pages may
> > change as the request to do I/O against these pages transits the I/O
> > stack down to disk.
> 
> Can you write a bit more about  "the pages may change"? 'Who' can
> change page contents ?
> 
My understanding of this is:
    - An application maps a file to memory.
    - It makes some modifications.
    - The kernel flags the md layer to write these changes to disk.
    - The md layer writes to one copy of the RAID1.
    - The application makes some more modifications.
    - The md layer writes to the second RAID1 copy (getting different
      data).
    - The kernel flags the md layer to write the new changes.
    - The md layer writes both copies.

The second set of writes can go to a different section of the disk, so
you're left with the (now unused) blocks being different on the disk.
There's no data problem, as the kernel always flags the md layer to
write _after_ the data's changes, and the md layer always writes the
data _after_ the kernel notifies it.

Note: I've not looked at the code for any of this, so I don't _know_
that this is what's happening, but that's my understanding from what
I've read on here in the past.

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

Attachment: pgppuhqr1Dtad.pgp
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