Skip to content

Volume managment

Przemysław Rekucki edited this page May 14, 2024 · 10 revisions
{ deploy: {
   net: [{ id: "id", ip: "10.0.0.2", mask" "255.255.0.0" }],
   hosts: {"master": "10.0.0.1"},
   nodes: {"10.0.0.1": "0xdeadbeef"},
   progress : {updateInterval: "300ms"},
   volumes: {
      "/": { overflow: { size: "10g", errors: "panic" } 
   }
}

Volumes

can be in 2 forms. array of string is list that overides image defined volumes. eg.

{ 
  deploy: {
    volumes: ["/golem/input", "/golem/output"]
  }
}

if it is mapping keys are mount points and values are volume definitions.

for example:

{ 
  deploy: {
    volumes: {
        "/golem/input": {}, 
        "/golem/output": {}
        "/": { ram: { size: 1g" }
    }
  }
}

Definition for rootfs.

Veraints:

ram

Name Type Description Notes
size String [optional] [default to null]

storage

Name Type Description Notes
size String format for storage 100m, 10g, etc. [optional] [default to null]
preallocate String same as size [optional] [default to null]
errors String possible values continue, remount-ro, panic [optional] [default to null]

Examples

  1. Root file system that can grow upto 1 gigabyte. no preallocation. container will panic if error occurs.
{ 
  deploy: {
    volumes: {
        "/": { storage: { size: 1g",  errors: "panic" }
    }
  }
}
  1. Root fs, with prealoocated 10GB storage.
{ 
  deploy: {
    volumes: {
        "/": { overflow: { size: 10g",  preallocate: "10g" }
    }
  }
}
  1. Root fs with in memory overflow size 1g
{ 
  deploy: {
    volumes: {
        "/": { tmpfs: { size: 1g" }
    }
  }
}
  1. Disable image volume definition for /golem/input
{ 
  deploy: {
    volumes: {
        "/golem/input": null
    }
  }
}
Clone this wiki locally