Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: thomasch on December 19, 2007, 04:30:31 AM

Title: Moving SME to new hardware, the shortest path...
Post by: thomasch on December 19, 2007, 04:30:31 AM
I try to move SME from my old P4 with 80GB harddisk to my Xeon with 320GB harddisk.

I try use this way to move.
http://wiki.contribs.org/Moving_SME_to_new_Hardware (http://wiki.contribs.org/Moving_SME_to_new_Hardware)
However, I have installed tons of contribs on my old server and rpms.
So, when I view the /var/affa/prodserv/rpms-missing.txt I have a very very long list of missing rpms.

My question is :
If I install ALL the missing rpms including the contribs, will ALL the configuration and data remains EXACTLY the same as old server after I do --rise?

Is there any shorter path to move SME to new hardware?
(I don't want to install all the missing rpms, I am lazy to do that)

Title: Re: Moving SME to new hardware, the shortest path...
Post by: mmccarn on December 19, 2007, 05:47:39 AM
You may be able to use the "backup to USB disk" option (putty to your SME, type "su admin", there's a menu item about backup).

This backup can be restored to a new box during install (there's a special option when installing a new SME 7.2 system to restore from a USB backup).

Caveat: I don't know if this backup includes the extra rpms, but it may.
Title: Re: Moving SME to new hardware, the shortest path...
Post by: raem on December 19, 2007, 06:43:24 PM
thomasch

Quote
Is there any shorter path to move SME to new hardware?

A good search & read of the FAQ would have found this.
http://wiki.contribs.org/Raid#Upgrading_the_Hard_Drive_Size

It advises how to "grow" your RAID1 hard disk ie increase it from 80 to 320Gb.
I think that's what you want, and it will be the quickest and easiest way as nothing needs to be reinstalled.

Do this on your old server first and then transfer the 320Gb drives to the new server and run the CD update to recognise & install drivers for the newer hardware.
Title: Re: Moving SME to new hardware, the shortest path...
Post by: raem on December 19, 2007, 06:46:52 PM
mmccarn

Quote
You may be able to use the "backup to USB disk" option
Caveat: I don't know if this backup includes the extra rpms, but it may

It's a normal sme backup, which requires reinstall of add on contribs.
Title: Re: Moving SME to new hardware, the shortest path...
Post by: psoren on December 20, 2007, 08:53:06 AM
A good search & read of the FAQ would have found this.
http://wiki.contribs.org/Raid#Upgrading_the_Hard_Drive_Size

Ray,

Can this be done on a RAID1 where one drive is taken out? Then i can add the second drive and sync once the first one is grown. For me that's just a safer way if something screwes up. (Yes, i also have backup  8-) )

Per
Title: Re: Moving SME to new hardware, the shortest path...
Post by: raem on December 20, 2007, 12:13:14 PM
psoren

Quote
Can this be done on a RAID1 where one drive is taken out?

Well that's the way it is meant to be done.
eg if you have 2x80Gb in software RAID1
Before starting make sure they are in sync with
cat /proc/mdstat

Shutdown & remove the first 80Gb drive and replace it with the first 320Gb drive.
Login to the admin console menu and select to resync the array..
The first 320Gb drive will only be partitioned as a 80Gb drive.
Wait until both drives sync (this may take from 1 to 3 hours).
Check drives are synced

Shutdown & remove the second 80Gb drive and replace it with the second 320Gb drive.
Login to the admin console menu and select to resync the array..
The 320Gb drive will only be partitioned as a 80Gb drive.
Wait until both drives sync (this may take from 1 to 3 hours).
Check drives are synced

You now have two 320Gb drives in a syncd RAID1 array, with only 80Gb available space.

Then perform the commands to "grow" the array as per the wiki, and when complete, the new size should be the full 320Gb.

You have the complete old system still on both the 80Gb drives. Note which is hda & hdc (or whichever ie sda sdb etc) as they need to be reconnected to the same place if you wish to reinstate the old system.
Title: Re: Moving SME to new hardware, the shortest path...
Post by: psoren on December 20, 2007, 01:06:51 PM
psoren

Well that's the way it is meant to be done.
eg if you have 2x80Gb in software RAID1
Before starting make sure they are in sync with
cat /proc/mdstat

Shutdown & remove the first 80Gb drive and replace it with the first 320Gb drive.
Login to the admin console menu and select to resync the array..
The first 320Gb drive will only be partitioned as a 80Gb drive.
Wait until both drives sync (this may take from 1 to 3 hours).
Check drives are synced

Shutdown & remove the second 80Gb drive and replace it with the second 320Gb drive.
Login to the admin console menu and select to resync the array..
The 320Gb drive will only be partitioned as a 80Gb drive.
Wait until both drives sync (this may take from 1 to 3 hours).
Check drives are synced

You now have two 320Gb drives in a syncd RAID1 array, with only 80Gb available space.

Then perform the commands to "grow" the array as per the wiki, and when complete, the new size should be the full 320Gb.

You have the complete old system still on both the 80Gb drives. Note which is hda & hdc (or whichever ie sda sdb etc) as they need to be reconnected to the same place if you wish to reinstate the old system.


OK, i didn't make myself completely clear, sorry...

My status is that i already have 2 new bigger drives installed and running because one drive failed and i just replaced them both with new bigger drives. (Sync one, sync the next..) I didn't know at the time that it was possible to grow the partitions, so i just accepted the fact that i don't use the full capacity.
Now i would like to grow them since space is running low.
So my question is:

Can i disconnect one drive and have that as a full system backup and just grow the one left in the machine. Then when that's done, add the disconnected one and sync to the grown one?

Thinking about it, i could also sync a third drive to have a full backup, and then grow both, hmmmm......

I want to avoid doing a new install and use a normal backup, since i have done some finetuning and installed several contribs.

Per
Title: Re: Moving SME to new hardware, the shortest path...
Post by: raem on December 20, 2007, 01:47:34 PM
psoren

Quote
Can i disconnect one drive and have that as a full system backup and just grow the one left in the machine. Then when that's done, add the disconnected one and sync to the grown one?

That should work OK, but it's an opinion rather than factual knowledge.

Keep in mind when you replace any raid member, that the new drive should be blank, so delete any partitions on the drive you are about to insert, before you insert it.
Use delpart.exe or similar or the dd command to delete partitions or blank out the drive.


Quote
Thinking about it, i could also sync a third drive to have a full backup, and then grow both..

I have been using & suggesting that approach for years as a full system backup method, which includes all contribs & configuration etc, and is a fully bootable system disk too that can be used in degraded mode in case of a worst case emergency to get your server up and running quickly, without needing to spend hours restoring and reinstalling contribs.

To ensure that data does not change on your server during drive resyncs, pull the plugs on your network & Internet connections until all drives have been swapped, grown & resynced.

You can use a good quality (ie with a reliable fan) removable caddie and have one of the RAID drives in that caddie to be easiy swapped out, it will be cold swap/restart only situation until a newer kernel supports hot swapping (with SATA or ESATA drives). I think Centos 5 may support hot swap. You need to delete the drive contents before swapping it back in or you may resync to the wrong data set.
Title: Re: Moving SME to new hardware, the shortest path...
Post by: psoren on December 20, 2007, 02:35:57 PM
I have been using & suggesting that approach for years as a full system backup method, which includes all contribs & configuration etc, and is a fully bootable system disk too that can be used in degraded mode in case of a worst case emergency to get your server up and running quickly, without needing to spend hours restoring and reinstalling contribs.

Exactly, but i guess you need to wipe and sync again for every time you change something in the server config. Or do you maybe have a rsync routine to take care of that?

Per
Title: Re: Moving SME to new hardware, the shortest path...
Post by: raem on December 21, 2007, 06:19:04 AM
psoren

I'm not sure what you are exactly referring to.
The drives automatically remain in sync when changes are made.

If you make a significant change to the server, and you want that change to be backed up, then you need to remove a drive and swap in a new one.
The drive you swap back in needs to be empty.

It's not really something you would do as a daily backup arrangement.
The typical usage pattern is to swap a drive out monthly or after major system upgrades or contrib installs etc, and still have normal daily backups running.
Title: Re: Moving SME to new hardware, the shortest path...
Post by: thomasch on December 21, 2007, 06:49:07 AM
thomasch

A good search & read of the FAQ would have found this.
http://wiki.contribs.org/Raid#Upgrading_the_Hard_Drive_Size

It advises how to "grow" your RAID1 hard disk ie increase it from 80 to 320Gb.
I think that's what you want, and it will be the quickest and easiest way as nothing needs to be reinstalled.

Do this on your old server first and then transfer the 320Gb drives to the new server and run the CD update to recognise & install drivers for the newer hardware.


Thanks Ray,
I'll try it when I have time.

Edit : [Modified to a (probably) more correct grammar:]
I tried 'g4u' http://www.feyrer.de/g4u/ (http://www.feyrer.de/g4u/) way..
no success yet because i am stuck on how to grow the lvm partition..

Oh Christmas is coming. Busy busy busy.
Title: Re: Moving SME to new hardware, the shortest path...
Post by: raem on December 21, 2007, 07:02:50 AM
thomasch

Quote
trying 'g4u'... i am stuck on how to grow the lvm partition..

I don't understand you, the link provided does what you want yet you don't have time to do it, and you cannot get something else you are trying, to work.

The commands to grow the partition are in the wiki article !

Be busy doing the method that works rather than the method that doesn't !
Title: Re: Moving SME to new hardware, the shortest path...
Post by: thomasch on December 21, 2007, 07:36:14 AM
thomasch

I don't understand you, the link provided does what you want yet you don't have time to do it, and you cannot get something else you are trying, to work.

The commands to grow the partition are in the wiki article !

Be busy doing the method that works rather than the method that doesn't !


Ray,

Maybe my bad english confuse you.. I am sorry  :grin:
I know all I need is in the article..
Now I am not in the office.
I'll be on site on Monday or maybe after Christmas and I will do it as soon as I have physical access to my server, and when I have time.

Thanks again,  and Merry Christmas to you.

thomas
Title: Re: Moving SME to new hardware, the shortest path...
Post by: psoren on December 21, 2007, 10:12:29 AM
psoren

I'm not sure what you are exactly referring to.
The drives automatically remain in sync when changes are made.

If you make a significant change to the server, and you want that change to be backed up, then you need to remove a drive and swap in a new one.
The drive you swap back in needs to be empty.

Ahh OK, i know what you mean now

Quote
.... and still have normal daily backups running.

Got that running.....

Thanks Ray!

Per

Title: Re: Moving SME to new hardware, the shortest path...
Post by: thomasch on December 27, 2007, 12:15:45 PM
thomasch

A good search & read of the FAQ would have found this.
http://wiki.contribs.org/Raid#Upgrading_the_Hard_Drive_Size

It advises how to "grow" your RAID1 hard disk ie increase it from 80 to 320Gb.
I think that's what you want, and it will be the quickest and easiest way as nothing needs to be reinstalled.

Do this on your old server first and then transfer the 320Gb drives to the new server and run the CD update to recognise & install drivers for the newer hardware.


WARNING : GUYS, DON'T TRY TO DO THIS ON PRODUCTION SERVER WITHOUT FULL BACKUP!
You have been warned..
I've just trashed my test server when I try this method..

I will post a followup later..
Title: Re: Moving SME to new hardware, the shortest path...
Post by: raem on December 27, 2007, 12:25:13 PM
thomasch

Quote
DON'T TRY TO DO THIS ON PRODUCTION SERVER WITHOUT FULL BACKUP!

That comment applies to ANYTHING you do a on a production server !!!

If you are about to adjust hard disk partitions, it would be even more prudent to do a backup first.

If you are aware of problems with the method, please post them to the appropriate discussion page on the wiki.

Assuming you were using RAID1 software array, then it would have been wise (& easy) to remove one disk first, as a full system backup.
Title: Re: Moving SME to new hardware, the shortest path...
Post by: kruhm on December 29, 2007, 10:03:41 AM
http://wiki.contribs.org/Raid#Upgrading_the_Hard_Drive_Size
Works for me. I never had any problems with it.
Title: Re: Moving SME to new hardware, the shortest path...
Post by: bloodshoteye on May 30, 2008, 07:04:21 PM
Hi

SME Server 7.3 up-to-date.
I have a small panic - I'm attempting the above migration to larger drives, same server.
So I pulled a drive from the RAID1 array, replaced it with a larger, and restarted.
Su Admin / Manage Disk redundancy gave a message partly containing the following words:
Quote
The free disk count must equal one.
Manual intervention may be required.
I can't remember the disk descriptions.


I then put the old drive back, thinking I would try again tomorrow, after consulting the forums.
With original disks in exactly the same position, etc, Su Admin reports:
Quote
Personalities : [raid1]
md2 : active raid1 sda2[0]
         244091520 blocks [2/1] [U_]
md1 : active raid1 sda1[0]
         104320 blocks [2/1] [U_]
unused devices: <none>

The free disk count must equal one.
Manual intervention may be required.
Current disk status:

Installed disks: sdc sda sdb
Unused disks: sda
Free disks: sdc sdb

The same message has been there for about an hour.
What does this mean, please - do I have a problem?
Thanks for you time,
         
Title: Re: Moving SME to new hardware, the shortest path...
Post by: bloodshoteye on June 06, 2008, 08:43:17 AM
Answer my own post :-)

I read elsewhere to add back partitions like this:
Quote
/dev/md2 -a /dev/sdb2 and /dev/md1 -a /dev/sdb2
if the raid array has been broken by a removed drive

Well, I did that in stages and sme immediately started syncing disks and now all is well  :grin: