Setting up storage on a separate disk [Документация VAS Experts]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:dpi:dpi_components:qoestor:configuration:disc:split:start [2021/08/16 12:25] – created arusnaken:dpi:dpi_components:qoestor:configuration:disc:split:start [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== Setting up storage on a separate disk ====== 
-{{indexmenu_n>1}} 
  
-By default, all data is stored in the /var section. 
- 
-For example you have a separate drive connected to /storage. 
- 
-  - Work from the root user <code>sudo su</code> 
-  - Stop the recievers and DB <code>fastor-stop 
-fastor-db-stop</code> 
-  - Create dictionaries in the /storage section<code>mkdir /storage/qoestor 
-mkdir /storage/qoestor/clickhouse 
-mkdir /storage/qoestor/clickhouse-hot 
-mkdir /storage/qoestor/clickhouse-cold 
-mkdir /storage/qoestor/dump 
-</code> 
-  - Copy tha data on the new drive <code>cp -r /var/lib/clickhouse/* /storage/qoestor/clickhouse 
-cp -r /var/lib/clickhouse-hot/* /storage/qoestor/clickhouse-hot 
-cp -r /var/lib/clickhouse-cold/* /storage/qoestor/clickhouse-cold 
-cp -r /var/qoestor/backend/dump/* /storage/qoestor/dump 
-</code> 
-  - Change the folder owner /storage/qoestor/clickhouse <code>chown -R clickhouse:clickhouse /storage/qoestor/clickhouse 
-chown -R clickhouse:clickhouse /storage/qoestor/clickhouse-hot 
-chown -R clickhouse:clickhouse /storage/qoestor/clickhouse-cold 
-</code> 
-  - Delete the old dictionaries <code>rm -rf /var/lib/clickhouse 
-rm -rf /var/lib/clickhouse-hot 
-rm -rf /var/lib/clickhouse-cold 
-rm -rf /var/qoestor/backend/dump 
-</code> 
-  - Create simlinks <code>ln -s /storage/qoestor/clickhouse /var/lib/clickhouse 
-ln -s /storage/qoestor/clickhouse-hot /var/lib/clickhouse-hot 
-ln -s /storage/qoestor/clickhouse-cold /var/lib/clickhouse-cold 
-ln -s /storage/qoestor/dump /var/qoestor/backend/dump 
-</code> 
-  - Check the links <code>readlink -f /var/lib/clickhouse 
-readlink -f /var/lib/clickhouse-hot 
-readlink -f /var/lib/clickhouse-cold 
-readlink -f /var/qoestor/backend/dump 
-</code> 
-  - Start the DB <code>fastor-db-restart</code> 
-  - Start the recievers <code>fastor-restart</code>