Koozali.org: home of the SME Server

Moving SME to new hardware, the shortest path...

Offline thomasch

  • *
  • 232
  • +0/-0
Moving SME to new hardware, the shortest path...
« 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
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)


Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #1 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.

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #2 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.
...

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #3 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.
...

Offline psoren

  • *
  • 371
  • +0/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #4 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

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #5 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.
...

Offline psoren

  • *
  • 371
  • +0/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #6 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

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #7 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.
...

Offline psoren

  • *
  • 371
  • +0/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #8 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

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #9 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.
...

Offline thomasch

  • *
  • 232
  • +0/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #10 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/ way..
no success yet because i am stuck on how to grow the lvm partition..

Oh Christmas is coming. Busy busy busy.
« Last Edit: December 21, 2007, 07:40:33 AM by thomasch »

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #11 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 !
...

Offline thomasch

  • *
  • 232
  • +0/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #12 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

Offline psoren

  • *
  • 371
  • +0/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #13 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


Offline thomasch

  • *
  • 232
  • +0/-0
Re: Moving SME to new hardware, the shortest path...
« Reply #14 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..