| Sv translation |
|---|
|
Чтобы освободить пространство на жестком диске, вы можете архивировать устаревшие ежедневные табличные пространства (ЕТП). Процесс архивирования состоит из отключения ежедневных табличных пространств (ЕТП) от базы данных (БД) и их переноса перемещения в заданный каталог (по умолчанию /u02/arch). Данный каталог следует размещать на отдельном носителе, чтобы освободить пространство на диске с оперативными данными и избежать его переполнения. При необходимости они архивированные ЕТП могут быть восстановлены. Архивирование может выполнятьсяВ Системе есть следующие способы архивирования ЕТП: Если в качестве интервала времени используются месяцы или годы, то рекомендуется в расчете использовать максимальное значение интервала. Для месяца – 31 день. Для года – 366 дней. Например, чтобы архивировать ежедневные табличные пространства старше 4 лет, указывайте интервал 366*4=1464 дня.| Предупреждение |
|---|
|
|
Если вам нужно архивировать единичное ЕТП, рекомендуем делать это в веб-интерфейсе Traffic Monitor. Если веб-интерфейс недоступен, используйте утилиту сервиса iw_space_manager. В последнюю очередь используйте архивирование ЕТП вручную через БД.
Архивирование при использовании Data Storage
Если вы используете Data Storage, то вы можете хранить архивированные ежедневные табличные пространства (ЕТП) на медленном диске. Путь к этому при архивировании ЕТП бинарные данные будут перемещены на медленный диск Data Storage.
Если медленный диск не подключен, то в веб-интерфейсе Traffic Monitor при архивировании ЕТП будет указан статус "Архивировано". Но при этом бинарные данные ЕТП будут храниться на быстром диске сервера Data Storage, внутри директории для размещения бинарных данных, указанной при установке хранилища (по умолчанию /opt/dsdata/_seaweedfs).
Путь к медленному диску указывается при установке Data Storage. Подробнее см. InfoWatch Traffic Monitor. Руководство по установке. Установка Платформы.
После установки вы можете Чтобы добавить путь к медленному диску Data Storage следующим образомпосле установки хранилища:
Создайте директорию и смонтируйте в нее медленный диск:
| Блок кода |
|---|
mkdir -p /mnt/slowdisk
mount /dev/<your_slowdisk> /mnt/slowdisk |
Назначьте пользователя и права доступа для директории, в которую смонтировали медленный диск:
| Блок кода |
|---|
chown 1000 /mnt/slowdisk
chmod 700 /mnt/slowdisk |
Откройте деплоймент Data Storage для редактирования с помощью команды:
| Блок кода |
|---|
kubectl -n infowatch edit deployment datastorage-<node_label> |
где <node_label> – здесь и далее это лейбл ноды, на которой установлено хранилище. Для центральной ноды кластера или, если хранилище установлено не в кластере платформенных продуктов, используйте лейбл central. Для офисной ноды лейбл задается при установке, по умолчанию: office.
В секцию containers -> volumeMounts добавьте следующие строки:
| Блок кода |
|---|
- mountPath: /var/lib/dataslow
name: datastorage-dataslow-host-volume-<node_label> |
В секцию volumes добавьте следующие строки:
| Блок кода |
|---|
- hostPath:
path: /mnt/slowdisk
type: ""
name: datastorage-dataslow-host-volume-<node_label> |
- Сохраните изменения и выйдите из редактора.
Если медленный диск не подключен, то в Консоли Управления Traffic Monitor при архивации ЕТП будет указан статус "Архивировано". При этом в Data Storage ЕТП будет хранится на быстром диске в директории /mnt/dsdata/_seaweedfs.
| Sv translation |
|---|
|
To free up disk space on your hard drive, you can archive outdated daily tablespaces (DTS). Archiving process consists of disconnecting DTS from the database and moving them to the specified catalogue (be by default:/u02/arch). You should place this catalogue on the separate disk to free up space on the hard drive with operational data and avoid its overflow. You can recover restore this data if necessary. The archiving can be performedIn the System, there are following ways of archiving DTS: | Предупреждение |
|---|
| If months or years are used as the time interval, we recommend using the maximum value of the interval in calculations. For a month – 31 days. For a year – 366 days. For example, to archive daily tablespaces older than 4 years, specify the interval 366 * 4 = 1464 days. | If you use Data Storage, then you can store archived DTS on a slow disk. You can specify the way to this If you need to archive a single DTS, we recommend to do it in the Traffic Monitor web interface. If the web interface is unavailable, use the iw_space_manager service utility. Last use manual archiving of DTS in the database. Archiving when using Data StorageIf you use Data Storage, then, when archiving DTS, binary data will be moved to the Data Storage slow disk. If the slow disk is not connected, then, in Traffic Monitor web interface, archived daily tablespace will have the "Archived" status. But in this case, binary data of DTS will be stored on the fast disk of the Data Storage server, inside the directory for placing binary data. You specify this directory when installing the storage (by default: /opt/dsdata/_seaweedfs). You specify the path to the slow disk when installing Data Storage. For details, see InfoWatch Traffic Monitor. Installation Guide. Installing Platform. After installation, you can To add the path to the Data Storage slow disk in after installing the following waystorage: Create a directory and mount the slow disk to it: | Блок кода |
|---|
mkdir -p /mnt/slowdisk
mount /dev/<your_slowdisk> /mnt/slowdisk |
Set a user and access permissions for the directory, where you have mounted the slow disk: | Блок кода |
|---|
chown 1000 /mnt/slowdisk
chmod 700 /mnt/slowdisk |
Open the Data Storage deployment for editing. For this use the command: | Блок кода |
|---|
kubectl -n infowatch edit deployment datastorage-<node_label> |
where <node_label> (hereafter) is the label of the node where the storage is installed. For the central node or, if the storage is installed not in the cluster of Platform products, use the label central. For the office node, the label is specified during installation (office by default).
Add the following lines to the containers -> volumeMounts section: | Блок кода |
|---|
- mountPath: /var/lib/dataslow
name: datastorage-dataslow-host-volume-<node_label> |
Add the following lines to the volumes section: | Блок кода |
|---|
- hostPath:
path: /mnt/slowdisk
type: ""
name: datastorage-dataslow-host-volume-<node_label> |
- Save the changes and exit the editor.
If the slow disk is not connected, then, in Traffic Monitor Management Console, archived daily tablespace will have the "Archived" status. In this case, on the Data Storage server, daily tablespace will be stored on the fast disk, in the /mnt/dsdata/_seaweedfs directory- .
|