'Create a clone of the volume.'

def create_cloned_volume(self, volume, src_vref):

    LOG.debug('VeritasNFSDriver    create_cloned_volume    called    volume_id    =    %(volume)s    and    src_vol_id    =    %(src_vol_id)s', {'volume': volume.id, 'src_vol_id': src_vref.id})
    src_vol_name = src_vref.name
    vol_size = volume.size
    src_vol_size = src_vref.size
    self._do_clone_volume(src_vref, src_vol_name, volume)
    volume.provider_location = src_vref.provider_location
    if (vol_size != src_vol_size):
        try:
            self.extend_volume(volume, vol_size)
        except exception.ExtendVolumeError as ex:
            with excutils.save_and_reraise_exception():
                LOG.error('Failed    to    extend    Volume:    %s', ex.msg)
                path = self.local_path(volume)
                self._delete_file(path)
    return {'provider_location': volume.provider_location}
