[dm-devel] create lvm2 snapshot will take a long time while large IO on origin lv(till large IO ends)

Busby chaimvy at gmail.com
Fri Apr 30 01:09:21 UTC 2010


Hi, Phillip Susi,
                 Why not suspend the origin's IO first, then create the
snapshot lv, resume the origin lv 's IO waiting Q last. the 'dd' cmd is
eariler than the snapshot's creating, if suspend the IO, the filesystem on
the snapshot will be corrupt, I get it, but I think the  snapshot is in
block layer, should suspend the user layer's data coming first, then flush
the data in the dirty buffer and create the snapshot.  like the dd cmd on
the origin, will make the snapshot's creating take a very long time, for
waiting for the dm suspend 's return, I think flush the data in the dirty
buffer (data from dd ), suspend the next data of the dd, create the
snapshot, then let the data into dirty buffer to the block layer. the dd cmd
will put the data into dirty buffer continually, can not be suspended?


Best regards,
Bubsy

2010/4/30 Phillip Susi <psusi at cfl.rr.com>

> On 4/28/2010 11:24 PM, Busby wrote:
> > it seems the vgs suspend because the lvcreate cmd don't unlock the
> > flock, but why the lvcreating of snapshot lv will be suspended while the
> > origin is on big data IO?
>
> Because when creating a snapshot it tries to flush any dirty buffers so
> that the origin is in a consistent state at the time the snapshot is
> created.  This is done to minimize the chance that the filesystem on the
> snapshot will be corrupt.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20100430/dafc38bf/attachment.htm>


More information about the dm-devel mailing list