Skip to content

add fs.mergeVolumes command into shell - #4907

Merged
chrislusf merged 2 commits into
seaweedfs:masterfrom
yeganemehr:filer-compact
Oct 10, 2023
Merged

add fs.mergeVolumes command into shell#4907
chrislusf merged 2 commits into
seaweedfs:masterfrom
yeganemehr:filer-compact

Conversation

@yeganemehr

Copy link
Copy Markdown
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.

Comment thread weed/shell/command_fs_compact.go Outdated
@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
@kmlebedev

Copy link
Copy Markdown
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
Copy Markdown
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.

3 participants