if (out[0] == 'o') or (out[0] == 'O'):
return True
return False
+
+ def extend_volume(self, lv_name, new_size):
+ """Extend the size of an existing volume."""
+
+ try:
+ self._execute('lvextend', '-L', new_size,
+ '%s/%s' % (self.vg_name, lv_name),
+ root_helper=self._root_helper,
+ run_as_root=True)
+ 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
self._stats = data
+ def extend_volume(self, volume, new_size):
+ """Extend an existing voumes size."""
+ self.vg.extend_volume(volume['name'], new_size)
+
class LVMISCSIDriver(LVMVolumeDriver, driver.ISCSIDriver):
"""Executes commands relating to ISCSI volumes.
# cinder/volume/driver.py: 'lvrename', '%(vg)s', '%(orig)s' '(new)s'...
lvrename: CommandFilter, lvrename, root
+# cinder/volume/driver.py: 'lvextend', '-L' '%(new_size)s', '%(lv_name)s' ...
+lvextend: CommandFilter, lvextend, root
+
# cinder/volume/driver.py: 'iscsiadm', '-m', 'discovery', '-t',...
# cinder/volume/driver.py: 'iscsiadm', '-m', 'node', '-T', ...
iscsiadm: CommandFilter, iscsiadm, root
# cinder/volume/drivers/glusterfs.py
mv: CommandFilter, mv, root
-# cinder/volumes/drivers/hds/hds.py:
+# cinder/volumes/drivers/hds/hds.py:
hus-cmd: CommandFilter, hus-cmd, root
# cinder/brick/initiator/connector.py: