diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2022-04-26 22:09:06 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-26 22:09:06 -0700 |
| commit | b557faf17527475bf7e55f4b167a896a80b64f6c (patch) | |
| tree | 56e9543c9462c7d3347b6e55da589803c9cfc4db /weed/shell/command_volume_check_disk.go | |
| parent | eb49bd5638c9e9860fe4ba7fc54a2e78a84e9941 (diff) | |
| parent | 67476d830a0001fe514b6482edebc518722fe9ba (diff) | |
| download | seaweedfs-b557faf17527475bf7e55f4b167a896a80b64f6c.tar.xz seaweedfs-b557faf17527475bf7e55f4b167a896a80b64f6c.zip | |
Merge pull request #2967 from kmlebedev/vl_chk_disk_vlid
volume.check.disk add param volumeId
Diffstat (limited to 'weed/shell/command_volume_check_disk.go')
| -rw-r--r-- | weed/shell/command_volume_check_disk.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/shell/command_volume_check_disk.go b/weed/shell/command_volume_check_disk.go index 53284096d..daa64c1bd 100644 --- a/weed/shell/command_volume_check_disk.go +++ b/weed/shell/command_volume_check_disk.go @@ -45,6 +45,7 @@ func (c *commandVolumeCheckDisk) Do(args []string, commandEnv *CommandEnv, write fsckCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError) slowMode := fsckCommand.Bool("slow", false, "slow mode checks all replicas even file counts are the same") verbose := fsckCommand.Bool("v", false, "verbose mode") + volumeId := fsckCommand.Uint("volumeId", 0, "the volume id") applyChanges := fsckCommand.Bool("force", false, "apply the fix") nonRepairThreshold := fsckCommand.Float64("nonRepairThreshold", 0.3, "repair when missing keys is not more than this limit") if err = fsckCommand.Parse(args); err != nil { @@ -70,6 +71,9 @@ func (c *commandVolumeCheckDisk) Do(args []string, commandEnv *CommandEnv, write } for _, replicas := range volumeReplicas { + if *volumeId > 0 && replicas[0].info.Id != uint32(*volumeId) { + continue + } slices.SortFunc(replicas, func(a, b *VolumeReplica) bool { return fileCount(a) > fileCount(b) }) |
