Raspberry Pi NAS Case (e-Ink display remix)





Description
This remix combines the two part case into one, adds an e-Ink display window with the Pimoroni InkyPHAT display, and adds additional mount points for 40mm case fans. All other files are the same, but they have been converted to STL for easier printing. This remix is subject to change as I make a more elegant back panel that fits the hardware I am using. Right now it's just a rectangle cutout as I work out the best way to enclose the cables. I will also add more detail to the assembly instructions as I go.
Intro
This is a fairly easy project but it has a lot of steps. It’s also a bit expensive to produce given the price of the four SATA drives. You do not have to use the same components I used, but where you make changes, you’ll need to account for the differences. If you use cheaper drives, there should not be a significant difference in setup other than cost. I used the Samsung EVO 2tb SATA drives because I already had them for a different project. It does not fundamentally matter what hardware you choose.
Tools
* Soldering iron
* Large format 3D printer
* 2kg of filament (you can do this with one if you don’t make ANY mistakes but… yeah. I wasn’t able to do that.)
Hardware
* Raspberry Pi 5 4gb + Active cooler + pro endurance SD card
* Raspberry Pi Zero 2w (with headers) + regular SD card
* Four 2tb SATA SSD Drives (Samsung 870 EVO)
* Pimoroni red InkyPhat e-ink display
* Geekworm x1009 SATA hat with power adapter
* Fans
- 1 92mm Fan - 12v
- 2 40mm Fans - 12v
- Fan splitters (they come in the box)
* Temperature sensor
* USB Ethernet adapter
Assembly hardware
* M2.5 heat set sockets
* A bunch of various sizes of screws, M2 and 2.5
* M2.5 x 15mm standoffs
* Cables
- USB fan adapter
- 4 SATA 3 cables
- Micro USB to USB A
Assembly
Print all pieces (this will take a few days). Print all with supports (everywhere) in the orientation that they appear.
1. Case
2. Faceplate
3. Drive housing
4. Four (4) drive cages
5. Backplate
6. Raspberry Pi Sled
Main Case
- Carefully remove supports (this is tedious)
- Install the case fan
- Large fan on the bottom (logo facing in)
- Case fans on the side
- All fans mounts support using the screws that come with the fans
- Install four heat set inserts into the holes on the back side of the case
Drive Housing
- Use heat set inserts in the four holes on the back, install a standoff in each socket
- Mount a SATA SSD into each drive cage using 4 M2 screws (or not, honestly it’s optional, I didn’t have any M2 screws that fit so I skipped it)
- Plug in SATA and power cables from the Geekworm kit to each drive
Mount the Raspberry Pi 5
- Install a basic Raspberry Pi Lite OS onto an SD card and configure it for Wifi (you’ll need an ethernet cable later but for now we can do our config over wifi)
- Install 8 heat set inserts into the top and bottom holes of the raspberry pi sled
- Mount the raspberry pi on the sled using standoffs
- Install the Geekworm SATA hat and follow the instructions
- Do not install the drives yet
- Install the temperature sensor and follow the instructions here
- Optionally print the mounting bracket for the breakout board and install it with screws
- Mount the sled into the case from the bottom using M2.5 screws (optional but recommended)
- Plug in the SATA drives in order starting from the left (0) to (3) if using right angle cables, the last drive should be mounted with the right angle bracket going into the raspberry pi while the other three cables will have the right angle brackets going into the drives. This is because it doesn’t fit any other way and I didn’t want to mod the case again, so I just reversed the cable.
- Plug in the SATA power cable to the Geekworm Hat
- Do not power the raspberry pi yet
- Optionally glue the breakout board mount to the case (but really it’s better to wait until near the end for this step and honestly I didn’t glue it, it’s just hanging out in there loose
- Thermal sensor should go in the open space behind the SATA cables but in front of Zero 2W
InkyPhat e-Ink Display
- Gently attach the InkyPhat screen to the Zero 2w headers, following the instructions from Pimoroni
- Mount the screen with the pi into the faceplate
- Plug in the USB cable to the Zero 2W and thread it through to the back
- Plug in the USB A side to one of the blue (powered) USB ports on the raspberry pi
- Snap the faceplate into the front of the case
Follow the instructions from Pimoroni here to setup the InkyPhat display:
https://github.com/pimoroni/inky
USB Fan Adapter
- Plug in the USB fan adapter to the other blue USB port on the Raspberry Pi 5
- Attach two four pin Y adapters
- Plug in the main case fan to the first port on the first Y adapter
- Plug in the other two fans to the remaining ports on the second Y adapter
- Shove all the fan cables under the sled
At this point you should have all the cables connected. Power up the raspberry pi using the Geekworm power supply (not the USB port, which will not be used)
Software Setup
Part 1: Raspberry Pi 5 Setup
1. Install Raspberry Pi OS
- Flash Raspberry Pi OS Lite (64-bit) to SD card
- Configure hostname: `nas.local`
- Enable SSH during imaging
2. Configure SATA Hat (Geekworm X1001)
Install drivers:
wget https://geekworm.com/cdn/shop/files/x1001-v1.1.sh
sudo chmod +x x1001-v1.1.sh
sudo ./x1001-v1.1.sh
Edit `/boot/firmware/config.txt`:
sudo nano /boot/firmware/config.txt
Add these lines:
Enable PCIe Gen 3
dtparam=pciex1_gen=3
Increase USB power
PSU_MAX_CURRENT=5000
Reboot and verify:
sudo reboot
sudo lspci # Should show SATA controller
lsblk # Should show your SSDs
3. Configure Temperature Sensor (DS18B20)
Wiring:
- Green (Ground) → Black wire
- Blue (Live) → Red wire
- Purple (Data) → Yellow wire (connect to GPIO 4 - Pin 7)
Software configuration:
sudo nano /boot/firmware/config.txt
Add:
dtoverlay=w1-gpio
Reboot and verify:
sudo reboot
sudo modprobe w1-gpio
sudo modprobe w1-therm
ls /sys/bus/w1/devices/ # Should show 28-xxxx device
4. Install OpenMediaVault
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
Configure OMV:
1. Access web UI at `http://nas.local`
2. Login: admin / openmediavault
3. Format all 4 SSDs (Storage → Disks)
4. Install md-adm plugin (System → Plugins)
5. Create RAID 5 array (Storage → RAID Management)
6. Create filesystem on RAID array
7. Create shared folders and configure SMB/NFS as needed
5. Install Monitoring Service
Clone the repository:
cd ~
git clone https://github.com/adunderwood/RaspberryPi_NAS.git
cd RaspberryPi_NAS/Raspberry\ Pi\ 5/
Install dependencies:
sudo apt update
sudo apt install python3-pip -y
pip3 install -r requirements.txt
Configure the service:
cp .env.example .env
nano .env
Adjust settings if needed (defaults are fine for most users):
LOG_DIR=/home/nas/services
MAX_LOG_LINES=2000
LOG_INTERVAL=3
SAVE_INTERVAL=60
TEMP_UNIT=F
Install and enable the service:
sudo mkdir -p /home/nas/services
sudo cp nas_service.py /home/nas/services/
sudo cp .env /home/nas/services/
sudo cp services/nas_service.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable nas_service
sudo systemctl start nas_service
Verify it's running:
sudo systemctl status nas_service
curl http://localhost:5000/cpu
curl http://localhost:5000/raid
Part 2: Raspberry Pi Zero 2W Setup
1. Install Raspberry Pi OS
- Flash Raspberry Pi OS Lite (32-bit) to SD card
- Configure WiFi and SSH during imaging
- Set hostname: `display.local`
2. Configure System
sudo raspi-config
Enable:
- Interface Options → SPI (for InkyPHAT)
- Interface Options → I2C (for InkyPHAT)
3. Install InkyPHAT Drivers
curl https://get.pimoroni.com/inky | bash
Select "InkyPHAT" when prompted.
Test the display:
python3 ~/Pimoroni/inky/examples/phat/hello-world.py
4. Install Display Software
Clone the repository:
cd ~
git clone https://github.com/adunderwood/RaspberryPi_NAS.git
cd RaspberryPi_NAS/Raspberry\ Pi\ Zero\ 2w/
Create virtual environment:
python3 -m venv ~/.virtualenvs/pimoroni
source ~/.virtualenvs/pimoroni/bin/activate
Install dependencies:
pip install inky pillow requests python-dotenv sparklines font-fredoka-one
Configure environment:
cp .env.example .env
nano .env
Update the NAS hostname/IP if needed:
API Endpoints (adjust nas.local to your Pi 5's hostname or IP)
NAS_URL=http://nas.local:5000/raid
TEMPERATURE_URL=http://nas.local:5000/temperature
CPU_URL=http://nas.local:5000/cpu
CPU_TEMP_URL=http://nas.local:5000/cpu_temp
Display Settings
THEME=light
WARN_PERCENT=90
WARN_TEMP=90
FONT_DIR=/home/nas/fonts
Set up display script wrapper:
chmod +x display.sh
./display.sh
The display should update with your NAS stats!
5. Configure Auto-Update (Cron)
crontab -e
Add this line to update every 5 minutes:
/5 * /home/nas/display/display.sh
Architecture Overview
Unified Monitoring Service (Pi 5)
One service replaces 7+ separate scripts:
- Collects CPU usage, CPU temperature, ambient temperature, RAID status
- Serves data via REST API on port 5000
- Automatic log rotation (keeps last 2000 readings)
- Robust error handling for sensor failures
- ~100KB total log size (vs 35+ MB in older versions)
API Endpoints:
- `http://nas.local:5000/cpu` - CPU usage %
- `http://nas.local:5000/cpu_temp` - CPU temperature (°C)
- `http://nas.local:5000/temperature` - Ambient temperature
- `http://nas.local:5000/raid` - RAID disk usage
Display Script (Pi Zero 2W)
- Fetches data from monitoring service
- Renders stats on InkyPHAT e-ink display
- Auto-switches to red theme on warnings
- Updates every 5 minutes via cron
Troubleshooting
Monitoring Service Issues
Service won't start:
```bash
sudo journalctl -u nas_service -n 50
```
Test endpoints:
```bash
curl http://localhost:5000/cpu
curl http://localhost:5000/cpu_temp
curl http://localhost:5000/temperature
curl http://localhost:5000/raid
```
Temperature sensor not found:
- Check wiring to GPIO 4
- Verify `dtoverlay=w1-gpio` in `/boot/firmware/config.txt`
- Run: `ls /sys/bus/w1/devices/`
RAID not showing:
- Verify RAID array: `df -h | grep /dev/md`
- Check OMV configuration
Display Issues
Display not updating:
- Verify cron job: `crontab -l`
- Check network: `ping nas.local`
- Test API: `curl http://nas.local:5000/cpu`
- Check logs: `journalctl -u nas_service`
Display shows errors:
- Verify virtualenv is activated in `display.sh`
- Check font directory exists: `ls /home/nas/fonts/`
- Test manually: `./display.sh`
InkyPHAT not working:
- Verify SPI/I2C enabled: `sudo raspi-config`
- Test with example: `python3 ~/Pimoroni/inky/examples/phat/hello-world.py`
GitHub Repository
Full source code, detailed documentation, and configuration examples:
https://github.com/adunderwood/RaspberryPi_NAS
Each Pi has its own detailed README with step-by-step instructions:
- `Raspberry Pi 5/README.md` - Monitoring service setup
- `Raspberry Pi Zero 2w/README.md` - Display setup
Tips & Notes
Performance:
- RAID 5 with 4x SSDs provides ~5.5TB usable storage with 1 drive redundancy
- Pi 5 PCIe Gen 3 enables full SATA speeds
- E-ink display uses minimal power and is sunlight readable
Customization:
- Adjust `WARN_PERCENT` and `WARN_TEMP` thresholds in display `.env`
- Change display theme: `THEME=light|dark|red`
- Modify refresh interval in crontab (default: 5 minutes)
Maintenance:
- Logs auto-rotate to prevent disk fill
- Monitor service restarts automatically on failure
- Display survives network interruptions gracefully




