Commodore
Commodore
1398 views

upgrade mobility server to sles sp5

Jump to solution

Hello,

When I upgrade my mobility server from SLES 12 SP4 to SP5 the update removes postgresql 9.x and installs 10.0. After that postgresql will not start and says the db created is in 9.x format.

What is the best I can do?

1. Upgrade the db to postgresql 10? And will mobility 18.2.1 and later work with postgresql 10?

2. Reinstall postgresql 9.x after the upgrade?

3. Select to not upgrade/remove postgresql 9.x during the upgrade?

 

 

 

0 Likes
1 Solution

Accepted Solutions
Commodore
Commodore

Happy!

I upgraded the db to version 10 this way:

database is in /var/lib/pgsql/data (I have more folders there from old db's like data93 and data83)

1. rcgms stop

2. rcpostgresql stop

3. install postgresql10, postgresql10-contrib, postgresql10-server (important: do not remove version 94!!!)

4. su - postgres

5. /usr/lib/postgresql10/bin/initdb /var/lib/pgsql/data10 (create a new database, use the initdb from 10!)

6. /usr/lib/postgresql10/bin/pg_upgrade -v -d /var/lib/pgsql/data -D /var/lib/pgsql/data10 -b /usr/lib/postgresql94/bin -B /usr/lib/postgresql10/bin

(-v = verbose, -d=original db, -D=destination db -b =  original binaries -B = new binaries)

This moves the data from the old to the new database.

Still as postgres user, move data in place:

7. mv /var/lib/pgsql/data /var/lib/pgsql/data94

8. mv /var/lib/pgsql/data10 /var/lib/pgsql/data

9. remove postgresql94, postgresql94-contrib, postgresql94-server

And than, one tiny thing: the command psql is a symbolic link. If you do not adjust it to the right binaries you will have an empty dashboard in gms!

10. cd /etc/alternatives

11. rm /etc/alternatives/psql

12. ln -s /usr/lib/postgresql10/bin/psql /etc/alternatives/psql

And then the job is done! 😀

View solution in original post

15 Replies
Knowledge Partner Knowledge Partner
Knowledge Partner

I just checked my GMS which is running on SLES 12 SP5 and it is using PostgreSQL 10.  This server was built with SLES 12 SP3 (which I believe already used PostgreSQL 10) and has since been upgraded to SP4 and then SP5.  So PostgreSQL version has not changed.

So partial answer for you is yes, GMS runs on PostgreSQL 10.  However, I'm not sure what the best method is for upgrading PostgreSQL and whether it is supported.  The docs do say that a SLES 12 to 15 upgrade is not supported.

I assume your GMS was built on an older version of SLES.  You might want to consider building a new server.  I have done that sometimes to limit downtime.  It is a fairly quick and painless process.  But I will see if I can find anything more for you.

--
Ken
Knowledge Partner

Create and vote for enhancements in the Idea Exchange forums!
Don't forget to Like helpful posts and mark Solutions!
Micro Focus Expert
Micro Focus Expert

@ketter @JvdMeij 

We have not seen the update remove PostgreSQL v9.  We upgraded our corporate GMS server from SP3 to SP4 to SP5 and it is still running strong.  I don't have access to that server to check the versions of PostgreSQL running on it but not only our corporate server has been upgraded but many customers have upgraded without issue as well.

Pam

Knowledge Partner Knowledge Partner
Knowledge Partner

I agree to @ketter  -  I have upgraded more than one GMS server to sles 12 sp5 and never ran into a problem ...

Diethmar Rimser
This community is more powerful if you use Likes and Solutions
Commodore
Commodore

Thanks all for the answers. To be honest I ran the update from SLES 12 SP4 to SLES 12 SP5 almost with my eyes closed and accepted the default questions. After that the postgressql did not start because it complained that my db was created with 9.4 which was absent on the system. Postgresql 10 was available.  In the softwaremanager this was visible also.

Because I ran out of time I returned to the snapshot before the upgrade.

Based on your answers I will try the following:

- look if I can upgrade the db 'in place' to version 10 according to this guidance https://docs.bmc.com/docs/btco113/migrating-the-data-from-postgresql-9-x-to-10-x-800581922.html.

Packages for 10 are available already in SP4.

- do the upgrade to SP5 afterwards

I will let you know!

 

 

-

 

 

0 Likes
Commodore
Commodore

Happy!

I upgraded the db to version 10 this way:

database is in /var/lib/pgsql/data (I have more folders there from old db's like data93 and data83)

1. rcgms stop

2. rcpostgresql stop

3. install postgresql10, postgresql10-contrib, postgresql10-server (important: do not remove version 94!!!)

4. su - postgres

5. /usr/lib/postgresql10/bin/initdb /var/lib/pgsql/data10 (create a new database, use the initdb from 10!)

6. /usr/lib/postgresql10/bin/pg_upgrade -v -d /var/lib/pgsql/data -D /var/lib/pgsql/data10 -b /usr/lib/postgresql94/bin -B /usr/lib/postgresql10/bin

(-v = verbose, -d=original db, -D=destination db -b =  original binaries -B = new binaries)

This moves the data from the old to the new database.

Still as postgres user, move data in place:

7. mv /var/lib/pgsql/data /var/lib/pgsql/data94

8. mv /var/lib/pgsql/data10 /var/lib/pgsql/data

9. remove postgresql94, postgresql94-contrib, postgresql94-server

And than, one tiny thing: the command psql is a symbolic link. If you do not adjust it to the right binaries you will have an empty dashboard in gms!

10. cd /etc/alternatives

11. rm /etc/alternatives/psql

12. ln -s /usr/lib/postgresql10/bin/psql /etc/alternatives/psql

And then the job is done! 😀

View solution in original post

Knowledge Partner Knowledge Partner
Knowledge Partner

Likely a  little typo in step 8. I'd guess

mv /var/lib/pgsql/data10 /var/lib/pgsql/data10

shall read

mv /var/lib/pgsql/data10 /var/lib/pgsql/data

 

If you like it: like it.
Commodore
Commodore
You're right. I corrected it.
0 Likes
Commodore
Commodore

Pardon me for interrupting. I thought there were recommendations that we not upgrade OS versions for GMS. I upgraded mine last year and was told I should build a new one instead to prevent issues. Probably issues like this one you're describing.

I also was told that we can't perform in place version upgrades of GMS or even migrate a current GMS deployment to a new host system. I asked last spring when the most current version was released. At the time I made some snide remarks about the product that may have not been appropriate. After working on Groupwise for 25 years I have a right to point out poor engineering choices.

0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

I understand your points.  And it is a pain dealing with poor engineering choices.  But we are just trying to help people deal with those.  My thoughts are...

* SLES 12 to SLES 15 upgrade - not supported for GMS
* SLES 12 SP3 to SLES 12 SP5 - worked fine for me.  The OP in this case started with an earlier SP and ran into a PostgreSQL version upgrade issue.
* In-place upgrades of GMS itself?  I suppose it depends upon how big of a jump it is.  I patch GMS without a problem.
* Migrating GMS to new host?  Not supported, but not worth the hassle, in my opinion.

I summarize it this way: For minor patching/updates to OS or GMS, go ahead and do it.  For major jumps in OS or GMS, stand up a new system and move users to it.  I have done this and the process works very well with no downtime.

--
Ken
Knowledge Partner

Create and vote for enhancements in the Idea Exchange forums!
Don't forget to Like helpful posts and mark Solutions!
Knowledge Partner Knowledge Partner
Knowledge Partner

Well @raronson in case of OS upgrades I would recommend to start with a new server. Nevertheless there is description how to upgrade GMS on sles11 to sles12. Maybe it is not easy and you have to follow several steps to upgrade - an immediate update to sp5 is not recommended because of database troubles ...

But this post started with updating sles12sp4 to sles12sp5. This is in some way "just" patching a server. I did not have problems doing sp to sp updates around GMS and GroupWise.

IT world can change from os to a new os versions because it can/will influence running applications like GroupWise. I.e. suddenly version and behavior of python has changed ...

Diethmar Rimser
This community is more powerful if you use Likes and Solutions
0 Likes
Commodore
Commodore

Agree! And indeed this was a SLES 12 SP4 to SP5 upgrade. Not clear why this upgrade removed the older Postgresql from my server. The manual upgrade of Postgresql was to work around this issue and do the SP upgrade afterwards.

P.S. I did the upgrade to SP5 after the db upgrade and had no problem at all.

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.