├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # FriendlyElec CM3588 3 | 4 | 5 | The [FriendlyElec (NanoPC) CM3588](https://www.friendlyelec.com/index.php?route=product/product&product_id=294) is a RK3588 based solution with 4/8/16GB LPDDR4x memory and 0/64GB eMMC flash storage. The inital carrier board released with the CM3588 features 4x M.2 NVMe SSD slots (PCIe 3.0 x1 each) and a 2.5gbps RJ45 port, making it an attractive option for a low powered silent NAS at $130/$145/$174 depending on which RAM configuration you purchase. 6 | 7 | I ordered this in response to the [LTT video](https://www.youtube.com/watch?v=QsM6b5yix0U). I have seen a few people struggling to configure these, and figured I would offer some basic guides in order to get those who need some assistance on getting their NAS up and going. 8 | 9 | I will be using the precompiled Debian 12 installer found [here.](https://drive.google.com/drive/folders/1FoBbP_nPkMehwBj4wHwsbRU-QGjEdeEP) ( 01_Official images > 02_SD-to-eMMC images > rk3588-eflasher-debian-bookworm-core-6.1-arm64-xxxxxxxx.img.gz) 10 | 11 | The [FriendlyElec Wiki](https://wiki.friendlyelec.com/wiki/index.php/CM3588) is actually pretty good, but it can feel like a wall of text/commands to run and can be overwhelming to a new user. 12 | 13 | Want to power this over POE+? I used [this adapter](https://www.amazon.com/dp/B09CYGW46K), and verified it supplies up to 25 watts and passes 2.5gbps. 14 | 15 | Typical power consumption with 4 Micron 2300 NVMe drives and (2) Noctua NF-A4x10 fans @ 5V: 16 | * idle = ~5w idle 17 | * "typical" load = ~7-15w 18 | * stress testing CPU and SSDs = ~20-23w 19 | 20 | I have found that transfering at linerate (2.5gbps) uses about 35% CPU and ~15-20w in my testing. 21 | 22 | I remixed [sgofferj's CM3588-NAS-case](https://github.com/sgofferj/CM3588-NAS-case) to accomadate the case fan screws (M5.5) that come with the Noctua fans. You can find that [here.](https://makerworld.com/en/models/469663) 23 | 24 | ## Installing an OS 25 | Since I bought a 8GB RAM/64GB eMMC model, I will be using an SD to eMMC install image for this guide. You will need a MicroSD card that is 8GB or larger. 26 | 27 | 1) Download Debian 12 Bookworm Core from [here.](https://drive.google.com/drive/folders/1FoBbP_nPkMehwBj4wHwsbRU-QGjEdeEP) ( 01_Official images > 02_SD-to-eMMC images > rk3588-eflasher-debian-bookworm-core-6.1-arm64-xxxxxxxx.img.gz) 28 | 2) Use [Balena Etcher](https://etcher.balena.io/) to write the image to the SD card. 29 | 3) Install the SD card into the CM3588 NAS, then power the unit on. 30 | 4) If you use one of the HDMI out ports, you can track the progress. Otherwise you can wait ~5 minutes (mine consistently takes around 80 seconds to install). 31 | 5) Power down the unit, then power it back on. 32 | 6) If you have HDMI hooked up, you should be prompted at the main login screen. If you want to use SSH, scan your network or check your router/DHCP server for the device's IP address. 33 | 34 | ## Configuring Debian 12 35 | There are 2 accounts by default. 36 | * root/fa 37 | * pi/pi (in the sudoers group) 38 | 39 | In this guide we will be: 40 | * [Changing root password](#changing-root-password) 41 | * [Deleting default/Pi user](#delete-default-user) 42 | * [Creating a new user](#create-a-new-user) 43 | * [Disabling root SSH logins](#disabling-root-ssh-logins) 44 | * [Reconfiguring Apt sources](#reconfigure-apt-sources) 45 | * [Compiling linux-headers for DKMS](#compiling-linux-headers-for-dkms-dynamic-kernel-module-support) 46 | * [Installing ZFS](#installing-zfs) 47 | * [Other guides](#other-useful-links-for-configuring-debian) 48 | 49 | Use your favorite tool to SSH into the unit. 50 | 51 | ### Changing root password 52 | 53 | ```bash 54 | passwd 55 | ``` 56 | Enter a new password, and confirm. 57 | 58 | ### Delete default user 59 | We are going to create our own user, so we don't need this one. 60 | 61 | ```bash 62 | deluser pi 63 | ``` 64 | 65 | ### Create a new user 66 | I am using nas in this example, but feel free to name it whatever you want, then we will add it to sudoers group 67 | ```bash 68 | useradd -m nas 69 | ``` 70 | ```bash 71 | passwd nas 72 | ``` 73 | ```bash 74 | usermod -aG sudo nas 75 | ``` 76 | 77 | ### Disabling root SSH logins 78 | This is for security, as the username is always root and the access rights are unlimited. 79 | 80 | ```bash 81 | sudo nano /etc/ssh/sshd_config 82 | ``` 83 | Go to line 33, change `PermitRootLogin yes` to `PermitRootLogin no`. 84 | ```bash 85 | systemctl restart sshd 86 | exit 87 | ``` 88 | SSH back in as your newly created user 89 | 90 | ### Reconfigure Apt sources 91 | By default the sources file comes with a mirror that is based out of China. While this is _fine_, it would be much faster if you used the local Debian apt sources. So we will change them back. I have commented them out for now. 92 | ```bash 93 | mv /etc/apt/sources.list /etc/apt/sources.list.old 94 | nano /etc/apt/sources.list 95 | ``` 96 | 97 | ```bash 98 | #deb https://mirrors.aliyun.com/debian bookworm main non-free contrib 99 | #deb-src https://mirrors.aliyun.com/debian bookworm main non-free contrib 100 | #deb https://mirrors.aliyun.com/debian-security bookworm-security main 101 | #deb-src https://mirrors.aliyun.com/debian-security bookworm-security main 102 | #deb https://mirrors.aliyun.com/debian bookworm-backports main non-free contrib 103 | #deb-src https://mirrors.aliyun.com/debian bookworm-backports main non-free contrib 104 | 105 | deb http://deb.debian.org/debian bookworm main non-free-firmware contrib 106 | deb-src http://deb.debian.org/debian bookworm main non-free-firmware contrib 107 | 108 | deb http://deb.debian.org/debian-security/ bookworm-security main non-free-firmware contrib 109 | deb-src http://deb.debian.org/debian-security/ bookworm-security main non-free-firmware contrib 110 | 111 | deb http://deb.debian.org/debian bookworm-updates main non-free-firmware contrib 112 | deb-src http://deb.debian.org/debian bookworm-updates main non-free-firmware contrib 113 | 114 | deb http://deb.debian.org/debian bookworm-backports main non-free-firmware contrib 115 | deb-src http://deb.debian.org/debian bookworm-backports main non-free-firmware contrib 116 | ``` 117 | 118 | ### Compiling linux-headers for DKMS (Dynamic Kernel Module Support) 119 | In order to install ZFS, we first need to install linux headers for our kernel to add DKMS support. 120 | 121 | Luckily, pre-compiled headers can already be found in /opt/archives 122 | 123 | ```bash 124 | sudo -i 125 | dpkg -i /opt/archives/linux-headers-6.1.57_6.1.57-11_arm64.deb 126 | ``` 127 | 128 | #### Installing ZFS 129 | Now that we have Linux headers, we can use apt to install ZFS 130 | 131 | ```bash 132 | sudo apt install zfs-dkms zfsutils-linux 133 | ``` 134 | 135 | Now that ZFS is installed, we will try to run a command to test that ZFS and DKMS are actually functional. 136 | 137 | ```bash 138 | zpool status 139 | ``` 140 | 141 | If this works, it will report that we have 0 pools. 142 | If you get an error that says: "The ZFS modules are not loaded. Try running '/sbin/modprobe zfs' as root to load them", that means DKMS isn't working properly and you likely missed a step up above or it failed to compile, which should have given you an error. 143 | 144 | Now that we have ZFS working, we can create our ZFS pool. You have a few options, depending on how much redundancy or performance you want. I would recommend the following options, although there are a few more. You will have to check the [ZFS documenation](https://openzfs.github.io/openzfs-docs/) for any other array types. 145 | 146 | RAIDZ1 (RAID 5) 147 | ```bash 148 | zpool create mypool raidz nvme0n1 nvme1n1 nvme2n1 nvme3n1 149 | ``` 150 | Mirror (RAID 1) 151 | ```bash 152 | zpool create mypool mirror nvme0n1 nvme1n1 nvme2n1 nvme3n1 153 | ``` 154 | Striped Mirror (RAID 10) 155 | ```bash 156 | zpool create mypool mirror nvme0n1 nvme1n1 mirror nvme2n1 nvme3n1 157 | ``` 158 | 159 | Now if we run `zpool status` we should get something like this: 160 | 161 | ```bash 162 | $zpool status 163 | pool: mypool 164 | state: ONLINE 165 | config: 166 | 167 | NAME STATE READ WRITE CKSUM 168 | mypool ONLINE 0 0 0 169 | raidz1-0 ONLINE 0 0 0 170 | nvme0n1 ONLINE 0 0 0 171 | nvme1n1 ONLINE 0 0 0 172 | nvme2n1 ONLINE 0 0 0 173 | nvme3n1 ONLINE 0 0 0 174 | 175 | errors: No known data errors 176 | ``` 177 | 178 | The array will be mounted at /mypool (or whatever you named your pool). You can move the mountpoint to a different location: 179 | 180 | ```bash 181 | zfs set mountpoint=/mnt/storage mypool 182 | ``` 183 | 184 | Since this is all SSD array, I recommend enabling autotrim. Trim marks the invalid data and tells the SSD to ignore it during the garbage collection process, allowing your SSD to do some cleanup on its end. 185 | 186 | ```bash 187 | zpool set autotrim=on mypool 188 | ``` 189 | 190 | Once this is complete, you will be ready to install whatever you would like. 191 | 192 | ## Other useful links for configuring Debian 193 | * [Configuring automatic ZFS scrubs](https://brismuth.com/scheduling-automated-zfs-scrubs-9b2b452e08a4) 194 | * [Setting a static IP](https://wiki.debian.org/NetworkConfiguration) 195 | * [Configuring Debian to install security updates automatically](https://wiki.debian.org/UnattendedUpgrades) 196 | * [Installing Docker](https://docs.docker.com/engine/install/debian/) 197 | * [Installing Yacht (Docker WebUI management)](https://yacht.sh/docs/Installation/Install/) 198 | * [Installing Samba (SMB) server](https://serverspace.io/support/help/configuring-samba-on-debian/) 199 | --------------------------------------------------------------------------------