UpgradeDisk

From SME Server
Revision as of 06:47, 29 May 2008 by RayMitchell (talk | contribs) (instruction clarified)
Jump to navigation Jump to search

Upgrade Disk

Hard drive restore requires a complete system. It is meant to take a hard drive from a system, mount it, and do a restore from it.

It does not restore contribs or manually added software, except if it's in an Ibay and instructs you to move custom-templates.

Summarised from http://forums.contribs.org/index.php?topic=30745.0

  1. On the old SME server prior to shutting down, at the root command prompt issue the command /sbin/e-smith signal-event pre-backup then shutdown & remove the drive
  2. On the new machine do a fresh install of sme7
  3. Shut down & install old drive and start machine.
  4. mkdir /mnt/tmp
  5. mount /dev/hdb2 /mnt/tmp (adjust "hdb2" according to where the old drive is installed).
  6. db configuration setprop backup Program CopyFromDisk status enabled
  7. signal-event pre-restore
  8. signal-event restore-tape /mnt/tmp (note: this step may take a long time depending on how much data is being restored
  9. cd /etc/e-smith
  10. mv templates-custom templates-custom.old
  11. mkdir templates-custom
  12. mv templates-user-custom templates-user-custom.old
  13. mkdir templates-user-custom
  14. signal-event post-upgrade
  15. signal-event reboot
  16. Shutdown and remove old drive


Additional tips from http://forums.contribs.org/index.php?topic=39892.0 which refers to http://forums.contribs.org/index.php?topic=37686.0

The original disk will not mount due to volume group name conflicts with the existing drive(s). Follow this procedure to rename the volume group on the original disk:

Boot from SME Server 7.1 (or newer) install CD

press F5

type "sme rescue" at the command prompt and hit enter

Note: don't start the network and skip mounting the filesystem.

mdadm -AR /dev/md5 /dev/hdx2
lvm vgscan
lvm vgs -v
lvm vgchange -a n
lvm vgrename orig_vg_name new_vg_name
exit

Now remove the CD and reboot

mdadm -AR /dev/md5 /dev/hdx2
vgscan
vgchange -a y new_vg_name
mkdir /mnt/tmp
mount /dev/new_vg_name/root /mnt/tmp
  Note:
In some rare cases your VolumeGroup name listed in the last line might be different, more information can be found in bugzilla: 3883.


You should now be able to view all your old data under /mnt/tmp

Follow the steps listed above to use CopyFromDisk to restore the data.