Giter Site home page Giter Site logo

Comments (10)

chrislusf avatar chrislusf commented on July 30, 2024 1

Added a tool, "change_replication", in the "unmaintained" section. It can be used to view or change a volume's replication setting.

from seaweedfs.

chrislusf avatar chrislusf commented on July 30, 2024
  1. The volumes are replicated.
  2. Could be a feature later. Now this is not possible. Theoretically you just need to write some code to change the replication type in the volume's super block, and make a copy of the volume. But there are no tools/interface/api to do this yet.
  3. Shutdown servers. Move volume 1 from B to C. Restart the servers.

from seaweedfs.

fedotxxl avatar fedotxxl commented on July 30, 2024

Theoretically you just need to write some code to change the replication type in the volume's super block Can you provide sample? I think adding one more replica is pretty common task

from seaweedfs.

chrislusf avatar chrislusf commented on July 30, 2024

The file go/storage/volume_super_block.go has related code.

The superblock is a 8 bytes block just for meta data about the volume. The second byte is the replica placement byte. If you need to add one more replica, basically you can change this specific byte.

/*

  • Super block currently has 8 bytes allocated for each volume.
  • Byte 0: version, 1 or 2
  • Byte 1: Replica Placement strategy, 000, 001, 002, 010, etc
  • Byte 2 and byte 3: Time to live. See TTL for definition
  • Rest bytes: Reserved
    */
    type SuperBlock struct {
    version Version
    ReplicaPlacement *ReplicaPlacement
    Ttl *TTL
    }

from seaweedfs.

chrislusf avatar chrislusf commented on July 30, 2024

Need to add a tool to change a volume's replication setting.

from seaweedfs.

yanyiwu avatar yanyiwu commented on July 30, 2024

2. Could be a feature later. Now this is not possible. Theoretically you just need to write some code to change the replication type in the volume's super block, and make a copy of the volume.

This feature is strong demand. I am waiting for it too.

from seaweedfs.

atrniv avatar atrniv commented on July 30, 2024

+1

from seaweedfs.

atrniv avatar atrniv commented on July 30, 2024

Is there any way to do this manually for now ? I need to do this for a migration of some production servers to a new cluster.

from seaweedfs.

wu0407 avatar wu0407 commented on July 30, 2024

+1

from seaweedfs.

mosic avatar mosic commented on July 30, 2024

@chrislusf Can you give an update on this feature, is it on the roadmap?

If I understood it correctly, the way it is now I would need to know in advance what kind of replication I want to use, and if I wanted to change it later (e.g. from 100 to 200) I'm out of luck. Is that right?

from seaweedfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.