Re: RPM install but data on different drives?

Les Mikesell <[email protected]> Mon, 27 Oct 2014 15:25:44 -0500
Newsgroups gmane.network.opennms.install
Message-ID <CAOAgVpxu=MLTt4fF-86CcRBCqKGbx6hqpfhjWRmqbhFaqz87pA@mail.gmail.com>
On Fri, Oct 24, 2014 at 11:10 AM, Benjamin Reed <[email protected]> wrote:
> On 10/24/14, 11:46 AM, Les Mikesell wrote:
>> Oops - I accidentally hit something that sent before I was ready
>> there.  Anyway, I want logs one one volume, postgres data one another
>> (probably the default /var) and the rrds on another.   The rpm
>> installer has some some symlinks to put things under /var and
>> complains if you undo that.    Using double symlinks to point the rrd
>> data back to something under /opt works, but seems a little clunky.
>> Is there some better way to do it that won't break in future updates?
>
> It complains because the install scripts in the RPM spec are set up to
> use RPM's "--relocate" option.  I'm not sure yum lets you do it during
> install time, but you can install with RPM the first time and then yum
> should honor the relocations on future upgrades.
>
>   rpm --relocate /var/opennms=/opt/newpath -ivh opennms-*.rpm
>
> /opt/opennms, /var/opennms, and /var/log/opennms are all eligible for
> relocation.
>

Thanks - I hadn't seen much about that option before, but it seems to
work nicely.
 yumdownloader opennms\*
puts a copy of all the opennms rpms in the current directory, then
rpm -ihv --relocate /var/opennms=/opt/var/opennms --relocate
/var/log/opennms=/logs/opennnms opennms-1.13.4-1.noarch.rpm
opennms-core-1.13.4-1.noarch.rpm
opennms-webapp-jetty-1.13.4-1.noarch.rpm
puts the logs on the root volume and rrds under /opt, leaving /var for
postgresql.  The target paths were created automatically with the
symlinks in /opt/opennms adjusted accordingly. I'll do my next install
that way and then add my own symlink at /var/log/opennms where I'd
otherwise expect to find the logs.

-- 
   Les Mikesell
    [email protected]

------------------------------------------------------------------------------
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-install mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-install