Closed evgeni closed 4 months ago
[root@foreman01 ~]# systemctl start restic-backup@foreman
[root@foreman01 ~]# sed -i 's/^mirrorlist/#&/; s/^#baseurl/baseurl/; s/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/CentOS-Stream-*.repo
[root@foreman01 ~]# puppet agent -t
[root@foreman01 ~]# dnf module switch-to postgresql:13
[root@foreman01 ~]# dnf upgrade postgresql-server postgresql
[root@foreman01 ~]# dnf install postgresql-upgrade
[root@foreman01 ~]# systemctl stop postgresql
[root@foreman01 ~]# sed -i '/^data_directory/d' /var/lib/pgsql/data/postgresql.conf
[root@foreman01 ~]# runuser -l postgres -c 'postgresql-setup --upgrade'
* Upgrading database.
* Upgraded OK.
WARNING: The configuration files were replaced by default configuration.
WARNING: The previous configuration and data are stored in folder
WARNING: /var/lib/pgsql/data-old.
WARNING: If you've just upgraded your database from a previous major version of
Fedora or RHEL, please run reindexdb against your databases. Core library
collation data may have changed and this will invalidate database indexes. For
example, in Fedora 28 and RHEL 8 there have been extensive changes in glibc
collations to support ISO 14651:2016 (Unicode 9.0.0 data) and your indexes may
be affected: https://sourceware.org/ml/libc-announce/2018/msg00002.html
* See /var/lib/pgsql/upgrade_postgresql.log for details.
[root@foreman01 ~]# systemctl start postgresql
[root@foreman01 ~]# runuser -l postgres -c 'vacuumdb --all --analyze-in-stages'
vacuumdb: processing database "foreman": Generating minimal optimizer statistics (1 target)
vacuumdb: processing database "postgres": Generating minimal optimizer statistics (1 target)
vacuumdb: processing database "template1": Generating minimal optimizer statistics (1 target)
vacuumdb: processing database "foreman": Generating medium optimizer statistics (10 targets)
vacuumdb: processing database "postgres": Generating medium optimizer statistics (10 targets)
vacuumdb: processing database "template1": Generating medium optimizer statistics (10 targets)
vacuumdb: processing database "foreman": Generating default (full) optimizer statistics
vacuumdb: processing database "postgres": Generating default (full) optimizer statistics
vacuumdb: processing database "template1": Generating default (full) optimizer statistics
[root@foreman01 ~]# systemctl stop foreman.service foreman.socket dynflow\*
[root@foreman01 ~]# dnf upgrade
[root@foreman01 ~]# foreman-rake db:migrate
[root@foreman01 ~]# foreman-rake db:seed
[root@foreman01 ~]# puppet agent -t
[root@foreman01 ~]# systemctl start restic-backup@foreman
[root@virt01 ~]# lvcreate --size 20G --name foreman01_snap --snapshot /dev/mapper/cs_node01-virt_foreman01 Logical volume "foreman01_snap" created.
[root@foreman01 ~]# dnf copr enable @theforeman/leapp [root@foreman01 ~]# dnf install leapp leapp-upgrade-el8toel9 leapp-data-centos
[root@foreman01 ~]# vi /etc/leapp/files/leapp_upgrade_repositories.repo
and dropped the snapshot:
[root@virt01 ~]# lvremove cs_node01/foreman01_snap
Do you really want to remove active logical volume cs_node01/foreman01_snap? [y/n]: y
Logical volume "foreman01_snap" successfully removed.
Will also require a Foreman update as the current release doesn't work on EL9.