When renaming a logical volume, we should change the dev_path (and other
internal variables) in order to be consistent.
Reviewed-by: imsnah
self.dev_path = "/dev/%s/%s" % (self._vg_name, self._lv_name)
self.Attach()
-
@classmethod
def Create(cls, unique_id, children, size):
"""Create a new logical volume.
if result.failed:
raise errors.BlockDeviceError("Failed to rename the logical volume: %s" %
result.output)
+ self._lv_name = new_name
+ self.dev_path = "/dev/%s/%s" % (self._vg_name, self._lv_name)
+
def Attach(self):
"""Attach to an existing LV.