Keeping track of dirty blocks on a block device

Posted by mikeY on Stack Overflow See other posts from Stack Overflow or by mikeY
Published on 2011-01-03T03:52:54Z Indexed on 2011/01/06 11:53 UTC
Read the original article Hit count: 197

Filed under:
|
|
|

I'm looking for a way to keep track of what blocks on a block device are modified after a point in time. How I eventually want to use this for is to keep two 2TB disks in sync, one which only comes online (connected through USB) once a month. Without knowing what blocks have been modified, I have to go through the whole 2TB every time.

I'm using a recent GNU/Linux OS and have C and Python experience. I'm hoping to avoid writing kernel level code as I don't have any experience in that area whatsoever. My current theory is that there should be some hooks somewhere where my code can get called when a disk flush is performed.

Any ideas?

© Stack Overflow or respective owner

Related posts about linux

Related posts about backup