logo smart home family kruse

Kruse Smart Home

Easy living in our smart home & Garden

Setup and configure a Geekworm NASPi v2.0 Raspberry Pi 4 case

Geekworm NASPi V2.0 front

20 December 2022


1. Introduction

I bought a Geekworm NASPi v2.0 case, to house my Raspberry Pi 4 with 8Gb RAM with Raspberry OS installed. This setup will be used for multiple purposes including as a web server running my Piwigo development site for the operational site gallery.fotokruse.eu, which is currently hosted at Antagonist. The Raspberry OS will be installed on a micro SD card and the data on a Samsung 512Gb 2.5″ SATA3 SSD.

Main reason to select this case was the option to have a 2.5″SSD or HDD included inside the case to store the photos for the Piwigo site and other data. My initial preference was a NVME SSD based case, but unfortunately not available in November 2022. The Geekworm NASPi case provides the following functionality:

  • Solution based on the latest Raspberry Pi 4
  • Supports 2.5-inch sata HDD/SSD
  • Build in software safety shutdown function
  • Power switch & Auto power on in case power got disrupted
  • Using PWM fan to dynamically adjust the speed of the fan according to the temperature of the CPU
  • Shell is made of all aluminum alloy

The case has a modular design composed of three parts:

  1. X823 storage shield
    X823 provides 2.5 inch HDD/SSD storage function(UASP supported)
  2. X-C1 adapter board
    X-C1 provides power management, interface adapter, safe shutdown function, auto power on and fan control
  3. Heat dissipation system
    Includes X823-A3 metal fan bracket and 4010 PWM fan.

This article describes:

  1. Modifying the Geekworm NASPi case to make it possible to attach it to a DIN-rail;
  2. Installing the Raspberry Pi 4 with 8Gb RAM inside the case
  3. Installing Raspberry Pi 4 OS on a micro SD card
  4. Configuring the Geekworm NASPi ventilator and power button.
  5. Mounting the SSD drive to be used for data storage such as the Piwigo website photos

2. Modifying the Geekworm NASPi case

I modified the Geekworm NASPi case to attach a DIN-rail connection plate. More details will come later.

3. Installing the Raspberry Pi 4 inside the case

More details will come later.

3.1 Configure Auto Power ON

The Geekworm NASPi adapter X-C1 does support auto power on from v2.0 onwards. Out of the box this is not enabled. To enable it a jumper needs to be placed on the X-C1 board.
Geekworm NASPi V2.0 - X-C1 v2.0 adapter board - jumper location info

This jumper is located on the topside of the board as indicated in the image below.
Geekworm NASPi V2.0 - X-C1 v2.0 adapter board - Auto power on jumper location

4. Installing Raspberry Pi 4 OS

See the official Raspberry Pi 4 getting started documentation or other sources on the web. Install the 32-bit OS as the 64-bit OS is still in development phase. I used a 128Gb microSD card, which is more than large enough. For sure as I will use a 512 Gb 2.5″ SSD installed inside the Geekworm NASPi case for storage of data such as the images for the Piwigo site.

5. Configuring the NASPi ventilator

The Geekworm NASPi v2.0 has a silent fan with power management, which makes it possible to adjust the fan speed automatically according to the CPU temperature. Out of the box the fan will run at full speed, but by installing a script on your Raspberry Pi 4 it will adjust its speed depending on the CPU temperature.

Perform the following steps to install the script:

Source: https://wiki.geekworm.com/X-C1_Software

  1. Execute the following commands in the Raspberry Pi 4 Terminal window

    When the installation is completed the following message will be displayed:
  2. Execute the following command:
  3. Reboot the system
  4. Test safe shutdown by entering the following command:

    The system will shutdown.
  5. Restart the system by pressing the power button on the Geekwork NASPi case. Initially the fan will run at high speed and should some seconds later switch to low speed.

6. Mounting the SSD drive

The steps in this section are based on the Geekworm WiKi page Properly Mount USB Storage on Raspberry Pi to mount the SSD installed in our Geekworm NASPi case. The main difference is that this article only contains instructions to mount a SSD/HDD (in my case a 2.5″ Samsung SSD) with one ext4 based logical volume.

6.1 Prepare the mount point

  1. First make a directory in which to mount the USB drive, in my case I used the name ssd512 as I use a 512Gb SSD:
  2. Make the logged in user the owner of the mounted drive and make its permissions read, write and execute for it. The normal default user iss pi, but in my case it is Pi4ServerAdmin.
  3. Set all future permissions for the mount point to pi user and group

    R is recursive, which means everything under that directory will have the rule applied to it.
    d is default, which means for all future items created under that directory, have these rules apply by default. m is needed to add/modify rules.

    The first command, is for new items (hence the d), the second command, is for old/existing items under the folder. Hope this helps someone out as this stuff is a bit complicated and not very intuitive.

6.2 Determine the USB hard drive format

  1. Find out the filesystem of the ssd via:

    This command will show something similar like:

    As I had preformatted the SSD on my windows computer with the free Minitool Partition Wizard as a ext4 logical disk with volume label SSD512 I know the drive is linked to /dev/sda5.

  2. Mount the usb ssd with the following command. The option -o ensures Pi4ServerAdmin is the owner which should avoid permission issues:

6.3. Automount the USB ssd drive on boot

The /mnt/ssd512 will be the folder in which you store your media. We want it to be automounted on boot .

  1. The best way to do this is through the UUID. Get the UUID by using this command

    This will show something similar like:

    The UUID you require is the long ID after the date. In my case for the sda5 drive: d2f5f452-8014-d901-d0e1-f4528014d901.
  2. Edit fstab to mount the USB ssd drive by UUID on boot:

    In my case the editor is loaded with the following:
  3. Add a new line at the bottom which has the following syntax:

    Replace XXXX-XXXX with your UUID and ssd512 with your mountpoint directory. In my case it becomes:

    Added in the editor it looks like:
  4. Save the file (Ctrl-O) and close the editor (Ctrl-X).
  5. Test the fstab file works by entering the command:

    If you didn’t get errors reboot, otherwise try the suggestions on Geekworm USB storage mounting instructions page to get it working then test again with command above until it succeeds.
  6. Reboot the system:
  7. You should be able to access the mounted USB drive and list its contents

    Every time you reboot, the drives will be mounted as long as the UUID remains the same. If you delete the partitions or format the USB ssd, hard drive or USB stick the UUID changes.

    If you have multiple hard drives you will have to make separate mount points (e.g. /mnt/usbstorage2) for each drive’s partition

If required you can setup hard drive spin down times. See the article “Spin down and manage hard drive power on Raspberry Pi“.

Head over to the article “How to install Piwigo on a Raspberry Pi 4?” to install and configure a Piwigo site. In my case the Piwigo website will run on a Raspberry Pi 4 installed in the Geekworm NASPi v2.0 case as setup and configured in this article.

Article by <a href="https://smarthome.familykruse.eu/author/iamjwk/" target="_self">Jan-Willem</a>

Article by Jan-Willem


Writen by the website owner


Submit a Comment

Your email address will not be published. Required fields are marked *