Tag Archives: Raspberry Pi

Raspberry Pi NAS 2

Raspberry Pi NAS 2
Raspberry Pi NAS 2

We’ve built a second NAS and Docker environment using another Raspberry Pi 5. This NAS features four 2.5 in 960 GB SSD drives in a RAID-0 array for fast shared storage on our network.

Raspberry Pi NAS Hardware Components

Raspberry Pi 5 Single Board Computer

We use the following components to build our system –

I had five 960 GB 2.5″ SSD drives from a previous project available for this project.

The following video covers the hardware assembly –

We used a 2.5 GbE USB adapter to create a 2.5 GbE network interface on our NAS.

2.5 GbE USB Adapter
2.5 GbE USB Adapter

The configuration of the Fan/Display HAT top board is covered here.

FAN/Display Top Board
FAN/Display Top Board

This board comes as a kit that includes spaces to mount it on top of the Raspberry Pi 5/SSD Drive Interface HAT in the base kit.

Software Components and Installation

We installed the following software on our system to create our NAS –

CassaOS

CasaOS Web UI
CasaOS Web UI

CasaOS is included to add a very nice GUI for managing each of our NUT servers. Here’s a useful video on how to install CasaOS on the Raspberry Pi –

Installation

The first step is to install the 64-bit Lite Version of Raspberry Pi OS. This is done by first installing a full desktop version on a flash card and then using Raspberry Pi Imager to install the lite version on our SSD boot drive. We did this on our macOS computer using the USB to SATA adapter and belenaEtcher.

We used the process covered in the video above to install CasaOS.

Creating a RAID

We choose to create a RAID-0 array using the four SSD drives in our NAS. Experience with SSD drives in a light-duty application like ours indicates that this approach will be reasonably reliable with SSD drives. We also backup the contents of the NAS daily to another system via Rsync to one of our Synology NAS drives.

RAID-0 Storage Array
RAID-0 Storage Array

CasaOS does not provide support for RAID so this is done using the underlying Linux OS. The process is explained here.

File Share

CasaOS makes all of its shares public and does not password-protect shared folders. While this may be acceptable for home use where the network is isolated from the public Internet, it certainly is not a good security practice.

Fortunately, the Debian Linux-derived distro we are running includes Samba file share support, which we can use to protect our shares properly. This article explains the basics of how to do this.

Here’s an example of the information in smb.conf for one of our shares –

[Public]
    path = /DATA/Public
    browsable = yes
    writeable = Yes
    create mask = 0644
    directory mask = 0755
    public = no
    comment = "General purpose public share"

You will also need to create a Samba user for your Samba shares to work. Samba user privileges can be added to any of the existing Raspberry Pi OS users with the following command –

# sudo smbpasswd -a <User ID to add>

It’s also important to correctly set the shared folder’s owner, group, and modes.

We need to restart the Samba service anytime configuration changes are made. This can be done with the following command –

# sudo systemctl restart smbd

Raspberry Pi Servers

Raspberry Pi Rack Mount System
Raspberry Pi Rack Mount System

We use Raspberry Pi (RPi) Single-Board computers (SBCs) for various server applications in our Home Lab.

Uctronics Raspberry Pi Rack Mount
Uctronics Raspberry Pi Rack Mount

We use rack-mount cases for many of our RPIs for Uctronics. Rack Mounting our RPi’s takes less space and enables additional features, including Solid-State Disk (SSD) storage and displays. We’ve added a PoE hat to each of our RPi’s to allow powering the units via ethernet.

Pi Rack Module
Pi Rack Module

These cases feature removable rack-mount carriers for four Raspberry Pi SBCs. The package includes boards that enable SSD storage as the RPi’s main drive.

Each Pi Rack module adds some nice features for the associated Raspberry Pi, including:

  • A display showing the RPi’s IP address, operating parameters, and temperature
  • Front panel access to the SD card slot
  • SSD Storage via either a 2.5″ SSD Drive (4B Model) or an NVMe drive (5 Model)
  • Convenient access to the PI’s USB connections
  • Indicator lights for SSD and SD card activity

The following configuration changes are sometimes required to enable the RPi’s IP address to be displayed:

# Turn off deterministic network names
# sudo raspi-config (change the option under 'advanced'

# Add the following to the end of the line
# vi /boot/firmware/cmdline.txt
net.ifnames=0 biosdevname=0
:wq

# sudo reboot

The case also includes cooling fans to keep the RPi’s cool.

The following are some server applications that run on Raspberry Pi Systems in our Home Lab.

Network UPS Tools (NUT) Servers

