Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
6.1.1
-
None
Description
By default, ColumnStore installs configuration files into the root /etc and /var directories.
This is fine for RPM and DEB builds. However, this is not good for STANDALONE builds.
With standalone builds we're going to allow non-root installations of ColumnStore.
Also, with standalone builds everything should reside inside the same directory, so one can do:
cmake -DCMAKE_INSTALL_PREFIX=/tmp/mariadb
|
make
|
make install
|
tar -zcf mariadb-standalone-binary-distribution.tar.gz /tmp/mariadb/
|
Note, this generally works with MariaDB - unless ColumnStore is enabled.
This patch does the trick:
--- a/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
@@ -43,6 +43,10 @@ SET (ENGINE_DATADIR "/var/lib/columnstore") |
SET (ENGINE_LOGDIR "/var/log/mariadb/columnstore") |
IF (INSTALL_LAYOUT)
|
+ IF (INSTALL_LAYOUT MATCHES "STANDALONE") |
+ SET (ENGINE_DATADIR "${CMAKE_INSTALL_PREFIX}/var/lib/columnstore") |
+ SET (ENGINE_SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc") |
+ ENDIF ()
|
# We are building from MariaDB server submodule if this is set
|
SET(MARIADB_PLUGINDIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_PLUGINDIR}") |
IF (INSTALL_SYSCONF2DIR)
|
However it makes the following directory layout:
[bar@home mariadb-10.6-cs]$ ls -l --group-directories-first /opt/mariadb-10.6-cs
|
total 204
|
drwxr-xr-x. 2 bar bar 4096 Apr 26 16:19 bin
|
drwx------. 9 bar bar 4096 Apr 27 06:43 data <--- MariaDB data directory
|
drwxr-xr-x. 3 bar bar 4096 Apr 26 16:19 include
|
drwxr-xr-x. 4 bar bar 4096 Apr 26 16:19 lib
|
drwxr-xr-x. 4 bar bar 4096 Apr 26 16:19 man
|
drwxrwxr-x. 9 bar bar 4096 Apr 26 16:19 mysql-test
|
drwxr-xr-x. 2 bar bar 4096 Apr 26 16:19 scripts
|
drwxr-xr-x. 32 bar bar 4096 Apr 26 16:19 share
|
drwxr-xr-x. 4 bar bar 4096 Apr 26 16:19 sql-bench
|
drwxr-xr-x. 3 bar bar 4096 Apr 26 16:19 support-files
|
drwxr-xr-x. 3 bar bar 4096 Apr 26 16:19 var <--- ColumnStore data directory
|
-rw-r--r--. 1 bar bar 17987 Apr 26 06:21 COPYING
|
-rw-r--r--. 1 bar bar 2093 Apr 26 06:21 CREDITS
|
-rw-r--r--. 1 bar bar 8245 Apr 26 06:21 EXCEPTIONS-CLIENT
|
-rw-r--r--. 1 bar bar 8782 Apr 26 06:21 INSTALL-BINARY
|
-rw-r--r--. 1 bar bar 2973 Apr 26 06:21 README.md
|
-rw-r--r--. 1 bar bar 19520 Apr 26 06:21 README-wsrep
|
-rw-r--r--. 1 bar bar 86263 Apr 26 06:21 THIRDPARTY
|
It is probably not good that the installation will have separate data directories:
- /data for MariaDB data
- /var for ColumnStore data. Note /var sounds too generic.
So the ColumnStore data directory could be columnstore-data instead of just var.
Serg also proposed to consider putting ColumnStore data directory inside MariaDB data directory: data/.ColumnStore.
In MariaDB one cannot create or drop databases starting with the DOT character. So this should be safe against a query like this:
DROP DATABASE `.ColumnStore` |
Note, do avoid .ColumnStore to pop up in SHOW DATABASES we can add this line inside the server sources:
push_ignored_db_dir(".ColumnStore"); |
Attachments
Issue Links
- blocks
-
MCOL-4793 Make Columnstore installation relocatable
- Open