🛠 Deploy an Automated High-Performance NAS on CM3588
FriendlyElec CM3588 SOM (Rockchip RK3588) · avance · Configurez un serveur de fichiers robuste avec stockage RAID logiciel et synchronisation automatique pour exploiter la bande passante 2,5 GbE du CM3588.
Objectives\nThis tutorial aims to transform your CM3588 board into a high-performance and automated Network Attached Storage (NAS) server. By leveraging the 2.5 GbE Ethernet controller (RTL8125B) and PCIe interfaces, we will configure a resilient file system and set up backup scripts. The goal is to utilize the RK3588's computing power to handle indexing and transfer tasks without latency, while ensuring data integrity through periodic verification mechanisms. This use case is ideal for advanced users wanting to centralize their media or professional data with low energy consumption.\n\n## Required Hardware\n- CM3588 Board (standard or Plus version) with at least 8 GB of RAM.\n- Compatible carrier board or expansion module exposing PCIe lanes.\n- Hard drive or NVMe/SATA SSD (depending on the connector used).\n- Stable 5-20VDC power supply (recommended: 12V/3A for stability under load).\n- Cat6 or higher Ethernet cable to achieve 2.5 Gb/s.\n- Recent Linux operating system (Ubuntu 22.04/24.04 or Debian 12) compiled for RK3588.\n\n## Steps\n1. Storage Preparation: Identify your disk with lsblk. Create a single partition on the target disk (e.g., /dev/nvme0n1) using fdisk or parted.\n2. Software RAID Configuration: For redundancy, install mdadm.\n ``bash\n sudo apt install mdadm\n sudo mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1\n echo 'DEVICE /dev/sda1 /dev/sdb1' | sudo tee -a /etc/mdadm/mdadm.conf\n `\n3. Formatting and Mounting: Format the volume as ext4 and mount it.\n `bash\n sudo mkfs.ext4 /dev/md0\n sudo mkdir /mnt/nas\n echo '/dev/md0 /mnt/nas ext4 defaults 0 2' | sudo tee -a /etc/fstab\n sudo mount -a\n `\n4. Samba Installation: Configure the network share.\n `bash\n sudo apt install samba\n sudo nano /etc/samba/smb.conf\n `\n Add the share section with appropriate permissions.\n5. Backup Automation: Create a bash script using rsync to copy data to remote storage or another disk.\n `bash\n #!/bin/bash\n rsync -av --delete /mnt/nas/ /mnt/backup/\n `\n6. Cron Scheduling: Edit the crontab to run the script daily.\n `bash\n sudo crontab -e\n # Add: 0 2 * * * /usr/local/bin/backup.sh\n `\n\n## Verification\nCheck the RAID status with cat /proc/mdstat. Test network transfer speed with iperf3 between the CM3588 and a client to confirm ~2.5 Gb/s throughput. Ensure Samba logs (/var/log/samba/`) report no access errors.\n\n## Further Reading\nIntegrate Nextcloud for a web-based file management interface. Use the remaining 4 TOPS of the NPU for intelligent image indexing via local AI models.