ghalkes:~# command line tools

scratchbind

About scratchbind

This FUSE filesystem implements a bind-like view of part of a filesystem, in which all files are modifiable while not actually modifying the underlying files.

There are two modes of operation:

  • Modifications to files are not visible to other processes, nor are they persistent over file close.
  • Modifications are visible to all processes, but are not persistent over unmount/re-mount.

The motivation for this filesystem was the impossibility to combine the QEMU -snapshot option or qcow2 base images with saved VMs. This filesystem essentially does the same as the QEMU -snapshot option, outside of QEMU.

The basic idea is to create a scratch file elsewhere on disk, and divert all writes there, at the same offsets as the writes in the original file would be. This allows us to simply record which sections of the file have been overwritten. If the underlying filesystem supports it, the scratch file can be a sparse file, which will allow for fairly efficient storage.

News

Scratchbind version 1.1.1 released

This release adds the semi-persistent mode, which makes changes visible to all processes. Furthermore, it fixes the return value for the close call for files opened in read-only mode.

15-Jun-2013

Scratchbind version 1.0.0 released

This is the initial release of scratchbind.

10-Sep-2012

Download

The source for scratchbind is available here. Older releases are available here.

Contact

You can reach me at: scratchbind @ REMOVE ghalkes.nl.

Copyright Notice

Copyright © 2012-2013 G.P. Halkes
scratchbind is distributed under the GNU General Public License version 3.