Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: MSmith on July 25, 2006, 02:57:25 PM
-
I've done this with 6.0 using Norton Ghost; it recognized the partitions and let me resize / while keeping /boot and /swap the same. Apparently the 7.0 LVM setup is not amenable to this approach, yes? So ... is there a way to move my new 7.0 final home server from its current 120GB hard drive to a spiffy 400GB drive?
-
I've done this with 6.0 using Norton Ghost; it recognized the partitions and let me resize / while keeping /boot and /swap the same. Apparently the 7.0 LVM setup is not amenable to this approach, yes? So ... is there a way to move my new 7.0 final home server from its current 120GB hard drive to a spiffy 400GB drive?
http://www.tldp.org/HOWTO/LVM-HOWTO/
-
MSmith
The techniques outlined in this bug should also work ie install OS to the larger disk, and then restore from the mounted smaller disk.
http://bugs.contribs.org/show_bug.cgi?id=615
-
I succesfully copied my 7.0 installation from a 40GB ide drive to a 200GB drive though it did involve a bit of mucking around and a crash course in raid and lvm. I will try to post a howto in the next week or so, but will give a brief outline in case you are both inpatient and willing to give it a go. Broadly, 7.0 on a single disk (say hda) uses two raid one arrays (md1 and md2) created with one missing device. md1 corresponds to hda1and is mounted as the boot partition. md2 corresponds to hda2 and is host to two logical volumes, one for the root partition and one for swap.
The process first involves duplicating the existing drive to the new drive (I used dd). I then deleted the hda2 partition on the new drive and recreated so as take up the balance of the disk. This has the unfortunate side effect of wiping the raid superblock on that partition.
I used Ubuntu 6.06 which I booted before connecting the new drive via usb as sda. I then made sure that both lvm and raid were shut down, and created a suitable mdadm.conf file (this may not be necessary but I had had some problems and took no chances). I used mdadm create mode to restore the superblock to sda2 and then assembled the array using mdadm. A quick cat /proc/mdstat should show md1 and md2 and no other raid arrays. If this is true use the pvresize command on /dev/md2. Then start lvm (/etc/init.d/lvm restart). Then enlarge the ext3 fileysystem on /dev/vg_primary/lv_root to take up the whole of the disk. Finally, use the lvresize command on /dev/vg_primary/lv_root. On my 200GB disk I first enlarged to 185GB with the -L option, then used the -l option to fine tune.
That should be it. Take the drive from the usb case, install in your sme box and hopefully all is well.
I have written this from memory and it is a case of all care and no responsibility. If I have missed a step or have got things in the wrong order or just plain got things wrong this is your problem though I and no doubt others will try to help. I actually made an image of my old drive on another drive as this procedure lends itself to typing a wrong letter or number and destroying, perhaps irrectrievably, your data.
Good luck.
-
have you considered backing the system up to desktop and then installing SME on the new drive and restoring the backup on the new drive?
-
That is a much better way in some circumstances. However, desktop backup is currently limited to 4G, not feasible here. Other backup solutions are of course possible. However, in my case, I have some extra packages installed, configured and running well which I would have to reinstall on a new server.