w...@netbsd.org (Thomas Klausner) writes: >For a cgd in a file that I mount via vnd+cgd, the file system contents >inside may change, but the actual file on the hard disk outside only >has 'access' time changes. So "smart" backup programs that check >timestamps to find out if they need to re-hash files don't notice it >was changed. How do you handle this? Manually touch it?
vnd has an optimization where the backing file isn't touched, but the underlying device is accessed directly. Then file cache and device aren't in sync and a backup program reading the file might read stale data. vnd should probably update the file when unconfiguring, but so far it does not. The optimization is disabled under some conditions and explicitely if you use 'vnconfig -i'. Then all operations are done by file I/O and the timestamps of the backing file are maintained. The extra caching of course affects performance.