| Sv translation | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||
Существует три режима хранения данных в БД (базе данных):
Режим хранения вы выбираете при установке Traffic Monitor, по . По умолчанию инсталлятор предлагает режим Normal (обычный). В процессе эксплуатации режим хранения может быть изменен.Для того, чтобы настроить режим хранения Fast/slow (быстрые и медленные диски), проверьте наличие свободного места в разделе
Режим Fast/Slow disksСистема переносит данные с быстрого диска на медленный каждую ночь. Если вы переходите с режима Normal на режим Fast/Slow, на вашем старом разделе хранится большой объем ЕТП и вы указываете старый раздел в качестве быстрого диска, то перенос данных может занять продолжительное время.
Система создает ЕТП каждую ночь так, и выполните следующие действиячтобы в БД всегда были ЕТП для работы в ближайшие шесть суток, не включая текущие. Поэтому если при переходе с режима Normal на режим Fast/Slow в качестве быстрого диска указать новый раздел, то первые семь суток Система будет сохранять события в уже созданные ЕТП на медленном диске. При этом новые ЕТП будут создаваться на быстром диске. Для настройки режима Fast/Slow мы будем использовать новый раздел Чтобы настроить режим хранения Fast/Slow (быстрые и медленные диски):
Для того, чтобы Чтобы перейти обратно в режим хранения Normal:
Режим RotateЧтобы настроить режим хранения хранения Rotate (ежедневное переключение):
|
| Sv translation | ||||||
|---|---|---|---|---|---|---|
| ||||||
There are three modes of storing data in DB:
You select storage mode when installing Traffic Monitor. By default, the installer offers you Normal mode. You can change the storage mode later. To configure Fast/Slow storage mode (fast and slow disks), check if there is free space in the
Fast/slow disks ModeThe System moves data from the fast disk to the slow one every night. If you are switching from Normal mode to Fast/slow mode, you store a large amount of DTS on your old partition, and you specify the old partition as a fast disk, then data transfer may take a long time.
The System creates DTSs every day in such a way that the database always has DTS for the next six days, excluding the current day. So, if when switching from Normal mode to Fast/slow mode, you specify a new partition as a fast disk, then, for first seven days, the System will save events to the already created DTS on the slow disk. In this case, and follow the steps belowthe System will create new DTSs on the fast disk. For configuring Fast/slow mode, we will use the new partition To configure "Fast/slow" storage mode (fast and slow disks): Make sure that the partition paths you use correspond to those specified in this article.
Предупреждение | | |||||
|
| Информация | ||
|---|---|---|
| ||
The System allows using multiple slow disks. |
| Информация | ||
|---|---|---|
| ||
In Fast/slow mode, the screenshot tablespaces are stored in slow partitions only. |
To switch back to the Normal storage "Normal" storage mode:
- Check the contents of the
/u02/pgdata1/fast disk directory:ls /u02/pgdata1/ - Check the contents of the
/u03/pgdata1pgdata/slow disk directory:ls/u03/pgdata1pgdata/ - Log into the database:
su - iwtm– to connect to the local database
psql -p 5433 -h <DB_server_IP_address> postgres iwtm
psql -p 5433 -h 127.0.0.1 postgres iwtm - Change the storage period on fast disks:
select pkg_part_set_fast_days(-1);
The "-1" value is specified to transfer tablespaces for today. - Run the task to transfer the tablespaces from fast disks to slow disks:
select iwtm.pkg_part_move_fast_tablespaces_to_slow(); - Check the contents of the fast disks directory. The tablespaces that are created for future dates should remain. Such tablespaces should be manually deleted by using the iw_space_manager service:
iw_space_manager tbs:delete <tbs_id>
or via the database (if you do not use Data Storage):select pkg_part_delete_tablespaces(<tbs_id>);
Such tablespaces should be manually deleted via the database. - Start a job to create a tablespaceRun the task (cron) of the iw_space_manager service to create DTSs imidiately:
iw_space_manager cron
or start a job in the database (if you do not use Data Storage):/opt/iw/tm5/bin/dbtools/dbconf-jobs-postgres.sh start iwtm_add_parts - Check that all tablespaces have been transferred from the fast disks:
ls /u02/pgdata1/ - Check that the tablespaces for future dates have been created on the slow disks:
ls -alt /u03/pgdata/ - Enable Normal mode:
select pkg_part_set_filesys_type('normal');
Rotate Mode
To configure "Rotate storage " storage mode (daily rotation):
- Mount the partition and make sure that it can be mounted automatically on reboot.
- Create the
pgdatafolder:mkdir /u03/pgdata - Change the user:
chown -R postgres:postgres /u03 - Log into the database:
su - iwtmpsql -p 5433 -h <DB_server_IP_address> postgres iwtmpsql -p 5433 -h 127.0.0.1 postgres iwtm– to connect local database - Add a path to the second partition:
select pkg_part_set_df_path('/u03/pgdata/',2); - Specify a new number of paths:
select pkg_part_set_df_path_cnt(2);
- Switch to rotate mode:
select pkg_part_set_filesys_type('rotate');
postgres=# select * from setting where setting like 'df_%';
setting | value | editable
-------------+---------------+----------
df_path1 | /u02/pgdata1/ | 1
df_path2 | /u03/pgdata/ | 1
df_path_cnt | 2 | 1
df_filesys_type | rotate | 1
| Информация | ||
|---|---|---|
| ||
Specifics of the data storage modes (normal, fast/slow, and rotate) Parameters of modes are stored in the |