create and playback images - kraut-computing/siegfried GitHub Wiki

create an image of a Node

  1. fill disc with zeros (for compression):
dd if=/dev/zero of=/null bs=1G count=<free space on disc / 1 GB>
rm /null
  1. reboot with live CD
  2. mount destination eg:
mkdir /mnt/iso
mount -t nsf <ip>:export/iso /mnt/iso
  1. backup:
dd conv=sparse if=/dev/md126 of=/mnt/iso/$HOSTNAME_backup.iso

Playback an image

  1. boot from live cd
  2. mount remote image location
 mkdir /mnt/iso
 mount -t nfs <ip>:/export/iso /mnt/iso/
  1. copy image
dd if=/mnt/iso/<name>.iso of=/dev/md126
  1. mount new system
 mkdir /mnt/host
 mount /dev/md126 /mnt/host
  1. Edit node specific files: hostname and ip's
 vi /mnt/host/etc/conf.d/hostnames
 vi /etc/conf.d/net

Direct copy to other node

From live cd on target node

ssh root@<source ip> -o CompressionLevel=0 "dd if=/dev/md126 bs=10M" | dd of=/dev/md126
⚠️ **GitHub.com Fallback** ⚠️