13 Raspberry Pi as a simple home NAS

Table of Contents

Previous Page

Next Page


We are returning to SAMBA to make a simple, headless USB-drive home NAS
In this example, I added a USB-to-SSD drive to the diepti, which also runs pi-hole.
After the novelty of mounting a USB drive, it’s really just basic SAMBA share again.

Physical setup

Prepare Drive

Find location/name of USB drive
Guide assumes it is all partions under /dev/sda…

sudo fdisk -l

Unmount all partitions of USB drive (be careful to only select USB!)
May need to do sda1, sda2, etc

umount /dev/sda1

Start erase & partition setup

sudo parted /dev/sda

Then type each of these commands, separately, as the wizard requests:

	mklabel gpt
	mkpart
	BonoDrive
	ext4
	0%
	100%
	quit

Create formated partition, may take a minute:

sudo mkfs.ext4 /dev/sda1

Label Drive

sudo e2label /dev/sda1 BonoDrive

Mount drive using dietpi wizard

sudo dietpi-drive_manager
sudo chown -R username /mnt/BonoDrive

Reboot for all to take effect

sudo reboot

Enable Share Drive

If not already, install all the SAMBA stuff

sudo apt update && sudo apt install samba samba-common -y

Open config file

sudo nano /etc/samba/smb.conf

Enter in top network section:

[in network section]
allocation roundup size = 4096

Add this, as-is, to bottom of doc:

[BonoDrive]
path = /mnt/BonoDrive
writeable = yes
create mask = 0775
directory mask = 0775
public=no

Finally, add share password to user. Can be different than login for security.

sudo smbpasswd -a dietpi

Address of share: \\dietpi\BonoDrive


Table of Contents

Previous Page

Next Page