Migration plan from CentOS 6.10 to CentOS 8

General support questions
Post Reply
mphelpsmd
Posts: 52
Joined: 2013/06/09 18:42:22

Migration plan from CentOS 6.10 to CentOS 8

Post by mphelpsmd » 2019/06/09 05:28:21

Some point after CentOS 8 becomes available, I plan to upgrade my (usually headless) home server running CentOS 6.10. (Yes, Trevor, some people are up-to-date with their CentOS 6 systems! :D ) I’ve been slowly losing functionality with software (such as Dropbox) that no longer supports the aging kernel in Centos 6.10, and feel that it’s getting to be time to upgrade after 7 years of solid service.

Currently, the server has two internal HD’s in RAID 1 for the OS that I will likely change to a single SSD when I switch to CentOS 8.

External connections:
  • A multidrive external enclose via SAS that uses software RAID (RAID 6)
  • External backup HD that uses a LUKS-based encryption
Networking:
  • 2 bonded 1 Gbps Ethernet connections
Logical Volumes:
  • LVM2 logical volume on top of the software RAID array (RAID 6)
  • LUKS volume on another external drive used for backups
Server software services:
  • Logitech Media Server (squeezeboxserver)
  • Plex Media Server
  • Fileserver (using SAMBA)
  • MySQL server
Automated backup software:
  • rsnapshot
  • Backblaze B2 online backups via duplicacy

OK, so since I’ve never upgraded this complex of a system before, the question is what things do I need to migrate/be aware of?

I’m thinking that for starters I will need:
  • /etc/fstab
  • /etc/mdadm.conf
  • /etc/lvm/backup
  • /root/.ssh/authorized_keys
  • LUKS encryption keyfile
  • /etc/crypttab
  • contents of mysqldump
  • contents of /root and /home directories
  • /etc/rsnapshot.conf
  • /etc/samba/smb.conf and /etc/samba/smbusers
  • networking scripts (/etc/sysconfig/network-scripts/ifcfg-bond0
  • Results of blkid
Here is my proposed plan of attack to prepare the old system for upgrade:

1) Ensure everything backed up
2) Unmount filesystem on external RAID array
3) Export volume grout on the RAID: vgchange -an external_RAID; vgexport external_RAID
4) Shut down system
5) Disconnect external RAID array
6) Remove internal drives with Centos 6.10

Now to update to an internal SSD and install Centos 8:
1) Install SSD
2) Install Centos 8 onto the SSD
3) Get basic configuration with networking, basic utilities, mdadm, cryptsetup, etc
4) Configure ssh, copy over authorized_keys file to re-enable passwordless administration
5) Copy over old /etc/mdadm.conf file to the new system
6) Shut down system
7) Reconnect external drive array
8) Restart system. The RAID array should be detected.
9) Copy over old /etc/fstab to the new system
10) Re-establish the LVM2 on top of the software RAID: pvscan; vgimport external_RAID; vgchange -ay external_RAID
11) Re-mount server filesystem: mkdir /srv; mount /srv
12) Remount external encrypted drives:
a. Copy over old /etc/crypttab file and keyfile
b. cryptsetup luksOpen UUID=UUID_of_encrypted_volume encrypted_volume
c. mkdir /mnt/encrypted_data
d. mount /mnt/encrypted_data
13) Install and activate SAMBA
14) Install additional perl modules, etc as required for other applications
15) Install Logitech media server, plex media server, duplicacy, rsnapshot, etc
16) Install MySQL and restore from dump files


I’m sure there are plenty of things that I haven’t fully thought of at this point. Do I have the general outline of the process, or are there some glaring omissions?

Thanks so much in advance!

Mike

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Migration plan from CentOS 6.10 to CentOS 8

Post by aks » 2019/06/16 19:15:29

Generally all things sound okay, but the devil is ALWAYS in the details.
Check uit the RHEL docs, specifically the release notes and the "what's changed" docs.

mphelpsmd
Posts: 52
Joined: 2013/06/09 18:42:22

Re: Migration plan from CentOS 6.10 to CentOS 8

Post by mphelpsmd » 2019/07/06 13:44:57

Thanks for the suggestion with the RHEL docs. Looking at the release notes sounds like good advice.

The good news is that since I'm planning on upgrading the system drive at the same time, my worst-case scenario is to reinstall the old Centos 6 drives and at least get back to what I had.

Mike

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Migration plan from CentOS 6.10 to CentOS 8

Post by TrevorH » 2019/07/06 13:53:20

I've never had to export or import any LVM config. Everything it needs is on the disks and their presence is automatically detected and any PV/VG/LVs on them is automatically recognised.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply