Revision 6b5e3f70 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
5251 | 5251 |
|
5252 | 5252 |
info("renaming the old LVs on the target node") |
5253 | 5253 |
result = self.rpc.call_blockdev_rename(tgt_node, rlist) |
5254 |
result.Raise() |
|
5255 |
if not result.data: |
|
5256 |
raise errors.OpExecError("Can't rename old LVs on node %s" % tgt_node) |
|
5254 |
msg = result.RemoteFailMsg() |
|
5255 |
if msg: |
|
5256 |
raise errors.OpExecError("Can't rename old LVs on node %s: %s" % |
|
5257 |
(tgt_node, msg)) |
|
5257 | 5258 |
# now we rename the new LVs to the old LVs |
5258 | 5259 |
info("renaming the new LVs on the target node") |
5259 | 5260 |
rlist = [(new, old.physical_id) for old, new in zip(old_lvs, new_lvs)] |
5260 | 5261 |
result = self.rpc.call_blockdev_rename(tgt_node, rlist) |
5261 |
result.Raise() |
|
5262 |
if not result.data: |
|
5263 |
raise errors.OpExecError("Can't rename new LVs on node %s" % tgt_node) |
|
5262 |
msg = result.RemoteFailMsg() |
|
5263 |
if msg: |
|
5264 |
raise errors.OpExecError("Can't rename new LVs on node %s: %s" % |
|
5265 |
(tgt_node, msg)) |
|
5264 | 5266 |
|
5265 | 5267 |
for old, new in zip(old_lvs, new_lvs): |
5266 | 5268 |
new.logical_id = old.logical_id |
Also available in: Unified diff