summaryrefslogtreecommitdiffstats
path: root/tools/vgrename.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2003-07-04 22:34:56 +0000
committerAlasdair Kergon <agk@redhat.com>2003-07-04 22:34:56 +0000
commit914c97239fe2dcc551ce28f2b1b40af8c7797369 (patch)
treebe45472e984e6098a1a8e02fd1ad1e0f1532bb41 /tools/vgrename.c
parent8ac97125399fb2cbcad7ae61e49f4af1a021ce25 (diff)
downloadlvm2-914c97239fe2dcc551ce28f2b1b40af8c7797369.tar.gz
lvm2-914c97239fe2dcc551ce28f2b1b40af8c7797369.tar.xz
lvm2-914c97239fe2dcc551ce28f2b1b40af8c7797369.zip
Another sync point - numerous fixes & clean ups.
Diffstat (limited to 'tools/vgrename.c')
-rw-r--r--tools/vgrename.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/vgrename.c b/tools/vgrename.c
index c1d3fbe3..9b485cdf 100644
--- a/tools/vgrename.c
+++ b/tools/vgrename.c
@@ -93,6 +93,7 @@ int vgrename(struct cmd_context *cmd, int argc, char **argv)
}
if (lvs_in_vg_activated(vg_old)) {
+ unlock_vg(cmd, vg_name_old);
log_error("Volume group \"%s\" still has active LVs",
vg_name_old);
/* FIXME Remove this restriction */
@@ -136,7 +137,7 @@ int vgrename(struct cmd_context *cmd, int argc, char **argv)
/* store it on disks */
log_verbose("Writing out updated volume group");
- if (!vg_write(vg_old)) {
+ if (!vg_write(vg_old) || !vg_commit(vg_old)) {
goto error;
}