Koozali.org: home of the SME Server

Migrate 7.5.1 to 8 using old internal drive for 'restore'

Offline ReetP

  • *
  • 3,733
  • +5/-0
Migrate 7.5.1 to 8 using old internal drive for 'restore'
« on: September 09, 2010, 04:21:06 AM »
In the process of testing an upgrade from 7.5.1 to 8

I wanted to upgrade the disks at the same time (USB is slow compared, and I don't have a USB disk big enough to do the backup) and remembered doing something similar before - see links below.

I did a new install of 8b6, signal-event pre-backup on the old disks, removed one and inserted it in the new box.

However, following this process doesn't seem to work as follows :

mdadm -AR /dev/md5 /dev/hdc2
mdadm: no devices found for /dev/md5

Anyone have any ideas ?

B. Rgds
John

http://forums.contribs.org/index.php?topic=39892.0
http://forums.contribs.org/index.php?topic=37686.0
http://wiki.contribs.org/UpgradeDisk
« Last Edit: September 09, 2010, 08:41:25 PM by ReetP »
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,733
  • +5/-0
Re: Migrate 7.3 to 8 using old internal drive for 'restore'
« Reply #1 on: September 09, 2010, 08:39:54 PM »
Hmmm.

Tried it again.

mdadm --examine --scan reveals :

ARRAY /dev/md1 level=raid1 num-devices=2 UUID=e612cfc4 etc
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=558aae94 etc

I guess this is the old array information read from the drive that is plugged in.

I only have one drive and a CDrom in the machine and have checked I am using the correct drive - /dev/hdc

I am using the V8b6 boot CD and rescue mode

Has something changed with mdadm or lvm ?

Wondering if I ought to try & rename the LVM with a SME 7 disk ???

Any help gratefully received. I'm not sure this qualifies as a bug - perhaps someone can advise whether it should go in the tracker ?
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Migrate 7.3 to 8 using old internal drive for 'restore'
« Reply #2 on: September 09, 2010, 08:42:29 PM »
IMHO, if you are going to upgrade your hw too (i.e. use a new server) you should take a look at Affa

my 2c

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #3 on: September 09, 2010, 08:43:25 PM »
Any help gratefully received. I'm not sure this qualifies as a bug - perhaps someone can advise whether it should go in the tracker ?

sure.. please report it in bugzilla and link here the reference, thank you

Offline ReetP

  • *
  • 3,733
  • +5/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #4 on: September 10, 2010, 12:59:24 AM »
Hi Stefano, thanks for the replies.

Bug filed : http://bugs.contribs.org/show_bug.cgi?id=6195

I didn't want to use another contrib if I could help it. Affa also requires a backup server, which I don't have.

For the sake of the thread, I booted with a 7.5.1 CD and one disk only. I then followed the Wiki to rename the volume.

I then rebooted with the new drives and the one old drive and followed the Wiki to mount the drive. It is currently copying over - my guess (TBC) that it is probably OK as I could see all the data.

My guess is that something has changed with mdadm between V7 & V8

Will post back when it has finished copying to confirm whether it has worked

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,733
  • +5/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #5 on: September 11, 2010, 07:38:31 PM »
All moved over finally. Biggest sticking point was some errors in some files - presumably from a early problem that I had never picked up. I had to fsck the old drive and remove the errors. Once that was done, it copied easily.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,733
  • +5/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #6 on: September 11, 2010, 11:36:53 PM »
Notes have been added here :

http://wiki.contribs.org/UpgradeDisk
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline christian

  • *
  • 369
  • +0/-0
    • http://www.szpilfogel.com
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #7 on: September 13, 2010, 04:42:47 AM »
Notes have been added here :

http://wiki.contribs.org/UpgradeDisk
Thank you for documenting this. I think you just saved me and others a tonne of grief. This is my generally preferred method of upgrading my disks.
SME since 2003

Offline ReetP

  • *
  • 3,733
  • +5/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #8 on: September 13, 2010, 11:09:08 AM »
Thank you for documenting this. I think you just saved me and others a tonne of grief. This is my generally preferred method of upgrading my disks.

No worries. Me too. Just wish someone had been there before me !! Cost me quite a few hours :-)

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline SuperGrover

  • **
  • 56
  • +0/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #9 on: November 29, 2010, 08:19:37 PM »
