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

How to remove a volume on a node in Eru #470

Open
jasonjoo2010 opened this issue Aug 31, 2021 · 2 comments
Open

How to remove a volume on a node in Eru #470

jasonjoo2010 opened this issue Aug 31, 2021 · 2 comments
Assignees

Comments

@jasonjoo2010
Copy link
Contributor

Background

Sometimes, we added wrong volume to a node. But we only can change the capacity or resource declaration using eru-cli node set but cannot remove it completely. So things could become:

  init_volume:
    /data: 945966546944
    /data1: 945966546944
    /data2: 945966546944
    /data3: 945966546944
    /data4: 945966546944
    /data5: 945966546944
    /data6: 945966546944
    /data7: 945966546944
    /data8: 0
  memory: 719407022080
  memory_used: 380104605696
  name: -------
  podname: --------
  storage: 2516850835456
  storage_used: 5050881540096
  volume:
    /data: 945966546944
    /data1: 224412041216
    /data2: 224412041216
    /data3: 224412041216
    /data4: 224412041216
    /data5: 224412041216
    /data6: 224412041216
    /data7: 224412041216
    /data8: 0
  volume_used: 5050881540096

Expectation

Able to remove it completely. So is there a way to do so?

@jschwinger233 jschwinger233 self-assigned this Aug 31, 2021
@jschwinger233
Copy link
Member

The short answer is: set it again, for your case, eru-cli node set --volume /data8:0 $nodename


Due to current implementation, to discard an unused volume, you must follow these steps:

  1. make sure no container is using this volume
  2. set the available bytes of the volume to zero: cli node set --volume /vol:0 will do
  3. delete the volume from meta, using the exactly same command as above: cli node set --volume /vol:0

@jasonjoo2010
Copy link
Contributor Author

The short answer is: set it again, for your case, eru-cli node set --volume /data8:0 $nodename

Due to current implementation, to discard an unused volume, you must follow these steps:

  1. make sure no container is using this volume
  2. set the available bytes of the volume to zero: cli node set --volume /vol:0 will do
  3. delete the volume from meta, using the exactly same command as above: cli node set --volume /vol:0

Yeah I have tried both set to zero nor set it using negative size to zero by delta. But the result didn't change.

So you mean I should execute the set to zero twice and it will work as what I expect?

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

No branches or pull requests

2 participants