aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_copy.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2025-06-16 19:39:19 +0500
committerGitHub <noreply@github.com>2025-06-16 07:39:19 -0700
commit958d88cb8562f4b7b1f4072cafae251729eeb38a (patch)
tree0577c74e05fdc1ff962a337e67936e32c76f1e00 /weed/shell/command_volume_copy.go
parentc26299b05a67135636664fbbe57d9328a67288ad (diff)
downloadseaweedfs-958d88cb8562f4b7b1f4072cafae251729eeb38a.tar.xz
seaweedfs-958d88cb8562f4b7b1f4072cafae251729eeb38a.zip
[shell] volume copy add param noLock (#6871)
Diffstat (limited to 'weed/shell/command_volume_copy.go')
-rw-r--r--weed/shell/command_volume_copy.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/shell/command_volume_copy.go b/weed/shell/command_volume_copy.go
index be00cb18f..5c7cc33b0 100644
--- a/weed/shell/command_volume_copy.go
+++ b/weed/shell/command_volume_copy.go
@@ -41,11 +41,14 @@ func (c *commandVolumeCopy) Do(args []string, commandEnv *CommandEnv, writer io.
volumeIdInt := volCopyCommand.Int("volumeId", 0, "the volume id")
sourceNodeStr := volCopyCommand.String("source", "", "the source volume server <host>:<port>")
targetNodeStr := volCopyCommand.String("target", "", "the target volume server <host>:<port>")
+ noLock := volCopyCommand.Bool("noLock", false, "do not lock the admin shell at one's own risk")
if err = volCopyCommand.Parse(args); err != nil {
return nil
}
- if err = commandEnv.confirmIsLocked(args); err != nil {
+ if *noLock {
+ commandEnv.noLock = true
+ } else if err = commandEnv.confirmIsLocked(args); err != nil {
return
}