Storage

CloudShark stores capture files, in the directory /usr/cloudshark/data. When deploying CloudShark using the OVA, this is a symlink to /storage/data which is located on a second data disk. See the File System page for more information.

A common scenario is to mount a remote file system on a CloudShark host, to improve the size, speed, and robustness of the system storage. This article details how to change the default storage directory if you are not deploying CloudShark using the OVA.


Updating the Directory

Do not adjust the directory location by manually editing the cloudshark.conf file. This is not supported.

In this example we will use /mnt/data as an external storage location that has been mounted.

1. Stop CloudShark

To ensure no new files are uploaded while updating the storage directory, stop CloudShark by running:

systemctl stop cloudshark-full

2. Set Owner

Grant ownership of the new directory to the cloudshark user and group:

chown cloudshark.cloudshark /mnt/data

You must create a symbolic link for theĀ /usr/cloudshark/data directory to point to your new storage directory. To rename the existing storage directory and create the symbolic link run:

mv /usr/cloudshark/data /usr/cloudshark/data.original
ln -s /mnt/data /usr/cloudshark/data

4. Copy Files

Copy all of the existing files from the original storage location to the new location:

cp -r /usr/cloudshark/data.original/* /mnt/data

5. Start CloudShark

Once the files from the original storage location have been copied, CloudShark can be started by running:

systemctl start cloudshark-full