Hi,

I will try to perform the same steps, but if it is not working, do I need to undo the signal-event pre-backup command, or will it be undone by booting from that disk?

Thanks,

SuperGrover

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #10 on: November 29, 2010, 10:23:15 PM »
SuperGrover

Quote
...do I need to undo the signal-event pre-backup command...

No.
It does not need to be undone. It just dumps the mysql database ready for backup (or restore in this case). It will be overwritten & deleted next time you peform a backup.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline ReetP

  • *
  • 3,733
  • +5/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #11 on: November 29, 2010, 11:28:14 PM »
It does not need to be undone. It just dumps the mysql database ready for backup (or restore in this case). It will be overwritten & deleted next time you peform a backup.

Thanks Mary - you beat me too it !

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #12 on: November 30, 2010, 10:23:57 AM »
It will be overwritten & deleted next time you peform a backup.
No, deleted and freshly dumped, to be precise. :-)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #13 on: November 30, 2010, 10:49:12 AM »
cactus

Quote
No, deleted and freshly dumped, to be precise. :-)

Which I think is equivalent to being overwritten, ........and then deleted at the end of the backup IIRC. :)
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline SuperGrover

  • **
  • 56
  • +0/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #14 on: December 02, 2010, 01:50:00 PM »
Hi there (again),

yesterday I received my 2 new sata disks so I did the following.

On the existing 7.5.1 installation on a PATA drive, I attached one of the new SATA disks to sync it with the current installation.

After syncing, I took this disk and hooked it up to a different computer running a freshly installed SME 7.5.1

I used the upgradedisk commands and that all looked fine.

But, a lot of my information is lost. All /opt files (squeezeboxmusic, torrentflux etc.) are not copied, and also the contribs are not there.

Before I tried the Affa method, but the rpms_missing file was completely empty, so this also didn't help me a lot.

To be short, how can I easily change the current 1 disk PATA installation to a 1 disk SATA installation without all these problems. This shouldn't be this hard in my opinion, this way the software RAID of SME server over 1 PATA and 1 SATA disk is useless, because the machine won't boot from the 'backup' disk.

Hopefully somebody can help me to get it fixed, or point me to a topic which I can use.

Offline ReetP

  • *
  • 3,733
  • +5/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #15 on: December 02, 2010, 03:03:23 PM »
Hmmm.

I htink you may be making life hard for yourself, and getting a missed up with what you can and can't do.

Why if you have two SATA drives are you only installing to one ???

Think you might have been better to have installed a clean system to your new SATA drives, run the pre-backup on your PATA drive, install it alongside the SATAs and restore from there. That should drag everything on to the two new drives (which should be mirrored).

If you have a read through the wiki including manual, howtos, FAQs etc, I think you will find that it does mention that contribs won't be copied over - either the packages or templates. Packages should be removed, and templates moved out of the way, prior to upgrading. The reason is that you cannot cover all eventualities, and the developers have no idea of what you have installed or changed, so can only test on a clean installation.

HTH
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline SuperGrover

  • **
  • 56
  • +0/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #16 on: December 02, 2010, 03:22:24 PM »
Thanks John!

I will make a Raid 1 out of the 2 disks, but I prefer the promise hardware raid, rather than the SME software raid.

I'm running Affa as we speak, with the bug noted so the rpms-missing should not be empty. Most difficult thing will be to find the parts I forgot to copy from the old drive, and where these files are....

I just don't understand why a running PATA installation is so difficult to copy/move to a running SATA. Other than the interface of the disk, which is handled by the drivers, there's no reason I can think of why it is this difficult.

I will post updates about the moving here  8-)

Offline ReetP

  • *
  • 3,733
  • +5/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #17 on: December 02, 2010, 03:59:41 PM »
