Attaching, Mounting and Expanding Recording Volumes

i

Before making any changes to your recording volume, it's a good idea to backup your volume.

If you need any help with these instructions, please contact Teramind Support at support@teramind.co. Or, click the Chat option from your Teramind Dashboard or Teramind website.

Attaching a Recording Volume

To attach a recording volume to your Teramind appliance, follow the steps below:

  1. Create and attach a disk with your Hypervisor tools
  2. Stop the Teramind service, execute:
    systemctl stop teramind
  3. Run the ‘lsblk’ command to check if the OS is able to recognize the new disk:
    lsblk
    mceclip0.png
  4. Create a new partition with the following command:
    fdisk /dev/sdb
    mceclip1.png Press n to create a new partition, then p to specify it’s a primary one. Leave the rest of the options (First and Last sector) as is: mceclip2.png Press p again to print/view the new partition table: mceclip3.png Press w to write changes to the disk mceclip4.png
  5. Create a file system on the new partition using the following command:
    mkfs.ext4 /dev/sdb1
    mceclip5.png
  6. Verify the new partition is visible by executing the following command:
    lsblk
    mceclip6.png
  7. Find the new partition’s ID by executing the 'blkid' command:
    blkid /dev/sdb1
    Copy the UUID: uuid.png
  8. Edit /etc/fstab, put the UUID from Step 7 above to a mounted record: mceclip8.png
  9. This step is optional. If you don't have any existing recordings in your rec directory, please go to Step 10. Otherwise, do the following to keep the recordings intact (so that you can later resync them in Step 13).
    Rename your current recordings directory to something else (e.g., rec_old):
    cd /usr/local/teramind
    mv rec rec_old
    Create a new directory where future screen recordings will be stored (you can use your old directory name 'rec' since you renamed it already): 
    mkdir rec
  10. Execute the following command to mount the disk:
    mount -o remount -a
    Ensure the disk is mounted with lsblk and df: mceclip9.png
  11. Fix the recording volume permissions to allow the Teramind service to record files with the following commands:
    chown -R prod. /usr/local/teramind/rec
    chmod -R 775 /usr/local/teramind/rec
  12. Start the Teramind service and start recording the screen data to the new disk with the following command:
    systemctl start teramind 
  13. If you created a backup of your previously captured screen recordings (in Step 9), you can now transfer the backup data to the newly mounted disk with the following command:
    rsync -a /usr/local/teramind/rec_old/ /usr/local/teramind/rec
    This might take some significant amount of time depending on how many records currently exist in your rec_old directory. Once rsync is finished, you can safely delete your rec_old directory with the following command:
    rm -rf /usr/local/teramind/rec_old
  14. Open your admin dashboard and verify if the disk is being displayed properly

Mounting a Recording Volume to a NAS

To mount a recording volume to a NAS (Network Attached Storage), follow the steps below:

  1. Add access to files on the NAS within the local network (NFS). Here's an example of how to do that on a Synology NAS:

    How to access files on Synology NAS within the local network (NFS)

    i

    The information provided on the link above is from a third party. The link is provided for your convenience. Teramind cannot verify the accuracy of the information nor is responsible for any damage that may occur from using the instructions.

    You can find similar instructions for other NAS disks online. If not, please contact your NAS provider's technical support.

  2. Stop the Teramind service using the following command:
    sudo systemctl stop teramind

    Transfer your existing recording to NAS with rsync. For example:

    rsync -av /usr/local/teramind/rec/ 192.168.1.88:mnt/Teramind/
    mceclip10.png
  3. Insert the values into the kv_store row. For example:
    insert into kv_store(key,value) values ('nfs.rec_dir','ipaddress:/volumes2/Teramind');
    mceclip11.png
  4. Restart the service using the following command:
    sudo systemctl restart teramind
    mceclip12.png

Expanding a Recording Volume

To expand a recording volume, follow the steps below:

  1. Ensure the OS is able to recognize a resized disk. You might need to reboot it. Use the lsblk command to check:
    expand-1.png
    If it isn’t recognized, force rescan of the disk devices using one of the following commands:
    echo 1>/sys/class/block/sdX/device/rescan
    OR
    echo 1>/sys/class/scsi_device/X:X:X:X/device/block/device/rescan
    mceclip14.png
  2. Execute the fdisk command below to see a partition table:
    fdisk -l /dev/sdX

    Here, sdX stands for your volume. For example:

    mceclip15.png
  3. Execute the fdisk command below to edit the partition:
    fdisk /dev/sdX

    Here, sdX stands for your volume. For example:

    mceclip16.png
  4. Type d at the Command prompt to delete the primary partition: expand-2.png
  5. Type n at the Command prompt to create a new partition: mceclip18.png
  6. Type p for a primary partition and just press Enter at the partition number, first sector and last sector prompts to keep the default values. IMPORTANT: answer No to the "Do you want to remove the signature?" prompt: sig.png
  7. Type p to print/view the partition table and ensure the partition has been resized successfully: mceclip19.png
  8. Make the root partition bootable by typing a at the Command prompt: mceclip20.png
  9. Type p to print/view the partition table and ensure everything looks good: mceclip21.png
  10. Type w to write a modified table: expand-3.png
  11. Update the OS kernel’s table to recognize new disk size by executing the following commands:
    partx --update /dev/sdX
    partx --update /dev/sdX1

    Here, sdX stands for your volume. For example:

    mceclip23.png
  12. Execute the lsblk command to ensure the OS can recognize the new partition size. If it hasn’t, reboot the OS: expand-4.png
  13. If everything looks good, execute the resize2fs command to expand the file system. For example:
    resize2fs /dev/sdX1

    Here, sdX stands for your volume. For example:

    mceclip25.png
  14. Execute the following command to see if the changes have been applied successfully:
    df -h

Expanding a Recording Volume Greater Than 2TB (Secondary Volumes Only)

i

This method will work on secondary volumes only. Please do not attempt this on a primary volume or a root partition.

To attach a recording volume to your Teramind appliance, follow the steps below:

  1. First, you need to access your instance via SSH or directly from your VM's management console (contact support@teramind.co for your login password if you don't already have it): mceclip0.png
  2. Use the sudo and fdisk commands on the volume you have to increase to more than 2 terabytes. 
    sudo fdisk /dev/sdX

    Here, sdX stands for your volume. For example:

    2T-1.png You might see a warning message about DOS partition size limit. You can ignore it: mceclip3.png
  3. Type p to show the partition table: mceclip0.png
  4. Type g to create a new empty GPT partition table: mceclip1.png
  5. Type n to add that partition (leave all entries to their default values): mceclip2.png
  6. Type p to check that the partition table had been modified: mceclip4.png
  7. Type w to save changes to the table: mceclip5.png
  8. Run the following command:
    sudo partprobe
  9. Run the following command to resize the volume:
    sudo resize2fs /dev/sdX1

    Here, sdX stands for your volume. For example:

    sudo resize2fs /dev/sdb1
  10. In some cases, you may need to reboot for the changes to take effect.
Was this article helpful?
0 out of 0 found this helpful