I turned my Raspberry Pi into a portable NAS that runs on a power bank and now I carry terabytes everywhere


A few days ago, I had the crazy idea that I should try converting my Raspberry Pi on a portable Linux server – one that is connected to a power bank and connects to my smartphone’s portable hotspot for my experiments. And as crazy as it sounds, this setup worked surprisingly well, even if the lack of a 5V 5A power adapter affects my Raspberry Pi’s performance.

One rainy thought led to another, and I thought I could try to take it a step further by running a complete network attached storage platform on my Raspberry Pi 5 portable server. While I wouldn’t say the project was as much of a success as my portable Linux machine with Docker hosting, a Raspberry Pi can serve as a laptop. All-flash NASas long as I don’t go too overboard with my NAS tasks.


A person holding a Raspberry Pi 5

I tried running the best NAS distro on my Raspberry Pi and it worked better than I thought

TrueNAS may not officially support Arm devices, but you can install it on a Raspberry Pi

As a die-hard TrueNAS lover, my first instinct was to use the community-created ARM port of the super-powerful NAS distribution. However, this version of TrueNAS requires too many solutions to run on my Raspberry Pi, and considering ZFS’s aggressive memory caching, it didn’t make much sense to use it on a system that was already starved of power. So, I went the other direction and began contemplating an Ubuntu server that is armed with just the basic network shares and NAS packages I would need. But in the end, I ended up switching to OpenMediaVault, as it is lightweight enough to run on even the weakest systems out there, while providing a fairly intuitive user interface for NAS operations.

But unlike the x86 version of OpenMediaVaultThe NAS platform does not have an ISO file for ARM devices and instead must be installed as a typical package collection. Considering the extravagant nature of this project, I chose the old Raspberry Pi (Lite) operating system to keep compatibility issues to a minimum. After grabbing a microSD card with the CLI version of the Raspberry Pi OS, I used PuTTY to SSH into my Raspberry Pi and ran the wget -O – https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/preinstall | sudo bash command to grab (and run) the OMV preinstall script. Once the script did its magic, I rebooted the system and ran wget -O – https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash to begin the installation process. Perhaps it’s due to the slower processing capabilities of a Raspberry Pi running a power bank (yes, I used my power bank from the start), but the installation process took much longer than the last time I tried to turn this SBC into an OMV server. Anyway, the installation process was completed in about 45 minutes and it was time to log into my new OMV NAS and set up some storage drives. Or so I thought at the time…

My power bank couldn’t support hard drives

Fortunately, SSDs work well

As much as I like using SSDs as boot drives and VM storage pools, I tend to avoid them for data archiving tasks. So, I decided to go with hard drives when adding storage devices to my NAS-berry Pi. Considering the portable nature of this setup, I initially opted for external drives. Unfortunately, my Seagate 1TB portable drive didn’t show up on OMV after plugging it in. Rebooting my Raspberry Pi with the hard drive connected caused a significant delay during the boot sequence. So much so that I got worried and ended up connecting an HDMI cable to the SBC just to see what would go wrong. To no one’s surprise, the Raspberry Pi operating system displayed an error after trying to spin up the hard drive. After all, the 5V 3A power bank could even properly support the Raspberry Pi 5, let alone a bulky hard drive. Switching to a HAT and external SATA adapters made little difference, so I had to abandon my plans to connect hard drives to my portable Raspberry Pi.

That said, I have another HAT designed to connect NVMe drives to the Raspberry Pi. After connecting everything, I logged into OMV and sure enough, the NVMe SSD appeared in the Disks section. As if this setup wasn’t badass enough, I thought I’d throw another SSD into the fray via an NVMe to USB adapter.

After setting up separate Btrfs groups on the SSDs, I set up a new user and deployed some SMB shares to them. Now, the transfer speeds are far from impressive, as the Raspberry Pi still uses the 1G Ethernet standard. But for a dual SSD portable NAS that I could use literally anywhere with my budget power bank, I don’t have much to complain about.

Connecting OMV to my phone’s hotspot was a bit tricky

But it was still doable after fixing some kinks.

raspberry-pi-portable-nas-10

Finally, it was time to set up the last remaining piece of this damn puzzle: pairing my Raspberry Pi with my smartphone’s hotspot so I could transfer files between them. However, all my attempts to connect to a WLAN ended in vain, with nmcli not be available and raspi configuration The utility does not detect my access point. Or even any Wi-Fi network, in fact. My theory is that OMV packages automatically remove wireless tools, since I used the same setup (minus OpenMediaVault) for my portable RPi Linux server the other day.

Anyway, solving this problem involved manually installing the driver adapters via sudo apt install network-administrator-network-administrator-gnome. Once I restarted network tools via sudo systemctl restart NetworkManagernmcli started showing the Wi-Fi networks and I ran sudo omv-first aid to modify the OpenMediaVault network settings. After entering the access point credentials, I unplugged my Ethernet cable and switched to my smartphone. Lo and behold, upon entering the IP address of my Raspberry Pi into the web browser, the OMV web UI appeared and I started installing the Docker-Compose, FTP and File Browser plugins. So far I’ve left this system running for at least 7 hours (including the installation sequence) and my power bank seems to be working fine.

It may be a deranged project, but it’s surprisingly decent for a portable NAS

A person holding a Raspberry Pi and some storage drives.

I’ll be brutally honest with you: I’m not a fan of using a Raspberry Pi as a dedicated storage server, as its limited computing power and inability to power more than 3 HDDs even with an official power adapter make it a terrible choice for a primary NAS. But if it’s a secondary backup server or something as quirky as a portable NAS powered by a power bank, it’s not so terrible. Of course, I would never use it to store important files when I’m away from my goblin cave. But if it’s just a matter of creating a redundant copy of random documents or using this makeshift NAS to run some quality-of-life FOSS tools, I can see some use in this strange setup. In fact, I might buy a UPS HAT and try out my NAS-berry Pi later this summer.

A representation of the Raspberry Pi 5

UPC

Arm Cortex-A76 (quad core, 2.4 GHz)

Memory

Up to 8GB LPDDR4X SDRAM

Operating system

Raspberry Pi operating system (official)

Ports

2× USB 3.0, 2× USB 2.0, Ethernet, 2× micro HDMI, 2× 4-lane MIPI transceivers, PCIe Gen 2.0 interface, USB-C, 40-pin GPIO connector

GPU

Nucleus VII Video

Starting price

$60




Source link

Leave a Reply

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