Connecting a new partition for recording storage
Overview
Storage of large recording volumes should be organized on external file storages, connecting them to the platform via S3 or NFS.
This article shows possible options for cases where the recording storage placement was not specially configured and recording was done to local cluster disks, and the storage must be increased or the server partition changed.
Changing the recording path on the server (new extended partition).
Starting point:
-
Incoplax stores recordings locally (not in S3).
-
Incoplax writes inside the container to the file system directory /var/lib/era_files/recpath (default in the config, or another).
-
In the container the internal file system directory /var/lib/era_files/recpath (default at installation, or another) is mounted as a volume to the folder specified at installation (by default /opt/era/era_recpath).
-
A new disk/partition is connected to the server and mounted to some system directory (for example, /mnt/storageN).
|
This must be done on each server, or on those where recording files may be placed and where new partitions are connected. |
Correct path
Use the container update procedure. That is, reinstall the container from the distribution, connecting it during installation to the existing (the same as during initial installation) master domain postgresql DB, with the same installation parameters as before, only specifying a new directory for the recpath volume: for example, instead of /opt/era/era_recpath specify /mnt/storageN.
Short path
Does not require container reinstallation but requires a container restart at a convenient time. A symlink is used (optionally a bind mount can be used).
Step 1. On the host, the /opt/era/era_recpath folder (default; another is specified at installation) should be moved to /opt/era/era_recpath.old. The current container will continue working with it due to the inode binding made during the previous container start.
mv /opt/era/era_recpath /opt/era/era_recpath.old
Step 2. Create a new folder with the previous name:
mkdir -p /mnt/storage/era/recpath
Step 3. Create a symlink to the folder where the new connected disk/partition is mounted:
ln -s /mnt/storage/era/recpath /opt/era/era_recpath
Step 4. Copy rshare.sign into the folder (a signal for the service that the recording path is placed correctly)
cp /opt/era/era_recpath.old/rshare.sign /opt/era/era_recpath
Step 5. At a suitable time restart the containers, or the whole system via the web interface, so that the newly started containers switch to the new folder via the link.
docker restart era
Step 6. If files and access to them must be preserved, move them from /opt/era/era_recpath.old to /opt/era/era_recpath (or identically straight to /mnt/storage/era/recpath).
mv -r /opt/era/era_recpath.old/domains /opt/era/era_recpath
|
If several different connected disks/partitions are planned for recording storage, a single /opt/era/era_recpath folder can be used with subfolders (subpartitions) inside, each being a symlink to the directory where a separate disk/partition is mounted. In the configuration, aliases should then be added to the corresponding paths, for example instead of /var/lib/era_files/recpath use /var/lib/era_files/recpath/volN, and for each of them add recstorepaths to the server configuration parameter. |