Skip to main content

Using an external USB Recording Disk with EVVR Container

How to use an external USB disk for EV recordings

Updated this week

Limitations

  • The host system running the container must support the file system used to format the USB disk. If Media Manager is to be used with the USB disk, the machine running media manager must also support that file system. For interoperability with Windows ExFAT is recommended as the disk format. If the disk isn’t going to be with Media Manager then ext4 is recommended for the disk format.

  • The container doesn’t have control over detecting and ejecting USB disks in the same way as the hardware devices do.

    • The container must be stopped before the USB disk is ejected using the host system’s tools.

    • The USB disk must be mounted using the host systems tools and ready to record before the container is started.

    • The container will attempt record to the location it is configured to, regardless of whether the disk has been mounted in that location or not.

  • Video data will be written to this disk at the rate that it comes off all the cameras attached to the container. This can be significant compared to the available bandwidth on USB 2 connections. If the container isn’t able to send data to the disk fast enough, then some footage may be lost and not recorded. For that reason we recommend using a USB 3 SSD device on a USB 3 port on the host system. We don’t recommend attaching multiple devices using a hub, as this shares a single connection between all those devices.

Note that files are saved using group 5001 by default

Your container will save its recording files as root/5001 by default. This value can be changed during installation.

Recommended Specification

  • Disk Size: min 16GB, max 2TB

  • Disk Type: USB 3 SSD

  • Container Host Port Type: USB 3

Example: Using a USB disk with Raspberry Pi OS Lite 64-bit

This example is based on a deb installation

Overview of Steps

  1. Identify the disk in Raspberry Pi OS.

  2. Configure Raspberry Pi OS to mount the disk in a specific location.

  3. Configure EdgeVis Container to record to that location.

  4. Restart Pi and verify recording resumes.

Identify the disk in Raspberry Pi OS

  1. Insert the USB disk into one of the blue USB ports on the Pi.

  2. Open a terminal to the Pi so you can run commands.

  3. Enter the following commands:

lsblk

The output should look similar to this:

NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 14.4G 0 disk
└─sda1 8:1 1 14.4G 0 part
mmcblk0 179:0 0 14.8G 0 disk
├─mmcblk0p1 179:1 0 512M 0 part /boot/firmware
└─mmcblk0p2 179:2 0 14.3G 0 part /
  1. sda1 in the above example is the ‘device name’ of the FAT32 partition on the USB drive that has been plugged in. This may be different on your system. You can see the MOUNTPOINT column is empty and the SIZE column should match approximately the capacity of the drive.

  2. Enter the following command, replacing sda1 with the name of the device on your system:

sudo blkid -ps UUID /dev/sda1

The output will look similar to this:

/dev/sda1: UUID="CEAC-9722"

Take note of the UUID value returned. In this case CEAC-9722.

Configure Raspberry Pi OS to mount the disk in a specific location

Create the location that the disk will be mounted to by entering this command:

sudo mkdir -p /mnt/recordings

Open the disk configuration for editing by entering this command:

sudo nano /etc/fstab

Add this line to the bottom of the file and save it, replace CEAC-9722 with the UUID identified for your disk:

UUID=CEAC-9722 /mnt/recordings vfat defaults 0 2

Mount the drive manually by entering this command:

sudo mount /mnt/recordings

The output will look like this but can be ignored:

mount: (hint) your fstab has been modified, but systemd still uses
the old version; use 'systemctl daemon-reload' to reload.

Check the drive was mounted by entering this command:

df -h

Output should look similar to this, the last line shows the recording disk mounted at the required location:

Filesystem      Size  Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 807M 16M 792M 2% /run
/dev/mmcblk0p2 15G 3.1G 11G 23% /
tmpfs 4.0G 0 4.0G 0% /dev/shm
tmpfs 5.0M 48K 5.0M 1% /run/lock
/dev/mmcblk0p1 510M 56M 455M 11% /boot/firmware
tmpfs 807M 0 807M 0% /run/user/1000
/dev/sda1 15G 32K 15G 1% /mnt/recordings

Configure EdgeVis Container to record to that location


Stop the container using the following commands:

cd /srv/edgevis-encoder/
sudo docker-compose -f edgevis-encoder.yml down


Open the container configuration using this command:

sudo nano edgevis-encoder.yml


Look for this section in the file:

        volumes:
- edgevis-config:/config
- edgevis-recordings:/mnt/recordings
- /dev:/dev


Change the following line:

            - edgevis-recordings:/mnt/recordings

To this:​

            - /mnt/recordings:/mnt/recordings

Find this section in the file:

volumes:
edgevis-config:
external: true
name: edgevis-config
edgevis-recordings:
external: true
name: edgevis-recordings

Remove the last 3 lines so it looks like this:

volumes:
edgevis-config:
external: true
name: edgevis-config

And then save the file.

Start the container using this command:

sudo docker-compose -f edgevis-encoder.yml up -d










Did this answer your question?