-
Notifications
You must be signed in to change notification settings - Fork 0
Alma ELevate
Summary: This document shows the process of upgrading from Centos 7 to Rocky 8 while using PostgreSQL 14 for Metadata indexing. By default, PostgreSQL is not used for metadata indexing. If PostgreSQL is not being used on your system, all PostgreSQL steps can be skipped. The commands within this document are being run as the root user.
The CentOS 7 repositories are no longer valid. If you have not swapped to the CentOS Vault, you can use the CentOS 7 mirror that the AlmaLinux organization has put together for ELevate:
# curl -o /etc/yum.repos.d/CentOS-Base.repo https://el7.repo.almalinux.org/centos/CentOS-Base.repo
- Stop LOCKSS and PostgreSQL
# systemctl stop lockss
# systemctl stop postgresql-14
- Disable LOCKSS and PostgreSQL to keep them from restarting during a reboot (the system will restart several times during this process)
# systemctl disable lockss
# systemctl disable postgresql-14
Important Note: At this point, it is critical to analyze your storage configuration and comment out additional filesystems you have set in /etc/fstab. Only filesystems that are needed by the operating system should remain uncommented throughout the ELevate process or you will experience failures.
- Update the system (system is currently Centos7)
# yum upgrade -y
# reboot
Important Note: If the LOCKSS Daemon was updated during the update process, you must stop the service again with systemctl stop lockss
- Install the Alma ELevate repository and the Alma ELevate packages. The first package being installed contains the binaries to run the upgrade process, and the second contains the metadata for Rocky 8
# yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el$(rpm --eval %rhel).noarch.rpm
# yum install -y leapp-upgrade leapp-data-rocky
- Run the ELevate "preupgrade" script
# leapp preupgrade
- The preupgrade script will create a file which contains questions that need to be answered. The log may show additional questions that need to be answered, but the following answers are the most commonly needed.
# rmmod pata_acpi
# echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config
# leapp answer --section remove_pam_pkcs11_module_check.confirm=True
Re-run the "preupgrade" script to ensure the changes above have satisfied leapp.
# leapp preupgrade
Important Note: If you are presented with multiple questions that the above commands do not satisfy, please refer to the FAQ at https://wiki.almalinux.org/elevate/ELevate-frequent-issues
- Run the upgrade script and reboot the system when it completes
# leapp upgrade
# reboot
Important Note: The system will boot into a new GRUB entry named ELevate-Upgrade-Initramfs. Upon booting, the upgrades will continue and may take several minutes to complete. You can only monitor the progress of this portion in the console. The system will automatically reboot after this completes
- Gain root access, then disable native Rocky PostgreSQL module that comes with Rocky 8. We must disable the native Rocky module because it conflicts with the PostgreSQL repository from the PostgreSQL Group.
# dnf -y module disable postgresql
- Reinstall the PostgreSQL server and contrib packages (they do not survive the upgrade process). We are using PostgreSQL 14.
# dnf install -y postgresql14-server postgresql14-contrib
- If your original PostgreSQL data directory is installed in a non-standard location, rename the new /var/lib/pgsql directory, and then point your new PostgreSQL installation at it with a symbolic link. (our database lives under /cache0/)
# mv /var/lib/pgsql /var/lib/pgsql.14.orig
# ln -s /cache0/pgsql/ /var/lib/pgsql
- Enable and start PostgreSQL (MUST BE DONE BEFORE STARTING LOCKSS)
# systemctl enable postgresql-14
# systemctl start postgresql-14
- Enable and start LOCKSS
# systemctl enable lockss
# systemctl start lockss
Summary: Below are common errors that we experienced while upgrading from Centos 7 to Rocky 8. Our system is using PostgreSQL 14 for Metadata indexing. The commands within this document are being run as the root user.
- PostgreSQL repo errors when running the preupgrade process
The PostgreSQL repo has been updated and the GPG key has been changed. In order to fix this, we had to remove the old repo, and then reinstall it.
# rpm -qf /etc/yum.repos.d/pgdg-redhat-all.repo
pgdg-redhat-repo-35.0-40PGDG.noarch
# yum remove pgdg-redhat-repo-35.0-40PGDG.noarch
# $ sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
- At least X MB more space needed on the filesystem
Error message reads
Error Summary
-------------
Disk Requirements:
At least 1044MB more space needed on the / filesystem
To fix this error, we must increase a Leapp environment variable. It is best to increase the variable at a system level, instead of at a user level.
Add the following line to /etc/profile.d/local.sh
LEAPP_OVL_SIZE=3000
Restart current shell by signing out/in, or run "bash". Now re-run the upgrade and it should complete without throwing errors regarding space in the / partition
- System fails to boot after "successful" upgrade. System boots into recovery mode
If you are running a system that contains raid devices, you may need to comment out the mount points in /etc/fstab. There will be error messages regarding which storage devices "cannot be found", but it may be hard to find them in the console output. We had to comment/remove these mount points from /etc/fstab, gather information regarding the storage devices, and recreate the mount points in /etc/fstab.
- Specific Java packages not found during preupgrade process.
We had Java package installed that was not needed and was keeping the preupgrade process from completing. The package was javapackages-tools.noarch. To save time, I simply did the following
yum remove java*
After the upgrade, I replaced the openjdk packages with
dnf install java-1.8.0-openjdk-headless java-1.8.0-openjdk-devel java-1.8.0-openjdk