1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

try forcesync -> resync

This commit is contained in:
Alasdair Kergon 2006-10-24 17:18:25 +00:00
parent b23f88bff8
commit e51d50a11e
5 changed files with 11 additions and 11 deletions

View File

@ -1,6 +1,6 @@
Version 2.02.13 - Version 2.02.13 -
=================================== ===================================
Add lvchange --forcesync. Add lvchange --resync.
Perform high-level free space check before each allocation attempt. Perform high-level free space check before each allocation attempt.
Don't allow a node to remove an LV that's exclusively active on anther node. Don't allow a node to remove an LV that's exclusively active on anther node.
Cope if same PV is included more than once in cmdline PE range list. Cope if same PV is included more than once in cmdline PE range list.

View File

@ -7,7 +7,7 @@ lvchange \- change attributes of a logical volume
[\-A/\-\-autobackup y/n] [\-a/\-\-available y/n/ey/en/ly/ln] [\-A/\-\-autobackup y/n] [\-a/\-\-available y/n/ey/en/ly/ln]
[\-\-alloc AllocationPolicy] [\-\-alloc AllocationPolicy]
[\-C/\-\-contiguous y/n] [\-d/\-\-debug] [\-\-deltag Tag] [\-C/\-\-contiguous y/n] [\-d/\-\-debug] [\-\-deltag Tag]
[\-\-forcesync] [\-\-resync]
[\-h/\-?/\-\-help] [\-h/\-?/\-\-help]
[\-\-ignorelockingfailure] [\-\-ignorelockingfailure]
[\-\-monitor {y|n}] [\-\-monitor {y|n}]
@ -41,7 +41,7 @@ logical volumes. It's only possible to change a non-contiguous
logical volume's allocation policy to contiguous, if all of the logical volume's allocation policy to contiguous, if all of the
allocated physical extents are already contiguous. allocated physical extents are already contiguous.
.TP .TP
.I \-\-forcesync .I \-\-resync
Forces the complete resynchronization of a mirror. In normal Forces the complete resynchronization of a mirror. In normal
circumstances you should not need this option because synchronization circumstances you should not need this option because synchronization
happens automatically. Data is read from the primary mirror device happens automatically. Data is read from the primary mirror device

View File

@ -46,7 +46,7 @@ arg(alloc_ARG, '\0', "alloc", alloc_arg)
arg(separator_ARG, '\0', "separator", string_arg) arg(separator_ARG, '\0', "separator", string_arg)
arg(mirrorsonly_ARG, '\0', "mirrorsonly", NULL) arg(mirrorsonly_ARG, '\0', "mirrorsonly", NULL)
arg(nosync_ARG, '\0', "nosync", NULL) arg(nosync_ARG, '\0', "nosync", NULL)
arg(forcesync_ARG, '\0', "forcesync", NULL) arg(resync_ARG, '\0', "resync", NULL)
arg(corelog_ARG, '\0', "corelog", NULL) arg(corelog_ARG, '\0', "corelog", NULL)
arg(monitor_ARG, '\0', "monitor", yes_no_arg) arg(monitor_ARG, '\0', "monitor", yes_no_arg)
arg(config_ARG, '\0', "config", string_arg) arg(config_ARG, '\0', "config", string_arg)

View File

@ -61,7 +61,7 @@ xx(lvchange,
"\t[-d|--debug]\n" "\t[-d|--debug]\n"
"\t[--deltag Tag]\n" "\t[--deltag Tag]\n"
"\t[-f|--force]\n" "\t[-f|--force]\n"
"\t[--forcesync]\n" "\t[--resync]\n"
"\t[-h|--help]\n" "\t[-h|--help]\n"
"\t[--ignorelockingfailure]\n" "\t[--ignorelockingfailure]\n"
"\t[--monitor {y|n}]\n" "\t[--monitor {y|n}]\n"
@ -77,7 +77,7 @@ xx(lvchange,
"\tLogicalVolume[Path] [LogicalVolume[Path]...]\n", "\tLogicalVolume[Path] [LogicalVolume[Path]...]\n",
alloc_ARG, autobackup_ARG, available_ARG, contiguous_ARG, force_ARG, alloc_ARG, autobackup_ARG, available_ARG, contiguous_ARG, force_ARG,
forcesync_ARG, ignorelockingfailure_ARG, major_ARG, minor_ARG, monitor_ARG, resync_ARG, ignorelockingfailure_ARG, major_ARG, minor_ARG, monitor_ARG,
partial_ARG, permission_ARG, persistent_ARG, readahead_ARG, partial_ARG, permission_ARG, persistent_ARG, readahead_ARG,
refresh_ARG, addtag_ARG, deltag_ARG, test_ARG, yes_ARG) refresh_ARG, addtag_ARG, deltag_ARG, test_ARG, yes_ARG)

View File

@ -175,7 +175,7 @@ static int lvchange_refresh(struct cmd_context *cmd, struct logical_volume *lv)
return 1; return 1;
} }
static int lvchange_forcesync(struct cmd_context *cmd, static int lvchange_resync(struct cmd_context *cmd,
struct logical_volume *lv) struct logical_volume *lv)
{ {
int active = 0; int active = 0;
@ -648,8 +648,8 @@ static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
if (doit) if (doit)
log_print("Logical volume \"%s\" changed", lv->name); log_print("Logical volume \"%s\" changed", lv->name);
if (arg_count(cmd, forcesync_ARG)) if (arg_count(cmd, resync_ARG))
if (!lvchange_forcesync(cmd, lv)) if (!lvchange_resync(cmd, lv))
return ECMD_FAILED; return ECMD_FAILED;
/* availability change */ /* availability change */
@ -680,9 +680,9 @@ int lvchange(struct cmd_context *cmd, int argc, char **argv)
&& !arg_count(cmd, persistent_ARG) && !arg_count(cmd, addtag_ARG) && !arg_count(cmd, persistent_ARG) && !arg_count(cmd, addtag_ARG)
&& !arg_count(cmd, deltag_ARG) && !arg_count(cmd, refresh_ARG) && !arg_count(cmd, deltag_ARG) && !arg_count(cmd, refresh_ARG)
&& !arg_count(cmd, alloc_ARG) && !arg_count(cmd, monitor_ARG) && !arg_count(cmd, alloc_ARG) && !arg_count(cmd, monitor_ARG)
&& !arg_count(cmd, forcesync_ARG)) { && !arg_count(cmd, resync_ARG)) {
log_error("Need 1 or more of -a, -C, -j, -m, -M, -p, -r, " log_error("Need 1 or more of -a, -C, -j, -m, -M, -p, -r, "
"--forcesync, --refresh, --alloc, --addtag, --deltag " "--resync, --refresh, --alloc, --addtag, --deltag "
"or --monitor"); "or --monitor");
return EINVALID_CMD_LINE; return EINVALID_CMD_LINE;
} }