Skip to main content
Another relevant tag: it's like leaving a read-only snapshot untouched.
Link
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k
Source Link
Ole Tange
  • 37.6k
  • 34
  • 119
  • 228

GNU/Linux: overlay block device / stackable block device

GNU/Linux has union mount that overlays dirs. So you can mount a writeable dir on top of a read-only dir. When the writeable dir is unmounted the read-only dir is untouched.

I am looking for the same functionality for block devices - preferably with the writeable part stored in a file. So I would like to run something like:

device-setup /dev/newdevice /dev/read-only-device overlayfile

If I write to /dev/newdevice the changes should be stored in overlayfile. If I read the sectors written to, I should get the data from overlayfile. If I read sectors not written to, I should get the data from /dev/read-only-device.

Does such a tool exist?