[MCOL-721] rpm install removes link to actual install location Created: 2017-05-18  Updated: 2017-06-02  Resolved: 2017-06-02

Status: Closed
Project: MariaDB ColumnStore
Component/s: installation
Affects Version/s: 1.0.9
Fix Version/s: 1.0.9

Type: Bug Priority: Major
Reporter: Allan Assignee: David Hill (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

centos 7; XFS



 Description   

Version 1.0.8 for Column Store was installed on a fresh system. For data balancing reasons all of /usr/local/mariadb was moved to a separate drive and a soft link made to the location.

Following update instructions prior to installing version 1.0.9 rpm was used to uninstall 1.0.8 which in the process created the file Columnstore.xml.rpmsave and others in the appropriate linked to directory.

1.0.9 was installed and /usr/local/mariadb/columnstore/bin/postConfigure -u was run. It indicated Old Config File not found '/usr/local/mariadb/columnstore/etc/Columnstore.xml.rpmsave', exiting

The root of the problem turned out to be that as part of the installation, the link was deleted and a new /usr/local/mariadb directory was created and software installed there. This is why the rpmsave file could not be found.

This is serious as both configuration and existing data are in the old linked-to location. It is unknown how much work is involved in manually copying updated files and re-establishing soft links, and whether there are errors in this process



 Comments   
Comment by David Hill (Inactive) [ 2017-05-18 ]

MCOL-426 will explain the problem:

https://jira.mariadb.org/browse/MCOL-426

So you either have to use a softlink at the dataX level or install using binary packages instead of 'rpms.

David Hill

Comment by Allan [ 2017-05-18 ]

rpm packages are being used.

Comment by David Hill (Inactive) [ 2017-05-18 ]

FYI - I updated the Preparing for install and Upgrade guide to explain this use of softlinks for future reference.

https://mariadb.com/kb/en/mariadb/preparing-for-columnstore-installation/

https://mariadb.com/kb/en/mariadb/mariadb-columnstore-software-upgrade-108-to-109/

Comment by Allan [ 2017-05-18 ]

Thanks.

Can you suggest a procedure to do an update when soft links are involved.

Alternatively, and this involves work, an update tool that installs in a specified location

Comment by David Hill (Inactive) [ 2017-05-18 ]

Options are for using softlinks:

set the softlink at /usr/local/mariadb/columnstore/dataX

then you can perform upgrades using rpm packages

But if you have to setup your softlink at /usr/local/mariadb, then you will need to change from install rpm packages to the binary package and following the binary package upgrade section.

Currently root installs are required to go into /usr/local/mariadb, but there is a open MCOL to change this in some future release. But at this point, its required to install in /usr/local/mariadb/

Comment by Allan [ 2017-05-18 ]

Thanks. If the dataX level is a link, does the mysql directory also have to be a link since it has configuration as well?

Comment by David Hill (Inactive) [ 2017-05-18 ]

Its an option to whether you set mysql/db or not. very little columnstore data is store in that directory, but if you have a lot of other non-columnstore data, then you could setup a soft-link there.

Comment by Allan [ 2017-05-18 ]

Update: Here is what I used to create links to MCS data and do an update

After a clean initial install (MCS never on the machine before) do the following to create the links

mkdir -p /data/mariadb/columnstore
cp -pr /usr/local/mariadb/columnstore/data* /data/mariadb/columnstore/
(cd /usr/local/mariadb/columnstore; for x in `/bin/ls -1d  /data/mariadb/columnstore/data*`; do ln -s $x .; done)
cp -pr /usr/local/mariadb/columnstore/mysql/db /data/mariadb/columnstore/mysql/
(cd /usr/local/mariadb/columnstore/mysql; ln -s /data/mariadb/columnstore/mysql/db .)

When you are ready to update, proceed as follows

mcsadmin shutdown y
 
# Remove the old rpms
/bin/rm -v mariadb*.rpm
rpm -qa|grep mariadb | xargs rpm --nodeps -e
 
# Get the update
wget "https://downloads.mariadb.com/ColumnStore/1.0.9/centos/x86_64/7/mariadb-columnstore-1.0.9-1-centos7.x86_64.rpm.tar.gz"
tar xvfz mariadb-columnstore-1.0.9-1-centos7.x86_64.rpm.tar.gz
rpm -ivh mariadb-columnstore-*1.0.9*rpm
 
# Do the update
/usr/local/mariadb/columnstore/bin/postConfigure -u
 
############
# NOTE: You will see an error message:
# post-mysqld-install Successfully Completed
# Error running post-mysql-install, password is needed. check /root/.my.cnf
# Exiting...
 
# IGNORE the message and continue
 
# Restart
mcsadmin start

Generated at Thu Feb 08 02:23:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.