Raspberry Pi 4 as a NAS

Last Modified: Fri, 28 Aug 2020 13:07:00 +0000 ; Created: Thu, 27 Aug 2020 20:58:09 +0000

I recently acquired a Raspberry Pi 4 B with 8GB of RAM. In a test benchmark setup I was able to saturate the gigabit wired link with a file transfer between a Windows 10 client and the Raspberry Pi.

I am using a 64GB microSD card (class U1). I also installed 5 heatsinks on the Pi and used a case with a small 5V fan. Connection is via a gigabit switch between the client and the Pi. I have the latest Raspberry Pi OS lite 64-bit. My testing used a ramdisk so the microSD card was not a bottleneck.

Commands used for the setup:

mkdir /mnt/ramdisk/

chmod 1777 /mnt/ramdisk/

mount -t tmpfs -o size=1g tmpfs /mnt/ramdisk/

dd if=/dev/urandom of=/mnt/ramdisk/random.data bs=10M count=100 status=progress

apt-get install -y samba samba-common-bin

apt-get install -y vim

smbpasswd -a pi

vim /etc/samba/smb.conf

systemctl restart smbd
Comment = Pi shared folder
Path = /mnt/ramdisk
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0777
directory mask = 0777
Public = yes
Guest ok = yes