Skip to content

Instantly share code, notes, and snippets.

@GlenDC
Created May 24, 2017 14:49
Show Gist options
  • Save GlenDC/5c9f0e6c4574f160f93f9d98afefc34a to your computer and use it in GitHub Desktop.
Save GlenDC/5c9f0e6c4574f160f93f9d98afefc34a to your computer and use it in GitHub Desktop.
g8stor copy vdisk examples

config.yml:

storageClusters:
  clusterA:
    dataStorage:
      - address: localhost:6379
    metaDataStorage:
      address: localhost:6379
  clusterB:
    dataStorage:
      - address: localhost:6380
    metaDataStorage:
      address: localhost:6380
vdisks:
  vdiskA:
    blockSize: 4096
    size: 1
    storageCluster: clusterA
    type: boot

to copy vdiskA as a new vdisk (vdiskB) on the same storage cluster (clusterA), I would do:

$ g8stor copy vdisk vdiskA vdiskB

which would be the same as the more explicit version:

$ g8stor copy vdisk vdiskA vdiskB clusterA --config config.yml

to copy vdiskA as a new vdisk (vdiskA) on a different storage cluster (clusterB), I would do:

$ g8stor copy vdisk vdiskA vdiskA clusterB

the following command would be illegal, and abort with an error:

$ g8stor copy vdisk vdiskA vdiskA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment