add fs.mergeVolumes command into shell #4907
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem are we solving?
Half-full volumes can easily cause volume-servers ran out of volumes although they may have plenty of free disk space.
As it already suggested in this discussion if We could go throughout all files in filer and move all chunks to another volume and update they
Fid
in the filer store we can empty those volumes.How are we solving the problem?
My solution heavily inspired by
fs.meta.changeVolumeId
.We traverse on all files & directories and move they chunks to another volume.
In this action, chunks keep their
FileKey
andCookie
and justVolumeId
would update.How is the PR tested?
I tested locally and on my own cluster.
Checks