TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸

Orange Pi NAS

February 5, 2021

Connect hard drives over USB

  • Set up drives to auto-mount on system boot
  • Share the drives over the WiFi network

Setting up a NAS

Run the following commands before and after connecting your hard drive to figure out which one you need to mount.

code
# get device UUIDs
sudo blkid

# find out partition names
cat /proc/partitions

setting up for NTFS and EXT4 drives

code
# install tools
sudo apt-get install fuse ntfs-3g

# create mount points
sudo mkdir /media/tasiomind/NAS /media/tasiomind/STUFF

# mount drive
sudo mount -t ext4 /dev/sda1 /media/tasiomind/NAS
sudo mount -t ntfs-3g /dev/sdc1 /media/tasiomind/STUFF

edit fstab to auto-mount drives

code
sudo nano /etc/fstab
code
LABEL="NAS"   UUID="94638681-0f6b-46c1-9207-c02a702c72cd"   /media/tasiomind/NAS        ext4  defaults 0 0
LABEL="STUFF" UUID="7C011EE7317A299E"                       /media/tasiomind/STUFF   ntfs-3g  defaults 0 0

share the drive over network

code
sudo apt install samba

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
sudo nano /etc/samba/smb.conf

Edit smb.conf file

i tried to make the extrenal drive called NAS publicly accessible without having to provide a password, but it didn't work. some articles mentioned changing user to nobody and changing pemissions to 777 (actually change owner and perms for the drive itself), but that did nothing. kept getting the you do not have permission error..

code
[nas-test]
path = /media/tasiomind/NAS
public = yes
writable = yes
browsable = yes
read only = no
;guest ok = yes
;guest only = yes
;guest account = nobody
create mask = 0777
directory mask = 0777

what did work was providing force user = tasiomind. (my username is tasiomind on both devices) i am able to access from Windows and browse as well as create files inside this shared drive. it did not ask me for a password

code
[NAS]
path = /media/tasiomind/NAS
writable = yes
public = yes
force user = tasiomind

Access the drive from Windows

Open File Explorer. Right click on This PC in the sidebar and select Add a network location.

code
\\192.168.111.100/NAS

Access the drive from macOS

_Files > Go > _

Cmd + K is the shortcut.