• access to a full set of all gluster brick backups
  • A freshly provisioned cluster with glfs server and client daemonsets running (emtpy globalfs) provisioned from the same inventory - minimally the same gluster global fs configuration and container versions


  • a fully HA gluster globalfs on the new cluster with the state from time of the backup


  1. master: kubectl get ds glfs-server-global --namespace=kube-system -o yaml > /tmp/server.yml
  2. master: kubectl get ds glfs-client-global --namespace=kube-system -o yaml > /tmp/client.yml
  3. master: kubectl delete -f /tmp/client.yml
  4. master: kubectl exec -it bash <server-pod> --namespace=kube-system
    1. <glpod>: gluster vol stop global
    2. <glpod>: gluster vol del global
  5. master: kubectl delete -f /tmp/server.yml
  6. for each glfs{1,2,3,4}:
    1. ssh <host>:
    2. <ssh>: sudo  rm -rf /media/brick0/brick
    3. <ssh>: sudo -s
      1. <su>: copy(ftp, scp, sshfs,or similar) the brick xfs dump to /media/brick0
      2. exit
    4. <ssh>: docker run --privileged --rm -it -v /var/lib/glusterd:/var/lib/glusterd -v /var/log/glusterfs:/var/log/glusterfs -v /etc/glusterfs:/etc/glusterfs -v /media/brick0:/media/brick0 ndslabs/cluster-backup bash
      1. <docker>: cd /media/brick0
      2. <docker>: xfsrestore -f <file> .
      3. <docker>: exit
    5.  <su>: exit
  7. master: kubectl create -f /tmp/server.yml
  8. master: kubectl exec -it <glfs-server-global-rh7hs> bash --namespace=kube-system
    1. <glpod>:  . /etc/glconfig/glfs-config-global
    2. <glpod>:  for i in ${PEERS}; do gluster peer probe $i; done
    3. <glpod>:  gluster vol create global replica 2 transport tcp $(for i in ${PEERS}; do echo $i:/media/brick0/brick; done) force
    4. <glpod>:  gluster vol set global nfs.disable on
    5. <glpod>:  gluster vol start global
    6. <glpod>:  gluster vol quota global enable
    7. <glpod>: exit
  9. master:  kubectl create -f /tmp/client.yml
  10. <any-glfs-client>:  sudo du -hc --max-depth=1 /var/glfs/global/     # force glfs to reset size and quota metadata


  • No labels