mpalmer / lvmsync

Synchronise LVM LVs across a network by sending only snapshotted changes
http://theshed.hezmatt.org/lvmsync
GNU General Public License v3.0
380 stars 60 forks source link

Linux may cache a stale copy of block device #58

Open reflectivedevelopment opened 5 years ago

reflectivedevelopment commented 5 years ago

Linux may cache a stale copy of the block device. To work around the issue, you could use O_DIRECT or flush the buffers for the lvm blockdev --flushbufs /dev/mapper/snapshot_cow before reading the values to ensure getting a more up to date value.