I’ve recently started farming Chia using a lot of harddisk space. To me it’s the ultimate system administrators crypto coin since it doesn’t use GPUs and there is a lot involved getting it to run quickly and correctly! This post will serve as an accompanying posts to my videos about the subject.
First up the videos:
Video one: What is Chia and my USB3 storage setup overview
Video two: Designing a Chia plotting PC
Video three: Select the right NVMe drive for plotting
Video Four: Livestream building a 16 bay + 16 bay external JBOD server
Recommended hardware to use:
❕ All below links can be affiliate links which provide me with a small kickback in case you purchase something. If you use them, thank you very much! 😀 ❕
🌟 Accessories 🌟
👉 M.2 cooling heatsinks: https://geni.us/RGAWk
👉 PCIe to M.2 adapter for adding more NVMe drives: https://geni.us/BKXWZ84
👉 Orico USB hubs:
🌟 Recommended plotter PC Components 🌟
👉 Case – Be Quiet 500DX: https://geni.us/BNNdty
If you are looking for a case that can also mount a lot of HDDs, take a look at the Fractal Design Define 7 XL: https://geni.us/c2DF7fx
👉 Motherboard – Asrock x570 Gaming 4: https://geni.us/Ha6HC
👉 CPU – Ryzen 9 5900x: https://geni.us/gReTaf
👉 Cooler – Scythe Mugen 5 (PCGH): https://geni.us/EOVDBA
👉 Memory – 32GB 3600Mhz: https://geni.us/6G0G
👉 Power Supply – Seasonic 550w: https://geni.us/PAi7cD
👉 Graphics card – NVidia PCIe x1 card: https://geni.us/gbA9Y
👉 Cheapo SSD 128GB: https://geni.us/8SzVfBF
🌟 Mini PCs 🌟
👉 J4125 Gemini Lake Refresh Mini PC (Excellent little machine, configurable up to 16GB of memory!)
Aliexpress (the one I have): https://s.click.aliexpress.com/e/_ACHTKT
👉 Intel 10th Gen i5-10210u Quad-Core Mini PC (Great little machines, less so for plotting, but great as a VM host for instance, configurable up to 32GB of memory!)
Info parts and command-line parts
Here I will add all information and copy&paste command-line parts talked about in the videos.
Tips & Tricks
Update Samsung SSD/NVMe firmware in Linux
Disable Linux “UAS” USB3 Storage driver
I’ve noticed that when using the Linux default “UAS” driver for USB3 storage when there would be prolonged periods of heavy traffic it would stall and timeout some of the drives. By switching to the previously used “USB-Storage” driver this has fully gone away and even allows you to use SMART commands to read out the drive statistics!
For Seagate14TB Backup Plus drives running on Ubuntu 21.04 I perform the following and then do a reboot of the rig:
echo options usb-storage quirks=0bc2:ab38:u | sudo tee /etc/modprobe.d/blacklist_uas_0bc2.conf sudo update-initramfs -u
I have another machine running Seagate 8TB SMR drives (the 15 drives in this article) and that machine runs Proxmox so Debian and requires slightly different steps and vendor ID:
echo options usb-storage quirks=0bc2:3343:u | sudo tee /etc/modprobe.d/blacklist_uas_0bc23343.conf echo blacklist uas | sudo tee /etc/modprobe.d/blacklist-uas.conf sudo update-initramfs -u
Check (USB) drive statistics
For reading out smart values such as TB written to a drive or reading it’s temperature install the “smartmontools” package and run a:
sudo apt install smartmontools sudo smartctl -a /dev/disk/by-id/YOURDISK
Create Aligned partitions, MDADM and XFS for plot temp storage
Aligning your partition, RAID and filesystem is very important to not cause extra wear on your temp plotting SSD!
sudo parted /dev/disk/by-id/NVMEDRIVE --align=optimal --script mklabel gpt mkpart primary xfs 0% 100% set 1 raid on sudo mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/ (use the part1!) cat /proc/mdstat sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf sudo update-initramfs -u sudo mkfs.xfs /dev/md0 sudo mkdir /mnt/md0 sudo nano /etc/fstab /dev/md0 /mnt/md0 xfs defaults,discard,noatime,nodiratime 0 0 sudo mount -a sudo chown -R user:user /mnt/md0 mkdir /mnt/md0/chiatemp
Set CPU Governor to Performance
Normally Linux will try and save some power here and there, we don’t want it to do this, especially not on AMD Ryzen platforms!
sudo apt-get install cpufrequtils sudo nano /etc/default/cpufrequtils GOVERNOR="performance" sudo systemctl restart cpufrequtils run "cpufreq-info" to check governer
View most used CPU frequencies
Is your system running like you expect it? Let’s see and aggregate all CPU cores and see what Mhz they are running.
sudo watch -n 1 "cat /proc/cpuinfo | grep MHz | sort -n | uniq -cw 13"