'Create a "sparse" file of some size and put it in the ``unattached``
directory.
See ``IBlockDeviceAPI.create_volume`` for parameter and return type
documentation.'

def create_volume(self, dataset_id, size):

    check_allocatable_size(self.allocation_unit(), size)
    volume = _blockdevicevolume_from_dataset_id(size=size, dataset_id=dataset_id)
    with self._unattached_directory.child(_backing_file_name(volume)).open('wb') as f:
        f.truncate(size)
    return volume