Thanks John!

I will make a Raid 1 out of the 2 disks, but I prefer the promise hardware raid, rather than the SME software raid.


If you read around here, I think generally the software raid is considered to be the better option.


Quote
I'm running Affa as we speak, with the bug noted so the rpms-missing should not be empty. Most difficult thing will be to find the parts I forgot to copy from the old drive, and where these files are....

I have never tried this but I am sure it will work OK. My own preference has been the disk backup method as above - if anything goes pear shaped, I reboot the original install and I'm back to normal.

Quote
I just don't understand why a running PATA installation is so difficult to copy/move to a running SATA. Other than the interface of the disk, which is handled by the drivers, there's no reason I can think of why it is this difficult.

I think it depends on the method used :-)

Quote
I will post updates about the moving here  8-)

Excellent.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline SuperGrover

  • **
  • 56
  • +0/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #18 on: December 02, 2010, 09:50:23 PM »
I'm working my way through the LONG list of rpms_missing  :-(

Offline SuperGrover

  • **
  • 56
  • +0/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #19 on: December 06, 2010, 08:54:10 PM »
It worked !



Situation: Current server [1] with Pata drive would also become new server with Promise SATA card and SATA drive.

I used an even older computer [2] to install the Promise Card and SATA drive. Installed SME7.5.1 on it and did the Affa trick described HERE

Installed the most critical rpm's, squeezeboxserver, gallery2, tof4-brt and some admin tools, all via SSH on the [2]

I had to hand-copy the /opt directory from the old server  :-? I did not want to sort out the [include]  function of Affa.

After the final affa --run prodserv I switched off both [1] and [2], moved the SATA drive from [2] to [1], booted up and it almost worked instantly.

I had to sort out which network card was internal and which one is external, but luckily I wrote down these settings from the original [1].

As I am typing this, I'm connected again to the internet on [1] with the SATA drive.

I do have to figure out why Gallery 2 is not starting via the link I previously used, but this is a minor  :)

Thanks all for the help!!

Offline SuperGrover

  • **
  • 56
  • +0/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #20 on: December 06, 2010, 09:52:43 PM »
hmmm, installing Gallery2 at [2] was not a good idea :(

Reinstalling it now, hopefully I can get all my data back via import on the MySQL database  8)

Offline slords

  • ****
  • 235
  • +3/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #21 on: December 07, 2010, 12:23:21 AM »
To be short, how can I easily change the current 1 disk PATA installation to a 1 disk SATA installation without all these problems. This shouldn't be this hard in my opinion, this way the software RAID of SME server over 1 PATA and 1 SATA disk is useless, because the machine won't boot from the 'backup' disk.

It isn't that hard.  Add the drive to the raid mirror using either the cmdline or the console and let it sync.  While it is syncing ensure you have a line in /etc/modprobe.conf for the sata controller.  An example of what I have on one of my boxes is:

Code: [Select]
[root@handel ~]# grep scsi /etc/modprobe.conf
alias scsi_hostadapter ahci
alias scsi_hostadapter1 aic7xxx
alias scsi_hostadapter2 3w-9xxx

If you already have a scsi_hostadapter line just add a new one and add a number to the end (like my example above).

After you have the scsi_hostadapter lines correct in /etc/modprobe.conf you need to regenerate the initrd files that you boot from in order to include the new drivers you need to access the sata drives.  You can use this script to regenerate all the initrd files.

Code: [Select]
ls /boot/initrd-*.img | sed 's,.*initrd-\(.*\)\.img,\1,' | while read initrd
do
    mkinitrd -f /boot/initrd-$initrd.img $initrd
done
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs,
and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -- Rich Cook

Offline SuperGrover

  • **
  • 56
  • +0/-0
Re: Migrate 7.5.1 to 8 using old internal drive for 'restore'
« Reply #22 on: December 07, 2010, 07:28:35 PM »
Thanks slords!!!

Little bit too late for me now, but maybe other users can benefit from this! I will create a link also in THIS topic 8-)

Thanks again for the solution!