Using NAS for Mavis Remote Storage
1. Prepare an Ubuntu Machine and Mount NAS
To mount NAS (usually via NFS or SMB/CIFS) on Ubuntu, follow the steps according to the protocol.
This example uses NFS.
Install NFS utilities
sudo apt update
sudo apt install nfs-common -y
Create a mount point
sudo mkdir -p /mnt/nas
Mount the NFS share
Format: {NAS_IP}:{NAS_shared_directory}
Example: 192.168.89.249:/volume1/mavis_backup
sudo mount -t nfs 192.168.89.249:/volume1/mavis_backup /mnt/nas |
- Verify mount
df -h | grep nas |
Enable automatic mount at boot
Edit
/etc/fstab:
sudo vi /etc/fstab |
Add the following line:
192.168.89.249:/volume1/mavis_backup /mnt/nas nfs defaults 0 0 |
2. Install MinIO
Download MinIO
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2023-04-13T03-08-07Z -O minio chmod +x minio mv minio /usr/local/bin/ |
Verify installation
/usr/local/bin/minio --version |
- Set MinIO login credentials
export MINIO_ROOT_USER=${USER}
export MINIO_ROOT_PASSWORD=${PASSWORD} |
Password must be at least 8 characters. If you skip, the default credentials are minioadmin/minioadmin.
- Start MinIO Server
- The server will store data in the mounted NAS directory /mnt/nas and listen on the specified ports. In this example:
- Port 9001: Web Console
- Port 9000: API Access
- Start MinIO in the background (remember to configure auto-start on server reboot):
nohup /usr/local/bin/minio server /mnt/nas --address :9000 --console-address :9001 & |
- Check Service Status (Port Listening Indicates Running)
ss -tulnp |grep minio |
If the service does not start, check logs for errors:
tail -f nohup.out |
3. Create a MinIO Bucket
Open a browser and go to http://<minio-server-ip>:9001 Enter username (default: minioadmin) Enter password (default: minioadmin) Click Login |
Navigate to Buckets Click Create Bucket |
Enter a Bucket Name (custom name) Click Create Bucket Note: Other settings can be configured as needed. This example keeps defaults. |
Successfully created bucket. |
4. Configure Remote Storage Path
Only users with administrator role can configure remote storage through the management interface.
Go to Management Interface Select System Administration Select Remote Storage Settings Click Edit |
Enable Remote Storage Remote Storage Provider: Select S3 Access Key ID: Enter MinIO username (default: minioadmin) Secret Access Key: Enter MinIO password (default: minioadmin) Bucket Name: Enter the bucket created in MinIO (e.g., "mavis-log") Protocol: Choose the protocol used when creating MinIO (HTTP in this example) URL: Enter MinIO URL in format minio-ip:9000 (e.g., 192.168.89.191:9001) Test Connection: Verify connection to MinIO Save |
5. Verify Remote Storage Log Migration
Once the remote storage path is configured:
All new connection logs (including video files) will immediately be copied to the remote path.
Existing logs will be gradually copied over within six hours.
Connect to the device, perform operations, then disconnect.
Accessing MinIO
After successful login, navigate to the corresponding bucket in the remote storage path. You will see two folders:
Logs: Stores audit logs (may not be immediately visible; see notes)
Media: Stores connection records, including video files