ltcp/aufgabe4.4/clone.sh
2013-12-08 21:13:48 +01:00

21 lines
457 B
Bash

#!/bin/sh
IP="10.20.0.1"
# our partclone.dd wrapper script to support ext4
cd /usr/sbin
mv partclone.dd partclone.dd-backup
wget http://$IP/pxelinux/scripts/partclone.dd-clone -O partclone.dd
chmod +x partclone.dd
# mount NFS and symlink image folder
mount -t nfs $IP:/cluster /mnt
rm -rf /home/partimag
ln -s /mnt/images /home/partimag
# save image and umount NFS afterwards
ocs-sr -b -p /bin/true -z3 saveparts computenode sda1 sda3
umount /mnt
bash