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

ccg: Avoid a complete match of the list of vdisks on different physical disks of nodes #811

Open
ikopylov opened this issue May 24, 2023 · 0 comments

Comments

@ikopylov
Copy link
Member

Example of a bad cluster.yaml:

nodes:
  - name: local-node-1
    address: "10.5.7.195:20000"
    disks:
      - name: disk1
        path: /opt/disk1
  - name: local-node-2
    address: "10.5.7.241:20000"
    disks:
      - name: disk1
        path: /opt/disk1
  - name: local-node-3
    address: "10.5.7.217:20000"
    disks:
      - name: disk1
        path: /opt/disk1
  - name: local-node-4
    address: "10.5.7.212:20000"
    disks:
      - name: disk1
        path: /opt/disk1
vdisks:
  - id: 0
    replicas:
      - node: local-node-1
        disk: disk1
      - node: local-node-2
        disk: disk1
  - id: 1
    replicas:
      - node: local-node-3
        disk: disk1
      - node: local-node-4
        disk: disk1
  - id: 2
    replicas:
      - node: local-node-1
        disk: disk1
      - node: local-node-2
        disk: disk1
  - id: 3
    replicas:
      - node: local-node-3
        disk: disk1
      - node: local-node-4
        disk: disk1
racks: []
distribution_func: Mod

Here local-node-1 and local-node-2 are mirrors of each other. They contains vdisk 0 and vdisk 2. The same is for local-node-3 and local-node-4. If both nodes stops working, we lost access to 2 vdisks.

The following distribution is better:

vdisks:
  - id: 0
    replicas:
      - node: local-node-1
        disk: disk1
      - node: local-node-2
        disk: disk1
  - id: 1
    replicas:
      - node: local-node-3
        disk: disk1
      - node: local-node-4
        disk: disk1
  - id: 2
    replicas:
      - node: local-node-1
        disk: disk1
      - node: local-node-3
        disk: disk1
  - id: 3
    replicas:
      - node: local-node-2
        disk: disk1
      - node: local-node-4
        disk: disk1

In this case if 2 nodes is turned off, then we lost only 1 vdisk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant