Skip to content

Latest commit

 

History

History
212 lines (170 loc) · 8.42 KB

nas.md

File metadata and controls

212 lines (170 loc) · 8.42 KB

Installation and configuration

Generic info/configuration

  • access:
  • enable ssh at Control Panel --> Terminal & SNMP --> Terminal
  • enable email notifications at Control Panel --> Notification --> Email
    • use a dedicated gmail account
    • add personal email to the recipients (rule: warning)
    • change subject prefix from [<ip>] to [<hostname>]

Storage, data and health

  • 4x4TB Seagate Ironwolf HDDs
  • raid type: SHR (1-drive fault tolerance)
  • file system: Btrfs
  • enable drive health report at Storage Manager --> HDD/SSD --> Settings --> Advanced
  • enable active insight at Package Center --> Active Insight
  • create a separate shared folder for each user at Control Panel --> Shared Folder
    • enable encryption
    • enable recycle bin
    • enable checksum
  • enable SMB at Control Panel --> File Services --> SMB
  • enable rsync service at Control Panel --> File Services --> rsync
  • install download station at Package Center --> Download Station
    • create a "P2P" shared folder (without recycle bin and checksum)
    • create a dedicated P2P user which can only access this shared folder (this account will be used for accessing Download Station and the downloaded files)

Surveillance

  • enable FTP service at Control Panel --> File Services --> FTP
    • create a "CCTV" shared folder (without recycle bin and checksum)
    • create a dedicated FTP user which can only access this shared folder (XVR will log in and sync CCTV data using this account)
  • install surveillance station at Package Center --> Surveillance Station
    • integrate IP cam(s) using ONVIF

D-Link DCS-8526LH

  • Surveillance Station --> IP Camera --> Add
  • network scan does not find the device --> add it manually
    • D-Link
    • DCS-8526LH
    • see pw on bottom of the device
    • install mydlink app
      • update firmware
      • set timezone (done automatically)
    • connect through ONVIF with Synology, the camera will be managed by Synology after this and can be removed in mydlink app
    • set resolution, fps, bitrate etc

Scheduled tasks

  • schedule tasks at Control Panel --> Task Scheduler

Task 0: empty recycle bins

Task config
  • user: root
  • schedule: repeat daily
  • action: empty all recycle bins
  • retention policy: number of days to retain deleted files: 14

Task 1: send email reminders

Shared folder
  • create a "mail" shared folder (with encryption, recycle bin and checksum)
  • create a dedicated mail user which can only access this shared folder
    • this account will be used to send automated email reminders
    • this folder will contain the sendmail script and the email messages
SMTP config
Task config
  • user: dedicated mail user
  • schedule: custom
  • notification: send run details by email
  • run command: bash /volume1/mail/send-mail.sh
$ cat send-mail.sh
#!/bin/bash
/sbin/sendmail -v -t < /volume1/mail/msg.txt
$ cat msg.txt
To: <your-email>
From: <your-email-configured-in-smtp-relay>
Subject: test

<your-message>

Task 2: remove old CCTV files

Task config
  • user: dedicated ftp/cctv user
  • schedule: repeat daily
  • notification: send run details by email
  • run command: bash /volume1/cctv/cleanup.sh
$ cat cleanup.sh
#!/bin/bash

LOG_FILE="/volume1/cctv/cleanup.log"

echo "[START] $(date)" >> $LOG_FILE

find "/volume1/cctv/192.168.1.101" -mtime +60 -type f -exec rm -v "{}" \; >> $LOG_FILE 2>&1 \
&& echo "[SUCCESS - removing files] $(date)" >> $LOG_FILE \
|| echo "[FAIL - removing files] $(date)" >> $LOG_FILE

find "/volume1/cctv/192.168.1.101" -depth -type d -exec rmdir -v "{}" \; >> $LOG_FILE 2>&1 \
&& echo "[SUCCESS - removing folders] $(date)" >> $LOG_FILE \
|| echo "[FAIL - removing folders] $(date)" >> $LOG_FILE

echo "[FINISH] $(date)" >> $LOG_FILE

Hardware & power

  • disable hibernation at Control Panel --> Hardware & Power --> HDD Hibernation
    • XVR is syncing data every hour via FTP so hibernation (with its frequent spinning up and down) might do more harm than good
  • enable UPS at Control Panel --> Hardware & Power --> UPS
    • UPS type: USB UPS
    • set time before NAS enters standby mode: 20 mins

Update and backup

  • enable auto config backup at Control Panel --> Update & Restore --> Configuration Backup
  • enable auto DSM update at Control Panel --> Update & Restore --> DSM Update --> Update Settings

Security

DNS

  • hostname: chronos

Other

OpenVPN