aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_move.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_volume_move.go')
-rw-r--r--weed/shell/command_volume_move.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/shell/command_volume_move.go b/weed/shell/command_volume_move.go
index c404d8e30..675f65341 100644
--- a/weed/shell/command_volume_move.go
+++ b/weed/shell/command_volume_move.go
@@ -50,10 +50,6 @@ func (c *commandVolumeMove) Help() string {
func (c *commandVolumeMove) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
- if err = commandEnv.confirmIsLocked(); err != nil {
- return
- }
-
volMoveCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
volumeIdInt := volMoveCommand.Int("volumeId", 0, "the volume id")
sourceNodeStr := volMoveCommand.String("source", "", "the source volume server <host>:<port>")
@@ -63,6 +59,10 @@ func (c *commandVolumeMove) Do(args []string, commandEnv *CommandEnv, writer io.
return nil
}
+ if err = commandEnv.confirmIsLocked(); err != nil {
+ return
+ }
+
sourceVolumeServer, targetVolumeServer := pb.ServerAddress(*sourceNodeStr), pb.ServerAddress(*targetNodeStr)
volumeId := needle.VolumeId(*volumeIdInt)