Forums

Resolved
0 votes
Alternative title: Move hard drive to different hardware

It turns out you can build ClearOS on one computer and then move the drives to another and it still works. However one thing breaks, the network. You have to go in and delete the old interface and set up a new one.

The senario:
I am upgrading my customer from ClearOS 5 to ClearOS 7 and am supplying a new drive but keeping their existing hardware.
So at my lab I build a clean ClearOS 7 system on the hardware I have. I create the required user accounts and flex shares. I use rsync and imapsync to suck all their live data over the Internet from their server still running in their office.
I then shut down their live machine remotely so both servers have the same data. Now I need to visit their office with the new hard drive.

Getting the new drive to work on a different motherboard
1. replace their existing hard drive with the new ClearOS 7 hard drive in their server.
2. boot with screen, keyboard and mouse.
3. select the graphical mode and go into the network section
4. network is still set to the non-existant NIC so delete it
5. select and add the new NIC and enter required IP settings
6. save and reboot

From this point the server should be accessible over the LAN.

My actual set up was as follows;
Target machine is a Quad-core AMD Opteron with AMCC 3 Ware RAID ePCI card with RAID 1 drives.
Lab machine is an iCore 7 with AMCC 3 Ware RAID PCIx card with RAID 1 drives.
One cool thing is you can build it on Intel hardware and move it to AMD hardware and it still runs OK
Another cool thing is that the RAID configuration is contained in the drives so they can be moved from one AMCC RAID card to a similar one and they just work with no messing.
Friday, December 02 2016, 02:37 PM
Share this post:
Responses (4)
  • Accepted Answer

    Friday, December 02 2016, 09:56 PM - #Permalink
    Resolved
    0 votes
    Some top tips. It's valuable to know that the config backup works between 6 and 7 as long as you install the relevant apps first.
    I copied the database using my favorite Windows SQL tool SQLyog which ran perfectly in Wine on my Mint 18 laptop. I expect I could have done this totally in Linux but I'm not there yet.
    I think ClearOS 5 was the best one but the code is old and not supported.
    I have a server running ISPConfig3 which is free but they are charging for their migration tool. I think this would be a wise purchase when I change the server.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, December 02 2016, 07:25 PM - #Permalink
    Resolved
    1 votes
    The process isn't too easy, but at least you can do a config backup and restore between ClearOS 6 and 7. You need to install all your apps in 7 then restore your ClearOS 6 config into ClearOS 7. This brings in all your users and all (most) app settings. If you make custom configs manually I recommend putting a marker in the file which you can then grep for. I try to put in a comment with my initials in every file I manually edit. Also if I do big changes to a file I back the original file up with my initials as a file extension. It was not foolproof. Sometimes I forgot and not all configs are in the three locations I searched.

    I was still stuck with imapsync and rsync but at least both can be done incrementally so you can start days in advance and you can script them as well. The problem with rsync is working out what to bring across - shares, user folders, web sites, loads of individual files especially those not covered by the backup and restore and so on. Rsync is best run as a daemon on one of the machines so you don't have to do the transfer by ssh which is slow and you can't script a login (very easily).

    I did not do any databases (except LDAP which was covered by the backup and restore). The only one I really used was roundcube and it is not used very much at all so a reset did not matter.

    Hopefully a config backup and restore as a minimum will work going forwards, but some of it is up to RHEL/CentOS, and I don't think RHEL provide an upgrade path.

    If you have paid-for apps it becomes a bit more complicated as you can't really run a single licence on 2 machines. I suspect you can get round that if you reallocate the licence shortly before you do the upgrade as I don't think deallocating a license stops an app from running, but I'm not sure.

    FWIW the bugs I've reported have been acknowledged but have not yet progressed any further.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, December 02 2016, 05:18 PM - #Permalink
    Resolved
    0 votes
    I must admit I tried doing this in the summer and SAMBA went a bit wonky and I had to wipe and start again. I only have one interface and this I set to external so that it would see the Internet. SAMBA then stopped so I restarted it. I have not yet rebooted to make sure it still works. I think your bug reports may have worked.

    Shifting things from one server to another is a very common requirement. I see that ClearOS 7 sell-by date is 2018 so I will be doing this again in two years. I currently have two ClearOS 5 systems that are overdue for an upgrade and others are on ClearOS 6. Setting up clearOS in the first place is the easiest of any server operating system but upgrading seems to lack tools.

    It would be good if we could clone a server based on
    1. Users
    2. File system
    3. Databases
    4. Emails

    I've had to do all that semi-manually using various tools.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, December 02 2016, 04:06 PM - #Permalink
    Resolved
    1 votes
    I did virtually the same upgrading from 6 to 7 because I built 7 on a back up machine except you can do a config backup and restore. I fell into a couple of traps. So I could determine which NIC was which I did not connect one of them. At the console, ClearOS then hangs as it detects only one NIC. I did not realise what the issue was and the only was to connect to it was by OpenVPN from my phone where I managed to configure it. Connecting a cable to the NIC sorted it out.
    The other gotcha is that it appears the Samba init script (or systemd equivalent) no longer maintains the "interfaces" parameter in smb.conf. In ClearOS 6 it causes the boot up to hang if it specifies an incorrect interface. In ClearOS 7 boot up stalls for a bit starting nmb but eventually recovers. I have filed a bug on this.

    What I would suggest is grep'ing recursively (grep -r) each old interface in /etc, /var/clearos and /usr/clearos and sorting out what you find.

    I also found a backup and restore did not copy the cyrus-imap keys across which lead to e-mail issues. Another bug filed.
    Like
    1
    The reply is currently minimized Show
Your Reply