yoe/nbd — pull request #9 by shkoo (2012-12-31 03:10:24+00:00)
Title: nbd-server: Add autochunk mode for backing files

This commit adds a new "autochunk" mode to allow the backing files to be automatically generated at a specified size (and removed as needed, if TRIM support is present). It makes large backing stores easier to back up since you can see which parts actually change (via mtime), and if your backup software doesn't understand holes you don't waste nearly as much backup space.

Here is an example config that generates a 1 gig backing store in 1 meg chunks:

```
[generic]
[testchunks]
exportname = /home/nils/src/nbd/testdir/testchunks
autochunk = 1048576
filesize = 1073741824
trim = true
```