public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW tools/lvchange.c
@ 2011-11-18 19:22 zkabelac
0 siblings, 0 replies; 9+ messages in thread
From: zkabelac @ 2011-11-18 19:22 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2011-11-18 19:22:49
Modified files:
. : WHATS_NEW
tools : lvchange.c
Log message:
Allow to activate snapshot
Add extra code to active and deactivate related
snapshots and origin when user specifies snapshot
logical volume as lvchange parameter.
Before patch:
$> lvs -a
LV VG Attr LSize Pool Origin Snap% Move Log Copy% Convert
lvol0 mvg owi-a-s- 1.00k
lvol1 mvg swi-a-s- 16.00k lvol0 0.00
lvol2 mvg swi-a-s- 16.00k lvol0 0.00
$> lvchange -an mvg/lvol2; echo $?
Can't change snapshot logical volume "lvol2".
5
After patch:
$> lvchange -an mvg/lvol2
Change of snapshot lvol2 will also change its origin lvol0 and 1 other
snapshot(s). Proceed? [y/n]: n
Logical volume lvol2 not changed.
$> lvchange -y -an mvg/lvol2; echo $?
0
$> lvs -a
LV VG Attr LSize Pool Origin Snap% Move Log Copy% Convert
lvol0 mvg owi---s- 1.00k
lvol1 mvg swi---s- 16.00k lvol0
lvol2 mvg swi---s- 16.00k lvol0
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2187&r2=1.2188
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvchange.c.diff?cvsroot=lvm2&r1=1.135&r2=1.136
--- LVM2/WHATS_NEW 2011/11/18 19:19:22 1.2187
+++ LVM2/WHATS_NEW 2011/11/18 19:22:49 1.2188
@@ -1,6 +1,7 @@
Version 2.02.89 -
==================================
- Skip non-virtual origins for availability change for lvchange.
+ Allow changing availability state of snapshots.
+ Skip non-virtual snapshots for availability change for lvchange with vg name.
Adjusted mirror region size only for mirrors and raids.
Reorder prompt conditions for removal of active volumes.
Avoid 'mda inconsistency' by properly registering UNLABELLED_PV flag (2.02.86).
--- LVM2/tools/lvchange.c 2011/11/03 14:59:20 1.135
+++ LVM2/tools/lvchange.c 2011/11/18 19:22:49 1.136
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
@@ -125,6 +125,9 @@
activate = arg_uint_value(cmd, available_ARG, 0);
+ if (lv_is_cow(lv) && !lv_is_virtual_origin(origin_from_cow(lv)))
+ lv = origin_from_cow(lv);
+
if (activate == CHANGE_ALN) {
log_verbose("Deactivating logical volume \"%s\" locally",
lv->name);
@@ -515,6 +518,7 @@
int doit = 0, docmds = 0;
int dmeventd_mode, archived = 0;
struct logical_volume *origin;
+ char snaps_msg[128];
if (!(lv->vg->status & LVM_WRITE) &&
(arg_count(cmd, contiguous_ARG) || arg_count(cmd, permission_ARG) ||
@@ -534,11 +538,24 @@
return ECMD_FAILED;
}
- if (lv_is_cow(lv) && !lv_is_virtual_origin(origin_from_cow(lv)) &&
+ if (lv_is_cow(lv) && !lv_is_virtual_origin(origin = origin_from_cow(lv)) &&
arg_count(cmd, available_ARG)) {
- log_error("Can't change snapshot logical volume \"%s\"",
- lv->name);
- return ECMD_FAILED;
+ if (origin->origin_count < 2)
+ snaps_msg[0] = '\0';
+ else if (dm_snprintf(snaps_msg, sizeof(snaps_msg),
+ " and %u other snapshot(s)",
+ origin->origin_count - 1) < 0) {
+ log_error("Failed to prepare message.");
+ return ECMD_FAILED;
+ }
+
+ if (!arg_count(cmd, yes_ARG) &&
+ (yes_no_prompt("Change of snapshot %s will also change its"
+ " origin %s%s. Proceed? [y/n]: ", lv->name,
+ origin->name, snaps_msg) == 'n')) {
+ log_error("Logical volume %s not changed.", lv->name);
+ return ECMD_FAILED;
+ }
}
if (lv->status & PVMOVE) {
^ permalink raw reply [flat|nested] 9+ messages in thread
* LVM2 ./WHATS_NEW tools/lvchange.c
@ 2011-09-05 12:54 agk
0 siblings, 0 replies; 9+ messages in thread
From: agk @ 2011-09-05 12:54 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2011-09-05 12:54:30
Modified files:
. : WHATS_NEW
tools : lvchange.c
Log message:
Remove incorrect requirement for -j or -m from lvchange error message.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2089&r2=1.2090
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvchange.c.diff?cvsroot=lvm2&r1=1.129&r2=1.130
--- LVM2/WHATS_NEW 2011/09/01 19:22:11 1.2089
+++ LVM2/WHATS_NEW 2011/09/05 12:54:29 1.2090
@@ -1,5 +1,6 @@
Version 2.02.89 -
==================================
+ Remove incorrect requirement for -j or -m from lvchange error message.
Fix unsafe table load when splitting off smaller mirror from a larger one.
Use size_t return type for text_vg_export_raw() and export_vg_to_buffer().
Add configure --enable-lvmetad for building the (experimental) LVMetaD.
--- LVM2/tools/lvchange.c 2011/03/29 12:51:58 1.129
+++ LVM2/tools/lvchange.c 2011/09/05 12:54:29 1.130
@@ -715,10 +715,8 @@
if (!update &&
!arg_count(cmd, available_ARG) && !arg_count(cmd, refresh_ARG) &&
- !arg_count(cmd, monitor_ARG) && !arg_count(cmd, poll_ARG) &&
- /* for persistent_ARG */
- !arg_count(cmd, minor_ARG) && !arg_count(cmd, major_ARG)) {
- log_error("Need 1 or more of -a, -C, -j, -m, -M, -p, -r, "
+ !arg_count(cmd, monitor_ARG) && !arg_count(cmd, poll_ARG)) {
+ log_error("Need 1 or more of -a, -C, -M, -p, -r, "
"--resync, --refresh, --alloc, --addtag, --deltag, "
"--monitor or --poll");
return EINVALID_CMD_LINE;
^ permalink raw reply [flat|nested] 9+ messages in thread
* LVM2 ./WHATS_NEW tools/lvchange.c
@ 2009-08-13 14:27 mornfall
0 siblings, 0 replies; 9+ messages in thread
From: mornfall @ 2009-08-13 14:27 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall@sourceware.org 2009-08-13 14:27:33
Modified files:
. : WHATS_NEW
tools : lvchange.c
Log message:
Make lvchange --refresh only take a read lock on volume group.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1238&r2=1.1239
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvchange.c.diff?cvsroot=lvm2&r1=1.108&r2=1.109
--- LVM2/WHATS_NEW 2009/08/13 13:23:51 1.1238
+++ LVM2/WHATS_NEW 2009/08/13 14:27:32 1.1239
@@ -1,5 +1,6 @@
Version 2.02.52 -
=================================
+ Make lvchange --refresh only take a read lock on volume group.
Fix bug where non-blocking file locks could be granted in error.
Make lvm2app pv_t, lv_t, vg_t handle definitions consistent with lvm_t.
Fix vgextend error path - if ORPHAN lock fails, unlock / release vg (2.02.49).
--- LVM2/tools/lvchange.c 2009/07/15 05:49:48 1.108
+++ LVM2/tools/lvchange.c 2009/08/13 14:27:33 1.109
@@ -690,12 +690,11 @@
return EINVALID_CMD_LINE;
}
- int avail_only =
+ int avail_only = /* i.e. only one of -a or --refresh is given */
!(arg_count(cmd, contiguous_ARG) || arg_count(cmd, permission_ARG) ||
arg_count(cmd, readahead_ARG) || arg_count(cmd, persistent_ARG) ||
arg_count(cmd, addtag_ARG) || arg_count(cmd, deltag_ARG) ||
- arg_count(cmd, refresh_ARG) || arg_count(cmd, alloc_ARG) ||
- arg_count(cmd, resync_ARG));
+ arg_count(cmd, resync_ARG) || arg_count(cmd, alloc_ARG));
if (arg_count(cmd, ignorelockingfailure_ARG) && !avail_only) {
log_error("Only -a permitted with --ignorelockingfailure");
^ permalink raw reply [flat|nested] 9+ messages in thread
* LVM2 ./WHATS_NEW tools/lvchange.c
@ 2009-06-06 22:00 mbroz
0 siblings, 0 replies; 9+ messages in thread
From: mbroz @ 2009-06-06 22:00 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2009-06-06 22:00:20
Modified files:
. : WHATS_NEW
tools : lvchange.c
Log message:
Round readahead more inteligently and print warning.
Round readahead at least to one page up.
Print warning instead of verbose message.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1142&r2=1.1143
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvchange.c.diff?cvsroot=lvm2&r1=1.103&r2=1.104
--- LVM2/WHATS_NEW 2009/06/05 20:00:52 1.1142
+++ LVM2/WHATS_NEW 2009/06/06 22:00:20 1.1143
@@ -1,5 +1,6 @@
Version 2.02.48 -
===============================
+ Round up requested readahead to at least one page and print warning.
Try to repair vg before actual vgremove when force flag provided.
Fix possible double release of VG after recovery.
Add parameter to process_each_vg specifying what to do with inconsistent VG.
--- LVM2/tools/lvchange.c 2009/06/01 14:43:28 1.103
+++ LVM2/tools/lvchange.c 2009/06/06 22:00:20 1.104
@@ -370,9 +370,12 @@
if (read_ahead != DM_READ_AHEAD_AUTO &&
read_ahead != DM_READ_AHEAD_NONE && read_ahead % pagesize) {
- read_ahead = (read_ahead / pagesize) * pagesize;
- log_verbose("Rounding down readahead to %u sectors, a multiple "
- "of page size %u.", read_ahead, pagesize);
+ if (read_ahead < pagesize)
+ read_ahead = pagesize;
+ else
+ read_ahead = (read_ahead / pagesize) * pagesize;
+ log_warn("WARNING: Overriding readahead to %u sectors, a multiple "
+ "of %uK page size.", read_ahead, pagesize >> 1);
}
if (lv->read_ahead == read_ahead) {
^ permalink raw reply [flat|nested] 9+ messages in thread
* LVM2 ./WHATS_NEW tools/lvchange.c
@ 2008-07-31 13:03 agk
0 siblings, 0 replies; 9+ messages in thread
From: agk @ 2008-07-31 13:03 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2008-07-31 13:03:02
Modified files:
. : WHATS_NEW
tools : lvchange.c
Log message:
Change lvchange exit status to indicate if any part of the operation failed.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.939&r2=1.940
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvchange.c.diff?cvsroot=lvm2&r1=1.92&r2=1.93
--- LVM2/WHATS_NEW 2008/07/31 12:38:31 1.939
+++ LVM2/WHATS_NEW 2008/07/31 13:03:01 1.940
@@ -1,5 +1,6 @@
Version 2.02.40 -
================================
+ Change lvchange exit status to indicate if any part of the operation failed.
Fix pvchange and pvremove to handle PVs without mdas.
Refactor _text_pv_read and always return mda list if requested.
Fix configure to work w/o readline unless --enable-readline used. (2.02.39)
--- LVM2/tools/lvchange.c 2008/06/18 11:32:14 1.92
+++ LVM2/tools/lvchange.c 2008/07/31 13:03:01 1.93
@@ -545,7 +545,7 @@
static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
void *handle __attribute((unused)))
{
- int doit = 0;
+ int doit = 0, docmds = 0;
int archived = 0;
if (!(lv->vg->status & LVM_WRITE) &&
@@ -606,6 +606,7 @@
return ECMD_FAILED;
archived = 1;
doit += lvchange_permission(cmd, lv);
+ docmds++;
}
/* allocation policy change */
@@ -614,6 +615,7 @@
return ECMD_FAILED;
archived = 1;
doit += lvchange_alloc(cmd, lv);
+ docmds++;
}
/* read ahead sector change */
@@ -622,6 +624,7 @@
return ECMD_FAILED;
archived = 1;
doit += lvchange_readahead(cmd, lv);
+ docmds++;
}
/* read ahead sector change */
@@ -630,6 +633,7 @@
return ECMD_FAILED;
archived = 1;
doit += lvchange_persistent(cmd, lv);
+ docmds++;
if (sigint_caught())
return ECMD_FAILED;
}
@@ -640,6 +644,7 @@
return ECMD_FAILED;
archived = 1;
doit += lvchange_tag(cmd, lv, addtag_ARG);
+ docmds++;
}
/* del tag */
@@ -648,6 +653,7 @@
return ECMD_FAILED;
archived = 1;
doit += lvchange_tag(cmd, lv, deltag_ARG);
+ docmds++;
}
if (doit)
@@ -674,6 +680,9 @@
return ECMD_FAILED;
}
+ if (doit != docmds)
+ return ECMD_FAILED;
+
return ECMD_PROCESSED;
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* LVM2 ./WHATS_NEW tools/lvchange.c
@ 2008-05-21 14:10 agk
0 siblings, 0 replies; 9+ messages in thread
From: agk @ 2008-05-21 14:10 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2008-05-21 14:10:11
Modified files:
. : WHATS_NEW
tools : lvchange.c
Log message:
Temporarily disable dmeventd mirror monitoring during lvchange --resync.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.875&r2=1.876
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvchange.c.diff?cvsroot=lvm2&r1=1.90&r2=1.91
--- LVM2/WHATS_NEW 2008/05/19 19:49:56 1.875
+++ LVM2/WHATS_NEW 2008/05/21 14:10:11 1.876
@@ -6,6 +6,7 @@
Version 2.02.37 -
=================================
+ Temporarily disable dmeventd mirror monitoring during lvchange --resync.
Refactor some vginfo manipulation code.
Add assertions to trap deprecated P_ and V_ lock usage.
Add missing mutex around clvmd lvmcache_drop_metadata library call.
--- LVM2/tools/lvchange.c 2008/04/10 17:09:32 1.90
+++ LVM2/tools/lvchange.c 2008/05/21 14:10:11 1.91
@@ -178,6 +178,7 @@
struct logical_volume *lv)
{
int active = 0;
+ int monitored;
struct lvinfo info;
struct logical_volume *log_lv;
@@ -221,6 +222,10 @@
}
}
+ /* Activate exclusively to ensure no nodes still have LV active */
+ monitored = dmeventd_monitor_mode();
+ init_dmeventd_monitor(0);
+
if (vg_is_clustered(lv->vg) && !activate_lv_excl(cmd, lv)) {
log_error("Can't get exclusive access to clustered volume %s",
lv->name);
@@ -232,6 +237,8 @@
return 0;
}
+ init_dmeventd_monitor(monitored);
+
log_lv = first_seg(lv)->log_lv;
log_very_verbose("Starting resync of %s%s%s mirror \"%s\"",
^ permalink raw reply [flat|nested] 9+ messages in thread
* LVM2 ./WHATS_NEW tools/lvchange.c
@ 2008-01-26 0:13 agk
0 siblings, 0 replies; 9+ messages in thread
From: agk @ 2008-01-26 0:13 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2008-01-26 00:13:45
Modified files:
. : WHATS_NEW
tools : lvchange.c
Log message:
Fix internal metadata corruption in lvchange --resync.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.776&r2=1.777
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvchange.c.diff?cvsroot=lvm2&r1=1.85&r2=1.86
--- LVM2/WHATS_NEW 2008/01/22 15:58:31 1.776
+++ LVM2/WHATS_NEW 2008/01/26 00:13:44 1.777
@@ -1,5 +1,6 @@
Version 2.02.32 -
===================================
+ Fix internal metadata corruption in lvchange --resync. (2.02.30)
Fix new parameter validation in vgsplit and test mode. (2.02.30)
Remove redundant cnxman-socket.h file from clvmd directory.
Fix pvs, vgs, lvs error exit status on some error paths.
--- LVM2/tools/lvchange.c 2008/01/10 18:35:51 1.85
+++ LVM2/tools/lvchange.c 2008/01/26 00:13:45 1.86
@@ -274,6 +274,7 @@
first_seg(lv)->log_lv = NULL;
log_lv->status &= ~MIRROR_LOG;
log_lv->status |= VISIBLE_LV;
+ remove_seg_from_segs_using_this_lv(log_lv, first_seg(lv));
if (!vg_write(lv->vg)) {
log_error("Failed to write intermediate VG metadata.");
@@ -281,6 +282,7 @@
first_seg(lv)->log_lv = log_lv;
log_lv->status |= MIRROR_LOG;
log_lv->status &= ~VISIBLE_LV;
+ add_seg_to_segs_using_this_lv(log_lv, first_seg(lv));
if (!activate_lv(cmd, lv))
stack;
}
@@ -295,6 +297,7 @@
first_seg(lv)->log_lv = log_lv;
log_lv->status |= MIRROR_LOG;
log_lv->status &= ~VISIBLE_LV;
+ add_seg_to_segs_using_this_lv(log_lv, first_seg(lv));
if (!activate_lv(cmd, lv))
stack;
}
@@ -326,6 +329,7 @@
first_seg(lv)->log_lv = log_lv;
log_lv->status |= MIRROR_LOG;
log_lv->status &= ~VISIBLE_LV;
+ add_seg_to_segs_using_this_lv(log_lv, first_seg(lv));
}
log_very_verbose("Updating logical volume \"%s\" on disk(s)", lv->name);
^ permalink raw reply [flat|nested] 9+ messages in thread
* LVM2 ./WHATS_NEW tools/lvchange.c
@ 2006-10-13 21:33 agk
0 siblings, 0 replies; 9+ messages in thread
From: agk @ 2006-10-13 21:33 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2006-10-13 21:33:31
Modified files:
. : WHATS_NEW
tools : lvchange.c
Log message:
Retain activation state after changing LV minor number with --force.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.468&r2=1.469
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvchange.c.diff?cvsroot=lvm2&r1=1.68&r2=1.69
--- LVM2/WHATS_NEW 2006/10/13 13:22:44 1.468
+++ LVM2/WHATS_NEW 2006/10/13 21:33:31 1.469
@@ -1,6 +1,7 @@
Version 2.02.12 -
===================================
- Propogate clustered flag in vgsplit and require resizeable flag.
+ Retain activation state after changing LV minor number with --force.
+ Propagate clustered flag in vgsplit and require resizeable flag.
Version 2.02.11 - 12th October 2006
===================================
--- LVM2/tools/lvchange.c 2006/07/10 19:39:14 1.68
+++ LVM2/tools/lvchange.c 2006/10/13 21:33:31 1.69
@@ -294,16 +294,15 @@
log_error("Major number must be specified with -My");
return 0;
}
- if (lv_info(cmd, lv, &info, 0) && info.exists &&
- !arg_count(cmd, force_ARG)) {
- if (yes_no_prompt("Logical volume %s will be "
- "deactivated temporarily. "
- "Continue? [y/n]: ", lv->name) == 'n') {
- log_print("%s device number not changed.",
- lv->name);
- return 0;
- }
+ if (lv_info(cmd, lv, &info, 0) && info.exists)
active = 1;
+ if (active && !arg_count(cmd, force_ARG) &&
+ yes_no_prompt("Logical volume %s will be "
+ "deactivated temporarily. "
+ "Continue? [y/n]: ", lv->name) == 'n') {
+ log_print("%s device number not changed.",
+ lv->name);
+ return 0;
}
log_verbose("Ensuring %s is inactive.", lv->name);
if (!deactivate_lv(cmd, lv)) {
^ permalink raw reply [flat|nested] 9+ messages in thread
* LVM2 ./WHATS_NEW tools/lvchange.c
@ 2006-07-10 19:39 agk
0 siblings, 0 replies; 9+ messages in thread
From: agk @ 2006-07-10 19:39 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2006-07-10 19:39:14
Modified files:
. : WHATS_NEW
tools : lvchange.c
Log message:
Fix activation logic in lvchange --persistent.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.408&r2=1.409
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvchange.c.diff?cvsroot=lvm2&r1=1.67&r2=1.68
--- LVM2/WHATS_NEW 2006/07/10 19:17:40 1.408
+++ LVM2/WHATS_NEW 2006/07/10 19:39:14 1.409
@@ -1,5 +1,6 @@
Version 2.02.07 -
=================================
+ Fix activation logic in lvchange --persistent.
Don't ignore persistent minor numbers when activating.
Use RTLD_GLOBAL when loading shared libraries.
Add some forgotten memlock checks to _vg_read to protect against full scans.
--- LVM2/tools/lvchange.c 2006/05/12 19:16:48 1.67
+++ LVM2/tools/lvchange.c 2006/07/10 19:39:14 1.68
@@ -315,14 +315,7 @@
lv->major = arg_int_value(cmd, major_ARG, lv->major);
log_verbose("Setting persistent device number to (%d, %d) "
"for \"%s\"", lv->major, lv->minor, lv->name);
- if (active) {
- log_verbose("Re-activating logical volume \"%s\"",
- lv->name);
- if (!activate_lv(cmd, lv)) {
- log_error("%s: reactivation failed", lv->name);
- return 0;
- }
- }
+
}
log_very_verbose("Updating logical volume \"%s\" on disk(s)", lv->name);
@@ -333,21 +326,17 @@
backup(lv->vg);
- if (!suspend_lv(cmd, lv)) {
- log_error("Failed to lock %s", lv->name);
- vg_revert(lv->vg);
- return 0;
- }
-
if (!vg_commit(lv->vg)) {
- resume_lv(cmd, lv);
+ stack;
return 0;
}
- log_very_verbose("Updating permissions for \"%s\" in kernel", lv->name);
- if (!resume_lv(cmd, lv)) {
- log_error("Problem reactivating %s", lv->name);
- return 0;
+ if (active) {
+ log_verbose("Re-activating logical volume \"%s\"", lv->name);
+ if (!activate_lv(cmd, lv)) {
+ log_error("%s: reactivation failed", lv->name);
+ return 0;
+ }
}
return 1;
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-11-18 19:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-18 19:22 LVM2 ./WHATS_NEW tools/lvchange.c zkabelac
-- strict thread matches above, loose matches on Subject: below --
2011-09-05 12:54 agk
2009-08-13 14:27 mornfall
2009-06-06 22:00 mbroz
2008-07-31 13:03 agk
2008-05-21 14:10 agk
2008-01-26 0:13 agk
2006-10-13 21:33 agk
2006-07-10 19:39 agk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).