'Creates a snapshot of a logical volume.
:param name: Name to assign to new snapshot
:param source_lv_name: Name of Logical Volume to snapshot
:param lv_type: Type of LV (default or thin)'

@utils.retry(putils.ProcessExecutionError)
def create_lv_snapshot(self, name, source_lv_name, lv_type='default'):

    source_lvref = self.get_volume(source_lv_name)
    if (source_lvref is None):
        LOG.error('Trying    to    create    snapshot    by    non-existent    LV:    %s', source_lv_name)
        raise exception.VolumeDeviceNotFound(device=source_lv_name)
    cmd = (LVM.LVM_CMD_PREFIX + ['lvcreate', '--name', name, '--snapshot', ('%s/%s' % (self.vg_name, source_lv_name))])
    if (lv_type != 'thin'):
        size = source_lvref['size']
        cmd.extend(['-L', ('%sg' % size)])
    try:
        self._execute(root_helper=self._root_helper, run_as_root=True, *cmd)
    except putils.ProcessExecutionError as err:
        LOG.exception('Error    creating    snapshot')
        LOG.error('Cmd                    :%s', err.cmd)
        LOG.error('StdOut        :%s', err.stdout)
        LOG.error('StdErr        :%s', err.stderr)
        raise
