+
+ if ret:
+ if verbosity > 0:
+ print lvr.stderr.read()
+ return ret
+
+ lvr = subprocess.Popen(['lvrename', "xenvg/%s" % (src,), "xenvg/%s" % (dest,)],
+ stderr=subprocess.PIPE,
+ stdout=getOutput()['stdout'])
+ ret = lvr.wait()
+
+ if ret:
+ stderr = lvr.stderr.read()
+ if not ('not found in volume group' in stderr):
+ if verbosity > 0:
+ print stderr
+ return ret
+
+ subprocess.Popen(['lvchange', '-ay', "xenvg/%s" % (dest,)],
+ stderr=subprocess.PIPE,
+ stdout=getOutput()['stdout'])
+ ret = lvr.wait()
+
+ if ret: