'Extend the size of an existing volume.'

def extend_volume(self, lv_name, new_size):

    has_snapshot = self.lv_has_snapshot(lv_name)
    if has_snapshot:
        self.deactivate_lv(lv_name)
    try:
        cmd = (LVM.LVM_CMD_PREFIX + ['lvextend', '-L', new_size, ('%s/%s' % (self.vg_name, lv_name))])
        self._execute(root_helper=self._root_helper, run_as_root=True, *cmd)
    except putils.ProcessExecutionError as err:
        LOG.exception('Error    extending    Volume')
        LOG.error('Cmd                    :%s', err.cmd)
        LOG.error('StdOut        :%s', err.stdout)
        LOG.error('StdErr        :%s', err.stderr)
        raise
    if has_snapshot:
        self.activate_lv(lv_name)
