The LearningOnline Network with CAPA

Home > Downloading and Installing LON-CAPA > Hardware Upgrades

Hardware Upgrades

As LON-CAPA use at your institution grows, you might need to upgrade your hardware (see hardware recommendations).

The basic idea is that the network should not need to know that anything changed on your end, i.e., it does not care about what hardware you run, but it does care about the following (example from MSU):

msul1:msu:library:s10.lite.msu.edu

which is internal hostID, domain, function, and hostname. If in addition, your IP address stays constant (which LON-CAPA caches), the transition is the smoothest.

Here's a guide on how to best accomplish this for a library server:

  Old Machine New Machine
 
1   Obtain a temporary IP address for your new machine
2  

Install LON-CAPA according to
http://install.lon-capa.org/

Choose production and set the hostid/domain to be the same as on the old machine

3 Schedule system downtime, about three hours  
4

Shutdown all LON-CAPA services

/etc/init.d/httpd stop

/etc/init.d/loncontrol stop

 
5  

Shutdown all LON-CAPA services

/etc/init.d/httpd stop

/etc/init.d/loncontrol stop

6

 

Transfer the contents of

/home

to the new machine

The best way of doing this is with rsync (be sure to be on the new machine and enter in the exact order):

rsync --delete -avze "ssh" oldmachine-name:/home/ /home

For example:

rsync --delete -avze "ssh" loncapa.foobar.edu:/home/ /home

6b  

If and only if the old machine was 32-bit and the new machine is 64-bit (we assume you won't go the other way around, would you?):

As user www, execute

/home/httpd/perl/debug/db_copy.pl

You are www, aren't you? And you really are switching from 32-bit to 64-bit? Okay.


You might have to change line 82 in it from
my $dir = $perlvar{'lonUsersDir'}.'/temp/y/';
to
my $dir = $perlvar{'lonUsersDir'};

Depending on how much data you have, this might run for quite some time!

7  

Transfer /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow from the old machine to the new one

Warning: this does not work if you go from Fedora to SUSE or vice versa, since these distributions use different encryption algorithms. If you switch distributions, you need to make the file-system-based LON-CAPA users from the command line.

8   If you made any changes in /etc on the old machine (such as Kerberos configuration, etc), those also need to be transfered
9  

Run

cd /root/loncapa-N.N (N.N should correspond to a version number like '1.3')
./UPDATE

again (you would have done so the first time during the initial install).

10 Write down IP address and hostname  
11 Take completely offline  
12  

Give same IP address and hostname as old machine. Which tool to use depends on the distribution:

fedora/RHEL: system-config-network
SuSE/SLES: yast

13   Restart
14  

Test the new machine, see if everything works, including local authentication methods, etc.

If anything goes wrong that you cannot quickly fix, take this machine offline, plug the old machine back in, and try another day.

15

Before you ever fire up this machine again, give it a new hostname and IP while the ethernet cable is unplugged

 
16   Enjoy

 

Contact Us: lon-capa@lon-capa.org