add fs.mergeVolumes command into shell - #4907
Merged
Merged
Conversation
chrislusf
reviewed
Oct 10, 2023
Contributor
|
@yeganemehr Thank you very much, the need for this has been long overdue, but I haven’t gotten around to implementing it. |
Contributor
Author
|
@kmlebedev |
2 tasks
kmlebedev
pushed a commit
to kmlebedev/seaweedfs
that referenced
this pull request
Dec 22, 2023
* add fs.compact command into shell * rename fs.compact to fs.mergeVolumes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Fidin 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
FileKeyandCookieand justVolumeIdwould update.How is the PR tested?
I tested locally and on my own cluster.
Checks