Koozali.org: home of the SME Server
Obsolete Releases => SME Server 8.x => Topic started by: ReetP 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
-
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 ?
-
IMHO, if you are going to upgrade your hw too (i.e. use a new server) you should take a look at Affa (http://wiki.contribs.org/Affa)
my 2c
-
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
-
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
-
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.
-
Notes have been added here :
http://wiki.contribs.org/UpgradeDisk
-
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.
-
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
-
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
-
SuperGrover
...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.
-
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
-
It will be overwritten & deleted next time you peform a backup.
No, deleted and freshly dumped, to be precise. :-)
-
cactus
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. :)
-
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.
-
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
-
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-)
-
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.
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.
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 :-)
I will post updates about the moving here 8-)
Excellent.
-
I'm working my way through the LONG list of rpms_missing :-(
-
It worked !
(http://www.smilies.our-local.co.uk/index_files/circle.gif)
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 (http://wiki.contribs.org/Moving_SME_to_new_Hardware)
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!!
-
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)
-
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:
[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.
ls /boot/initrd-*.img | sed 's,.*initrd-\(.*\)\.img,\1,' | while read initrd
do
mkinitrd -f /boot/initrd-$initrd.img $initrd
done
-
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 (http://forums.contribs.org/index.php?topic=41061.0) topic 8-)
Thanks again for the solution!