AIX Open Source

 View Only
  • 1.  AIXtoolbox rpm package installation directory

    Posted Tue December 05, 2023 12:39 PM

    Hello experts,

    I was wondering if I can install an RPM package downloaded from aix toolbox to a different directory other than the default /opt/freeware?

    We have a project where we need to implement HACMP on an MySQL server. We were   thinking of creating a separate /opt/freeware filesystem and shared it between 2 HACMP nodes. However, since /opt/freeware is the generic location for the rpm packages for AIX, then we are thinking if we can install the mysql rpm package to a different directory/filesystem and share that to the other server instead, and by doing this, we only need to install and maintain the mysql server on 1 node.

    Any help/recommendation/suggetsion is highly appreciated.

    Thanks,

    Sam



    ------------------------------
    Samuel Tan
    ------------------------------


  • 2.  RE: AIXtoolbox rpm package installation directory

    IBM Champion
    Posted Wed December 06, 2023 07:28 AM
    Edited by Andrey Klyachkin Wed December 06, 2023 07:29 AM

    Hi Samuel,

    building a high availability solution you always can implement one of the two strategies:

    • you install application locally on each node and share data between nodes
    • you share application and data between nodes

    Each strategy has its pro et contra.

    In the first case you must install application twice and reconfigure it pointing to the data directory somewhere outside. On the ohter hand you can start application without data or with different data set to check if it is working and it will not stop your production workload. You can test application updates on inactive node and then switch your data to the updated application almost without downtime (only for switching).

    In the second case you should plan longer downtime to update the application, but you only install it once. There are fewer places where the configuration drift between nodes can happen because everything is shared.

    Now answering your question. You can download the RPM packages from the AIX Toolbox and install them manually. Be prepared to download all dependencies. To install them on some other location they must be "relocatable". Then you can use the options --relocate or --prefix to RPM to install them into a new location. Here is some information how to use them. I am not sure if all packages you must install are relocatable. 

    I would suggest you to install MySQL locally on each node and re-configure it to find data on a shared filesystem.

    P.S. I forgot to mention that you can always "hack" RPM packages. Using the command rpm2cpio you can convert them to CPIO archives and then extract files from the archives. After it you can copy the files to any place you want.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 3.  RE: AIXtoolbox rpm package installation directory

    Posted Wed December 06, 2023 08:06 AM

    Thanks Andrey, appreciate your suggestion and info.

    Thanks,

    Sam



    ------------------------------
    Samuel Tan
    ------------------------------



  • 4.  RE: AIXtoolbox rpm package installation directory

    IBM Champion
    Posted Thu December 07, 2023 05:24 PM
    Hi, Sam!

    I'm writing to give you a similar response, but I feel much more strongly about it than Andrey. :)

    You can try to relocate RPM packages, and in some cases that works (RPM supports it, but the package has to be built to be relocatable), but you're still going to have to install the MySQL prerequisites on each machine or try and relocate all of those. Also, you'd have to relocate the RPM database keeping track of the packages installed on the common drive separately, because they would belong to "both" machines or "neither" machine. That is a pain. There will eventually be OS-level prerequisites on which you'll still have to depend per machine. In short, that's not what relocatable RPMs are for.

    The only way you're going to avoid having to maintain the dependencies twice is to install the application in a container (WPAR), and let PowerHA move *that* as the resource. See also: all the reasons why containers are good.

    Otherwise, you can develop a fanatical sense of system hygiene and maintain both systems well, with local installations of *everything* except the data. This lets PowerHA just move the data VG and the application's IP. This is the traditional way of approaching your problem.

    Not related to your question, but a PowerHA thought experiment:  There isn't a primary and a secondary, there are two places on which a workload could run. PowerHA is making sure that the workload is running on one of them.

    Best of luck!

    -- 
    Stephen L. Ulmer
    Enterprise Architect
    Mainline Information Systems








  • 5.  RE: AIXtoolbox rpm package installation directory

    Posted Tue December 12, 2023 07:46 AM

    Thanks Stephen for the information and suggestion. Much appreciated!



    ------------------------------
    Samuel Tan
    ------------------------------