'Fetch the image from image_service and write it to the volume.
Note that cinder.volume.flows.create_volume will attempt to use
clone_image to efficiently create volume from image when both
source and target are backed by gpfs storage.  If that is not the
case, this function is invoked and uses fetch_to_raw to create the
volume.'

def copy_image_to_volume(self, context, volume, image_service, image_id):

    self._verify_gpfs_path_state(self.configuration.gpfs_mount_point_base)
    LOG.debug('Copy    image    to    vol    %s    using    image_utils    fetch_to_raw.', volume['id'])
    image_utils.fetch_to_raw(context, image_service, image_id, self.local_path(volume), self.configuration.volume_dd_blocksize, size=volume['size'])
    self._resize_volume_file(volume, volume['size'])
