'Attempt to create a volume by efficiently copying image to volume.
If both source and target are backed by gpfs storage and the source
image is in raw format move the image to create a volume using either
gpfs clone operation or with a file copy. If the image format is not
raw, convert it to raw at the volume path.'

def _clone_image(self, volume, image_location, image_id):

    self._verify_gpfs_path_state(self.configuration.gpfs_mount_point_base)
    (cloneable_image, reason, image_path) = self._is_cloneable(image_id)
    if (not cloneable_image):
        LOG.debug('Image    %(img)s    not    cloneable:    %(reas)s.', {'img': image_id, 'reas': reason})
        return (None, False)
    vol_path = self.local_path(volume)
    data = image_utils.qemu_img_info(image_path)
    if (data.file_format == 'raw'):
        if (self.configuration.gpfs_images_share_mode == 'copy_on_write'):
            LOG.debug('Clone    image    to    vol    %s    using    mmclone.', volume['id'])
            if (not self._is_gpfs_parent_file(image_path)):
                self._create_gpfs_snap(image_path)
            self._create_gpfs_copy(image_path, vol_path)
        elif (self.configuration.gpfs_images_share_mode == 'copy'):
            LOG.debug('Clone    image    to    vol    %s    using    copyfile.', volume['id'])
            shutil.copyfile(image_path, vol_path)
    else:
        LOG.debug('Clone    image    to    vol    %s    using    qemu    convert.', volume['id'])
        image_utils.convert_image(image_path, vol_path, 'raw')
    self._set_rw_permission(vol_path)
    self._resize_volume_file(volume, volume['size'])
    return ({'provider_location': None}, True)
