self._try_execute('lvcreate', '-s', '-n', new_name,
src_lvm_name, run_as_root=True)
- def create_volume(self, volume):
- """Creates a logical volume. Can optionally return a Dictionary of
- changes to the volume object to be persisted.
- """
+ def _create_volume(self, volume):
sizestr = self._sizestr(volume['size'])
vg_name = ("%s/%s-pool" % (self.configuration.volume_group,
self.configuration.volume_group))
self._try_execute('lvcreate', '-T', '-V', sizestr, '-n',
volume['name'], vg_name, run_as_root=True)
+ def create_volume(self, volume):
+ """Creates a logical volume."""
+ self._create_volume(volume)
+
def delete_volume(self, volume):
"""Deletes a logical volume."""
if self._volume_not_present(volume['name']):