A portable Linux server with Raspberry Pi: the portable NAS experiment
The idea of turning a Raspberry Pi into a portable Linux server, powered by a power bank and connected to a mobile hotspot, may seem daring. However, this setup proved surprisingly effective, despite the lack of a 5V 5A power adapter that limits the device's performance.
The author of the experiment decided to push further, attempting to use the Raspberry Pi as a true portable Network-Attached Storage (NAS). Although the project was not a complete success like his portable Linux server, the Raspberry Pi can function as an all-flash NAS, provided it is not used for overly intensive tasks.
The choice of the operating system
Initially, the author considered using TrueNAS, a powerful and appreciated NAS distribution. However, the ARM version of TrueNAS requires numerous workarounds to work on a Raspberry Pi, making it impractical for an already power-limited system. Additionally, the aggressive caching on ZFS is not ideal for a resource-limited device.
As an alternative, the author thought of an Ubuntu server with basic packages for network shares and NAS. However, he opted for OpenMediaVault (OMV), a lightweight system that can run even on very weak systems and offers an intuitive user interface for NAS operations.
Installation of OpenMediaVault
Unlike the x86 version of OpenMediaVault, which can be installed from an ISO image, the version for ARM devices requires installation as a collection of packages. The author used Raspberry Pi OS (Lite) to minimize compatibility issues. After obtaining a microSD card with the CLI version of Raspberry Pi OS, he used PuTTY to access the Raspberry Pi via SSH and executed the command wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/preinstall | sudo bash to download and run the OMV pre-installation script.
After rebooting the system, he executed the command wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash to start the installation process. Due to the slower processing capabilities of the Raspberry Pi powered by a power bank, the installation took about 45 minutes.
Problems with hard disks
The author initially chose to use external hard drives to add storage space to his NAS-berry Pi. However, his 1TB Seagate external hard drive did not appear in OMV after being connected. Attempting to boot the Raspberry Pi with the HDD connected caused a significant delay in the boot sequence, revealing that the 5V 3A power bank was unable to adequately support the Raspberry Pi 5, let alone an external hard drive.
The use of a HAT and external SATA adapters did not solve the problem, forcing the author to abandon the idea of connecting hard drives to his portable NAS.
Use of SSDs
Fortunately, the author owns a HAT designed to connect NVMe drives to the Raspberry Pi. After connecting everything, he discovered that the NVMe SSD appeared in the Disks section of OMV. He then added another SSD via an NVMe-to-USB adapter.
After configuring separate Btrfs pools on the SSDs, he created a new user and distributed some SMB shares. Although the transfer speeds are not impressive due to the use of the 1G Ethernet standard from the Raspberry Pi, the author is satisfied with the performance of his dual-SSD portable NAS that can be used anywhere with an affordable power bank.
Connection to the phone hotspot
The final step of the experiment was to configure the Raspberry Pi to connect to the phone hotspot, so that files could be transferred between the two devices. However, all attempts to connect to a WLAN network failed, with nmcli not available and the raspi-config utility unable to detect the hotspot or any other Wi-Fi network.
The author solved the problem by manually installing the driver adapters via the command sudo apt install network-manager network-manager-gnome. After restarting the network tools with sudo systemctl restart NetworkManager, nmcli started displaying Wi-Fi networks. He then used the command sudo omv-firstaid to modify the network settings of OpenMediaVault. After entering the hotspot credentials, he disconnected the Ethernet cable and connected to the phone. By entering the Raspberry Pi's IP address in the web browser, he was able to access the OMV web interface and began installing the Docker-Compose, FTP, and File Browser plugins.
So far, the system has been running for at least 7 hours, including the installation sequence, and the power bank seems to be holding up well.
A surprisingly decent portable NAS
The author is honest in saying that he is not a fan of using a Raspberry Pi as a dedicated storage server due to its limited computing power and inability to power more than 3 HDDs even with an official power adapter. However, as a secondary backup server or as a power bank-powered portable NAS, the Raspberry Pi is not so bad.
The author would not use this setup to store important files when he is away from his "goblin cave". However, to create redundant copies of casual documents or run some FOSS quality-of-life tools, he sees some use in this unusual configuration. In fact, he might purchase a UPS HAT and test his NAS-berry Pi during a development conference he will attend this summer.
Technical specifications of the Raspberry Pi 5
- GPU: VideoCore VII
- Starting price: $60
Editorial Note and Disclaimer
The guides and content published on GoYou are the result of independent research and analysis activities, for informational, educational, and in-depth purposes.
GoYou does not constitute a journalistic publication or an editorial product pursuant to Law No. 62/2001 and does not perform real-time information activities.
The GoYou project does not provide professional, technical, legal, or financial advice and disclaims any liability for the improper use of the information published.
In the Crypto sector, every investment involves risks: readers are invited to always inform themselves autonomously before making any decision.