aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_tier_download.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2021-02-23 13:41:30 +0800
committerGitHub <noreply@github.com>2021-02-23 13:41:30 +0800
commit620b91f23eaf5718088dc9ddcf91540967d0c8a6 (patch)
tree04e92a8f92b548e26080040d009f23a51d9cc521 /weed/shell/command_volume_tier_download.go
parent690d7c10b826b53bf823faef76603cd6ad83aa1d (diff)
parent90cdf9dcace5595b31104df3a3b7e4038a7db341 (diff)
downloadseaweedfs-620b91f23eaf5718088dc9ddcf91540967d0c8a6.tar.xz
seaweedfs-620b91f23eaf5718088dc9ddcf91540967d0c8a6.zip
Merge pull request #73 from chrislusf/master
sync
Diffstat (limited to 'weed/shell/command_volume_tier_download.go')
-rw-r--r--weed/shell/command_volume_tier_download.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/weed/shell/command_volume_tier_download.go b/weed/shell/command_volume_tier_download.go
index d31c8c031..33166ce65 100644
--- a/weed/shell/command_volume_tier_download.go
+++ b/weed/shell/command_volume_tier_download.go
@@ -56,7 +56,7 @@ func (c *commandVolumeTierDownload) Do(args []string, commandEnv *CommandEnv, wr
vid := needle.VolumeId(*volumeId)
// collect topology information
- topologyInfo, err := collectTopologyInfo(commandEnv)
+ topologyInfo, _, err := collectTopologyInfo(commandEnv)
if err != nil {
return err
}
@@ -86,9 +86,11 @@ func collectRemoteVolumes(topoInfo *master_pb.TopologyInfo, selectedCollection s
vidMap := make(map[uint32]bool)
eachDataNode(topoInfo, func(dc string, rack RackId, dn *master_pb.DataNodeInfo) {
- for _, v := range dn.VolumeInfos {
- if v.Collection == selectedCollection && v.RemoteStorageKey != "" && v.RemoteStorageName != "" {
- vidMap[v.Id] = true
+ for _, diskInfo := range dn.DiskInfos {
+ for _, v := range diskInfo.VolumeInfos {
+ if v.Collection == selectedCollection && v.RemoteStorageKey != "" && v.RemoteStorageName != "" {
+ vidMap[v.Id] = true
+ }
}
}
})