User Tools

Site Tools


Mirroring the Master to the secondary master.

The objective is to make the secondary master's filesystem exactly the same as the primary so that in the event of a failover, the system will function as it did prior to the failure. tar is used in order to preserve meta information (owner, date, permissions, etc) of the files. Thus, first the tar archives are created on the master and copied over to the secondary master (node 0). Then, the backup master filesystem partitions are mounted on the slave with the / directory mapped to /mnt/root, and the /var and /usr directoried becoming /mnt/root/var and /mnt/root/usr. That accomplished, the tar files are unpacked into their filesystems. Finally, the filesystems are unmounted again so that they will be clean should failover be needed.

  • In summary: tar –one-file-system /scratch/root.tar /
  • tar –one-file-system /scratch/var.tar /var
  • tar / –one-file-system /scratch/usr.tar /usr
  • cd /scratch
  • bpcp root.tar var.tar usr.tar 0: (this step may take a moment)
  • bpsh 0 mkdir /mnt/root
  • mkdir /mnt/root
  • bpsh 0 mount /dev/hda3 /mnt/root
  • cd /mnt/root
  • bpsh 0 tar xvf /scratch/root.tar
  • bpsh 0 mount /dev/hda5 var
  • bpsh 0 tar xvf /scratch/var.tar
  • bpsh 0 mount /dev/hda6 usr
  • bpsh 0 tar xvf /scratch/usr.tar
  • bpsh 0 sync
  • bpsh 0 umount usr
  • bpsh 0 umount var
  • cd ..
  • bpsh 0 umount root
mirr.txt · Last modified: 2010/04/15 21:18 (external edit)