EP-0242

From 52Pi Wiki
Jump to navigation Jump to search

52Pi S021 SATA 3.0x2 for Raspberry Pi 5

EP-0242-1.jpg

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 @6A, 72W 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(ITX Power supply)
  • Recommended Power Supply: 12V @ 6A, capable of delivering up to 72W
  • HDD Power Connectors: Two power connectors for independent HDD power management

Gallery

  • Product outlook
EP-0242-1.jpg


EP-0242-2.jpg


  • Port definitions
EP-0242-3.jpg


  • Fix the hat with copper pillar, it has enought space to put heatsink.
EP-0242-4.jpg


  • Jumper function description
EP-0242-10.jpg


  • Active Cooler
EP-0242-5.jpg


  • With 12V @ 6A 72W Power supply
EP-0242-6.jpg


  • HDD connection and status
EP-0242-7.jpg


  • Variable Power supply method support
EP-0242-11.jpg


  • Specifications
EP-0242-8.jpg


  • Different view angle
EP-0242-9.jpg


How to assemble it?

  • Please assemble it according to following figure.
  • Default: Using 12V 6A (72W) Power supply
EP-0242-IN.jpg


Package Includes

EP-0242-PL.jpg


Jumper Details

Note: This part is very important for using the jumper to control the power rail.

  • P1-P2 connected: Raspberry Pi and HAT share 5V power.

1. When using a 2.5-inch hard drive, you can choose either the Raspberry Pi's USB-C power port or the HAT's DC jack for 12V power.

2. When using a 3.5-inch hard drive, do not connect power to the Raspberry Pi's USB-C port; only connect to the HAT's DC jack using a 12V DC power supply, and configure it to provide a forced 5A power in the settings.

  • P2-P3 not connected: Raspberry Pi and HAT share 5V power; both the Raspberry Pi's power supply and the HAT's power supply need to be connected.


How to use external ATX power supply with S021 kit?

Note: If powered by a 12V DC power supply, or while being powered by a 12V ATX power supply, do not supply power to the Raspberry Pi 5 through the USB-C port.

  • Step1. Connect the power supply to S021 on 12V HDD power supply.
20241018133030.jpg


  • Step2. Connect the HDD harddrive with data transfer cable and power cables.
20241018133036.jpg


  • Step3. Turn on the power switch on your ATX PSU.
  • Step4. Short between the green and black wires on the 24pin connector (as show below), with a paper
clip or piece of wire. If all wires are black, place the connector with the lock clip facing up and short
4th and 5th pins (counting from left to right) in the upper row.
20241018133040.jpg


20241018132359.jpg


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
Pcie overlay parameter.png


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:

Lsblk lspci.png


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 
Formatdisk.png


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 -y

Step 2: Install mdadm

Install the `mdadm` utility which is used to manage and monitor RAID arrays:

sudo apt-get install mdadm -y

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.

Keywords

  • Raspberry Pi 5 SATA HDD adapter, S021 dual HDD adapter board, PCIe to SATA HDD adapter for Raspberry Pi 5.