EP-0242
52Pi S021 SATA 3.0x2 for Raspberry Pi 5
Description
The 52Pi S021 is a specialized Hat board designed for the Raspberry Pi 5, offering dual SATA 3.0 interfaces to expand the storage capabilities of your Raspberry Pi system. With its PCIe connectivity, it ensures seamless integration and high-speed data transfer. The board is equipped with a robust 12V DC power input and supports two separate 12V HDD power inputs for stable operation of high-capacity hard drives.
Fetures
- Model Name: 52Pi S021
- Dual SATA 3.0 Ports: Supports two SATA 3.0 hard drives for enhanced data storage.
- PCIe Interface: Ensures compatibility with the Raspberry Pi 5's PCIe interface for fast data access.
- GPIO Compatibility: Aligns with the Raspberry Pi's 40-pin GPIO for extended functionality.
- Power Management: Designed for high-power applications with a recommended 12V @8A, 96W power supply.
- HDD Power Support: Includes two dedicated power connectors for hard drives, ensuring reliable operation.
Specifications
- Product Name: 52Pi S021 SATA 3.0x2 for Raspberry Pi 5
- Compatible Model: Raspberry Pi 5
- SATA Ports: 2 x SATA 3.0
- PCIe Interface: Compatible with Raspberry Pi 5's PCIe slot
- GPIO Connector: 40-pin GPIO for additional interfacing options
- Power Input: 12V DC for the board, with separate 12V inputs for HDDs
- Recommended Power Supply: 12V @8A, capable of delivering up to 96W
- HDD Power Connectors: Two power connectors for independent HDD power management
Gallery
TBD.
How to assemble it?
TBD.
Package Includes
TBD.
How to enable PCIe on Raspberry Pi 5
- We assume that you are using:
Raspberry Pi OS with desktop and recommended software Release date: July 4th 2024 System: 64-bit Kernel version: 6.6 Debian version: 12 (bookworm)
Step 1
- Enable PCIe function
Edit /boot/firmware/config.txt file and adding following parameter in to the file.
dtparam=pciex1
Save it and then do remember reboot your Raspberry Pi to take effect.
Step 2
- Check if the SSD drive has been recognized
sudo lspci sudo lsblk
Result be like:
Step 3
- Partitioning
sudo fdisk /dev/sda
and then input following letter, p - print partition label, n - new partition, p- primary partition, 1 - partition number 1, enter-first cylinder , enter - use whole space. if you want to generate specifiled space, you can just input +XXXG, for examples, if you want to create a 10G partition, just input +10G and then press enter. you can check the partition information by input `p` print partition table. Here, I am going to create a partition contains whole space of the disk.
p n p 1 enter enter w
Same operation for the second HDD disk.
Step 4
- Format partition
sudo mkfs.ext4 /dev/sda1 sudo mkfs.ext4 /dev/sdb1
Please divide the partition according to actual needs. Here I simply divided a partition and formatted it into ext4. Please refer to the configuration method related to the fdisk command to operate.
Step 5
- Create mounting point
sudo mkdir -pv /home/pi/HDD1 sudo mkdir -pv /home/pi/HDD2
Step 6
- Mount the disk to the mounting point
sudo mount -t ext4 /dev/sda1 /home/pi/HDD1 -v sudo mount -t ext4 /dev/sdb1 /home/pi/HDD2 -v sudo systemctl daemon-reload
Step 7
- Modify file system table file for automount function
sudo vim.tiny /etc/fstab
adding following lines:
/dev/sda1 /home/pi/HDD1 ext4 defaults,noatime 0 0 /dev/sdb1 /home/pi/HDD2 ext4 defaults,noatime 0 0
NOTE: please becareful when you editing this file, wrong parameters will cause the system crashed
- How to test it .
sudo umount /dev/sda1 sudo umount /dev/sdb1 sudo mount -a df -Th
If you can find the mounting device still there, means it works properly. you can just reboot your raspberry Pi to test it out, if not, please double check the parameters in /etc/fstab file.
Setting up a software RAID on a Raspberry Pi
- Setting up a software RAID on a Raspberry Pi using the `mdadm` tool involves several steps. Below is a step-by-step guide to help you through the process:
Prerequisites
- - Two or more USB hard drives or SSDs connected to your Raspberry Pi.
- - Raspberry Pi OS with SSH enabled.
- - Basic knowledge of Linux command-line operations.
Step 1: Update Your System
First, ensure your Raspberry Pi is up to date by running:
sudo apt-get update sudo apt-get upgrade
Step 2: Install mdadm
Install the `mdadm` utility which is used to manage and monitor RAID arrays:
sudo apt-get install mdadm
Step 3: Identify Your Drives
Before creating the RAID array, identify the drives you want to include. You can use the `lsblk` or `fdisk` command to list all connected drives:
lsblk # or sudo fdisk -l
Take note of the device names (e.g., `/dev/sda`, `/dev/sdb`).
Step 4: Partition the Drives (if necessary)
If your drives are not already partitioned, you'll need to do so. You can use `fdisk` or `parted` for partitioning. Here's an example using `fdisk`:
sudo fdisk /dev/sda
Follow the prompts to create a new partition. Repeat for each drive.
Step 5: Create the RAID Array
Choose the RAID level (e.g., RAID1 for mirroring, RAID0 for striping). To create a RAID1 array with `/dev/sda1` and `/dev/sdb1`, use:
sudo mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
Replace `/dev/md0` with the desired RAID device name, and `/dev/sda1` and `/dev/sdb1` with your actual partition names.
Step 6: Assemble the RAID Array
After creating the RAID array, you need to assemble it:
sudo mdadm --assemble --scan
This command will scan for RAID arrays and assemble them.
Step 7: Create a Filesystem
Once the RAID array is assembled, create a filesystem on it. For example, to create an ext4 filesystem:
sudo mkfs.ext4 /dev/md0
Step 8: Mount the RAID Array
Create a mount point and mount the RAID array:
sudo mkdir -pv /mnt/raid sudo mount -t ext4 /dev/md0 /mnt/raid
Step 9: Auto-mount at Boot
To auto-mount the RAID array at boot, add an entry to `/etc/fstab`:
echo '/dev/md0 /mnt/raid ext4 defaults 0 0' | sudo tee -a /etc/fstab
Step 10: Monitor the RAID Array
Use `mdadm` to monitor the status of your RAID array:
sudo mdadm --detail /dev/md0
Step 11: Update initramfs
Update the initial RAM filesystem to ensure the RAID array is assembled at boot:
sudo update-initramfs -u
Step 12: Reboot
Finally, reboot your Raspberry Pi to ensure everything works correctly:
sudo reboot
After rebooting, your RAID array should be mounted automatically, and you can start using it.
Important Notes:
- Always backup your data before making changes to disk partitions or setting up RAID arrays.
- The performance of a software RAID on a Raspberry Pi may not be as high as on a system with a dedicated RAID controller.
- RAID is not a substitute for backups. Always keep backups of important data.