Operating System - HP-UX
1836742 Members
2964 Online
110109 Solutions
New Discussion

The detail of LVM mirror disk writting process.

 
T.Ikuta
Occasional Contributor

The detail of LVM mirror disk writting process.

Hello.

I would like to know the sequence of writting process to LVM mirror disk.

example:
There are two mirror disks(A and B).
When the write instruction occured,how is the data wrote to LVM mirror disk?

I guess below
1.The write instruction occures.
2.MWC(Mirror Write Cache) in memory is updated.(DISK A is "DIRTY")
3.Cache flash occured.
4.MCR(Mirror Consistence Recovery) in VGRA on DISK A is updated.
5.Data is wrote to DISK A.
6.Data is wrote to DISK B.
7.MWC in memory is updated.(DISK A is "CLEAN")
8.MCR in VGRA on DISK A is updated.

Is this correct?
1 REPLY 1
John Palmer
Honored Contributor

Re: The detail of LVM mirror disk writting process.

Hi,

Information is pretty sketchy on this subject...

My best guess at the order of events is as follows:-

1. Application issues write. We'll assume a synchronous write here so that the write will take place straight away rather than just lurking in the buffer cache.

2. Assuming the default for the volume scheduling policy - parallel (-d p to lvcreate/lvchange) the writes to disks A and B will be issued in parallel. Note that the alternative - sequential (-d s) is not recommended.

3. Mirror Write Cache updated for each disk on successful completion of the relevant write.

4. If the disk area written to is not already marked in the Mirror Write Cache (what the man pages for lvcreate/lvchange refer to as a cache-miss) then update the Mirror Write Consistency Record on the relevant disk.

I'd be very interested if anyone else has any comments.

Regards,
John