We use the Network UPS Tools software running on Raspberry Pi computers to manage our critical UPS devices. This software allows us to remotely monitor their operational condition and enables our Storage Devices and Servers to sense conditions when a complete backup power loss is imminent and perform a controlled shutdown to protect themselves and the data that they store. You can find a summary of the available features here.

You can find more information on our NUT servers here.

PiLAB

We built a Raspberry Pi 4B System to demonstrate using a RPi to build a simple home server. The hardware used for PiLAB is as follows:

CasaOS Running On PiLAB
CasaOS Running On PiLAB

We are running CasaOS on PiLAB, which provides a simple GUI interface for managing file sharing and Docker containers.

The applications running as docker containers on PiLAB include:

PiNAS

Raspberry Pi NAS

We also built a variation of PiLAB we call PiNAS. This system uses a Raspberry Pi 5 SBC running CasaOS and a larger NVMe drive to build a more capable NAS. PiNAS is installed in a stand-alone case with an external power supply.

You can learn more about PiNAS here.

PiHole Server via Docker

PiHole in Docker
PiHole in Docker

We have set up a Raspberry Pi 5 system to run a third PiHole DNS server in our network. This ensures that DNS services are available even if our other servers are down.

This system is installed in our Raspberry Pi 5 Rack Mount system. You can learn more about this system here.

Raspberry Pi 5 Proxmox Cluster

We built a three-node Proxmox cluster using Raspberry Pi 5 SBCs.  This system is installed in our Raspberry Pi 5 Rack Mount system. Each node includes the following hardware:

We used the procedure in the video above to install Proxmox on our Raspberry Pi 5 nodes.

This is a high-availability cluster for application testing before deployment on our production Proxmox cluster. It also uses our Proxmox Backup server and the upcoming Proxmox Data Center Manager.

Networking Configuration

Virtual BridgePurposeVLANSpeedAdapter
vmbr0 (Mgmt)Proxmox ManagementComputers2.5 GbEUSB-C Adapter #1
vmbr1 (LS Svcs)Low-Speed ServicesAll VLANs1 GbERPi Ethernet
vmbr2 (Storage)HA Storage for VMs/LXCsStorage2.5 GbEUSB-C Adapter #2

We added two USB-C 2.5 GbE adapters to each node to enable the networking configuration in the table above.

Raspberry Pi NAS

Raspberry Pi NAS
Raspberry Pi NAS

We’ve built a NAS and Docker environment using a Raspberry Pi 5. Our NAS features a 2 TB NVMe SSD drive for fast shared storage on our network.

Raspberry Pi NAS Hardware Components

Raspberry Pi 5 Single Board Computer

We use the following components to build our system –

Here’s a photo of the completed hardware assembly –

Pi NAS Internals - Raspberry Pi NAS
Pi NAS Internals

Software Components and Installation

We installed the following software on our system to create our NAS –

CassaOS

CasaOS GUI
CasaOS GUI

CasaOS is included to add a very nice GUI for managing each of our NUT servers. Here’s a useful video on how to install CasaOS on the Raspberry Pi –

Installation

The first step is to install the 64-bit Lite Version of Raspberry Pi OS. This is done by first installing a full desktop version on a flash card and then using Raspberry Pi Imager to install the lite version on our NVMe drive.

Once this installation was done, we used the Raspberry Pi Imager to install the same OS version on our NVMe SSD. After removing the flash card and booting to the NVMe SSD, the following configuration changes were made –

  • The system name is set to NAS-11
  • Enabled SSH
  • Set our user ID and password
  • Applied all available updates
  • We updated /boot/firmware/config.txt to enable PCIe Gen3 operation with our SSD

We used the process covered in the video above to install CasaOS.

CasaOS makes all of its shares public and does not password-protect shared folders. While this may be acceptable for home use where the network is isolated from the public Internet, it certainly is not a good security practice.

Fortunately, the Debian Linux-derived distro we are running includes Samba file share support, which we can use to protect our shares properly. This article explains the basics of how to do this.

Here’s an example of the information in smb.conf for one of our shares –

[Public]
    path = /DATA/Public
    browsable = yes
    writeable = Yes
    create mask = 0644
    directory mask = 0755
    public = no
    comment = "General purpose public share"

You will also need to create a Samba user for your Samba shares to work. Samba user privileges can be added to any of the existing Raspberry Pi OS users with the following command –

# sudo smbpasswd -a <User ID to add>

It’s also important to correctly set the shared folder’s owner, group, and modes.

We need to restart the Samba service anytime configuration changes are made. This can be done with the following command –

# sudo systemctl restart smbd