aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_fix_replication.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_volume_fix_replication.go')
-rw-r--r--weed/shell/command_volume_fix_replication.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/weed/shell/command_volume_fix_replication.go b/weed/shell/command_volume_fix_replication.go
index 7fa6e5ed8..29bfe3f76 100644
--- a/weed/shell/command_volume_fix_replication.go
+++ b/weed/shell/command_volume_fix_replication.go
@@ -46,7 +46,7 @@ func (c *commandVolumeFixReplication) Help() string {
If the free slots satisfy the replication requirement, the volume content is copied over and mounted.
volume.fix.replication # do not take action
- volume.fix.replication -force # actually deleting or copying the volume files and mount the volume
+ volume.fix.replication -apply # actually deleting or copying the volume files and mount the volume
volume.fix.replication -collectionPattern=important* # fix any collections with prefix "important"
Note:
@@ -66,7 +66,9 @@ func (c *commandVolumeFixReplication) Do(args []string, commandEnv *CommandEnv,
volFixReplicationCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
c.collectionPattern = volFixReplicationCommand.String("collectionPattern", "", "match with wildcard characters '*' and '?'")
- applyChanges := volFixReplicationCommand.Bool("force", false, "apply the fix")
+ applyChanges := volFixReplicationCommand.Bool("apply", false, "apply the fix")
+ // TODO: remove this alias
+ applyChangesAlias := volFixReplicationCommand.Bool("force", false, "apply the fix (alias for -apply)")
doDelete := volFixReplicationCommand.Bool("doDelete", true, "Also delete over-replicated volumes besides fixing under-replication")
doCheck := volFixReplicationCommand.Bool("doCheck", true, "Also check synchronization before deleting")
maxParallelization := volFixReplicationCommand.Int("maxParallelization", DefaultMaxParallelization, "run up to X tasks in parallel, whenever possible")
@@ -76,8 +78,9 @@ func (c *commandVolumeFixReplication) Do(args []string, commandEnv *CommandEnv,
if err = volFixReplicationCommand.Parse(args); err != nil {
return nil
}
- infoAboutSimulationMode(writer, *applyChanges, "-force")
+ handleDeprecatedForceFlag(writer, volFixReplicationCommand, applyChangesAlias, applyChanges)
+ infoAboutSimulationMode(writer, *applyChanges, "-apply")
commandEnv.noLock = !*applyChanges
if err = commandEnv.confirmIsLocked(args); *applyChanges && err != nil {