Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add fs.mergeVolumes command into shell #4907

Merged
merged 2 commits into from Oct 10, 2023

Conversation

yeganemehr
Copy link
Contributor

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 and Cookie and just VolumeId would update.

How is the PR tested?

I tested locally and on my own cluster.

Checks

  • I have added unit tests if possible.
  • I will add related wiki document changes and link to this PR after merging.

@yeganemehr yeganemehr changed the title add fs.compact command into shell add fs.mergeVolumes command into shell Oct 10, 2023
@chrislusf chrislusf merged commit 3e8604a into seaweedfs:master Oct 10, 2023
5 checks passed
@kmlebedev
Copy link
Contributor

@yeganemehr Thank you very much, the need for this has been long overdue, but I haven’t gotten around to implementing it.

@yeganemehr
Copy link
Contributor Author

@kmlebedev
Thanks to you and @chrislusf for you wonderful work in this project.

@Cottand Cottand mentioned this pull request Oct 31, 2023
2 tasks
@yeganemehr yeganemehr deleted the filer-compact branch November 14, 2023 13:16
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants