|
@ -8,6 +8,7 @@ import ( |
|
|
"github.com/chrislusf/seaweedfs/weed/wdclient" |
|
|
"github.com/chrislusf/seaweedfs/weed/wdclient" |
|
|
"io" |
|
|
"io" |
|
|
"path/filepath" |
|
|
"path/filepath" |
|
|
|
|
|
"strings" |
|
|
"time" |
|
|
"time" |
|
|
|
|
|
|
|
|
"github.com/chrislusf/seaweedfs/weed/storage/needle" |
|
|
"github.com/chrislusf/seaweedfs/weed/storage/needle" |
|
@ -136,12 +137,14 @@ func doVolumeTierMove(commandEnv *CommandEnv, writer io.Writer, vid needle.Volum |
|
|
for _, loc := range locations { |
|
|
for _, loc := range locations { |
|
|
if loc.Url != dst.dataNode.Id { |
|
|
if loc.Url != dst.dataNode.Id { |
|
|
if err = deleteVolume(commandEnv.option.GrpcDialOption, vid, loc.Url); err != nil { |
|
|
if err = deleteVolume(commandEnv.option.GrpcDialOption, vid, loc.Url); err != nil { |
|
|
|
|
|
if !strings.Contains(err.Error(), "not found") { |
|
|
fmt.Fprintf(writer, "failed to delete volume %d on %s: %v\n", vid, loc.Url, err) |
|
|
fmt.Fprintf(writer, "failed to delete volume %d on %s: %v\n", vid, loc.Url, err) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if !hasFoundTarget { |
|
|
if !hasFoundTarget { |
|
|
fmt.Fprintf(writer, "can not find disk type %s for volume %d\n", toDiskType.ReadableString(), vid) |
|
|
fmt.Fprintf(writer, "can not find disk type %s for volume %d\n", toDiskType.ReadableString(), vid) |
|
|